Skip to content
ExamHope Logo

examhope

Primary Menu
  • Digital Logic
    • Arithmetic Operations
    • Asynchronous/Ripple Counters
    • Basic Gates
    • Boolean Algebraic Theorems
    • Codes
  • Data Structures
    • Binary Heaps
    • Binary Search
    • Binary Search Trees
    • Binary Tree
    • Binary Tree Sort
    • Bipartite Graphs
    • Complete Graph
  • Theory of Computation
    • Finite Automata
    • Finite Automaton First Example
  • Current Affairs
    • Sports News
    • Tech News
    • Bollywood News
    • Daily News
  • Database
  • Computer Network
  • Computer Organization and Architecture
  • C Language
  • Operating Systems
  • Software Engineering
  • Theory of Computation
  • About us
  • Contact Us
  • Privacy Policy
  • DMCA Policy
  • Terms and Conditions
  • Home
  • IT
  • Computer Organization and Architecture
  • Floating Point — Computer Arithmetic
  • Floating Point
  • Computer Organization and Architecture

Floating Point — Computer Arithmetic

examhopeinfo@gmail.com November 10, 2025 3 minutes read
Floating Point — Computer Arithmetic

Floating Point — Computer Arithmetic

🌊 What Does “Floating Point” Even Mean?

Let’s start simple.

When you write the number 12345, that’s an integer — it doesn’t have any fractional part.
But numbers like 3.14, 0.00045, or 2.71828 are real numbers — they include fractions or decimals.

Now, computers are great with integers, but real numbers can get very large or very tiny.
For example:

  • Distance from Earth to Sun ≈ 1.496 × 10⁸ km
  • Radius of an atom ≈ 5 × 10⁻¹¹ m

That’s a huge range!
Clearly, we can’t represent all these numbers just by fixed decimal places — we’d run out of bits!

So, computers use floating-point representation — where the decimal (or binary) point “floats” to where it’s needed.


🧮 The Floating-Point Format

A floating-point number is stored in this general scientific form:

[
N = (-1)^S \times M \times 2^E
]

Let’s break it down in plain English:

PartNameMeaning
SSign bit0 means positive, 1 means negative
MMantissa (or Significand)Represents the actual digits of the number
EExponentDecides where the binary (or decimal) point “floats”

🧠 Think of It Like This:

If we write 6.022 × 10²³, the number 6.022 is like the mantissa, and 23 is the exponent.
It’s the same idea in computers — just using base 2 (binary) instead of base 10.


💾 IEEE 754 Standard (The Common Format)

Almost every computer today uses the IEEE 754 standard for floating-point representation.

It defines two main types:

TypeTotal BitsSignExponentMantissa
Single Precision32 bits1823
Double Precision64 bits11152

🧩 Example: Single-Precision (32-bit) Format

| 1 bit | 8 bits     | 23 bits                  |
|  Sign |  Exponent  |     Mantissa (Fraction)  |

So a binary number like this:

0 10000010 10100000000000000000000

is interpreted as:

  • Sign = 0 → Positive
  • Exponent = 10000010₂ = 130₁₀
  • Mantissa = 1.101 × 2⁰ (The hidden ‘1’ is always assumed)
  • Actual number = 1.101 × 2^(130−127) = 1.101 × 2³ = 13.0

✏️ Step-by-Step Example

Let’s represent -5.75 in IEEE 754 (single precision):

  1. Convert to binary:
    5.75 = 101.11₂
  2. Normalize it:
    101.11 = 1.0111 × 2²
    → Mantissa = 0111
    → Exponent = 2 + 127 = 129 = 10000001₂
    → Sign = 1 (since it’s negative)
  3. Combine all parts:
   1 | 10000001 | 01110000000000000000000

That’s your 32-bit floating-point representation of -5.75. ✅


⚙️ Floating-Point Arithmetic Operations

Just like integers, floating-point numbers can be added, subtracted, multiplied, or divided.
But since the point “floats,” the process takes a few extra steps.

Let’s explore them one by one in easy terms.


➕ Floating-Point Addition (and Subtraction)

  1. Align the exponents
    The numbers must have the same exponent before adding.
    Example: 1.23 × 10² + 4.56 × 10³ → shift 1.23 to 0.123 × 10³.
  2. Add (or subtract) the mantissas
    Once the exponents match, add the fractional parts normally.
  3. Normalize the result
    If the sum is not in normalized form (1.xxx × 2ⁿ), shift and adjust the exponent.
  4. Round if necessary
    Keep precision within 23 (or 52) bits.

✖️ Floating-Point Multiplication

  1. Add exponents (after removing the bias)
  2. Multiply the mantissas
  3. Normalize and round
  4. Set sign bit based on rule:
   (+) × (+) = (+)
   (+) × (–) = (–)
   (–) × (–) = (+)

Example:
(1.1 × 2³) × (1.0 × 2²) = (1.1 × 1.0) × 2⁵ = 1.1 × 2⁵


➗ Floating-Point Division

  1. Subtract the exponents
  2. Divide the mantissas
  3. Normalize and round the result
  4. Set the sign accordingly

⚖️ Precision and Rounding

Because mantissa bits are limited (23 or 52), not all decimal numbers can be represented exactly.
For example, 0.1 (decimal) becomes an endless binary fraction.

So computers round off the result to fit the available bits — leading to tiny errors called rounding errors.
That’s why sometimes in programming you’ll see weird outputs like 0.30000000000004 — it’s not a bug, it’s just rounding at work!


🧭 Floating-Point Representation Diagram

Here’s a simple visual showing how a floating-point number is structured:

  +---------------------------------------------------------------+
  | Sign (1 bit) | Exponent (8 bits) | Mantissa (23 bits)         |
  +---------------------------------------------------------------+
         ↓              ↓                      ↓
       Negative     Controls “float”        Holds digits
       or Positive   (power of 2)           of the number

And in formula form:

[
\text{Value} = (-1)^{Sign} \times (1 + Fraction) \times 2^{(Exponent – Bias)}
]


💬 Everyday Analogy

Think of floating-point numbers like scientific notation in your calculator.
When your calculator shows 3.14E+02, it really means 3.14 × 10² = 314.

Computers do the same — but with base 2 (binary) and fixed-size memory spaces.


About the Author

examhopeinfo@gmail.com

Administrator

Visit Website View All Posts

Post navigation

Previous: Division restoring and non-restoring techniques
Next: Semiconductor memory technologies — Memory system design

Related News

Cache Coherency — Parallel Processors
  • Cache Coherency
  • Computer Organization and Architecture

Cache Coherency — Parallel Processors

examhopeinfo@gmail.com November 11, 2025 0
Shared Memory Multiprocessors
  • Shared Memory Multiprocessors
  • Computer Organization and Architecture

Shared Memory Multiprocessors — Parallel Processors

examhopeinfo@gmail.com November 11, 2025 0
parallel processors
  • parallel processors
  • Computer Organization and Architecture

Introduction to parallel processors

examhopeinfo@gmail.com November 11, 2025 0

Recent Posts

  • Vivo X200: जाने कितनी कम कीमत पर मिल रहा ये 9400 मिडिया टेक प्रोसेसर वाला स्मार्टफोन
  • Samsung Galaxy S25 Plus पर मिल रही भारी छूट ,जाने सेल प्राइस
  • AI के इस ज़माने में कैसे बिजली बचा रहे हैं यह स्मार्ट प्लग?
  • क्या है यह GhostPairing Scam और बिना पासवर्ड और सिम के क्यों हो रहा है व्हाट्सप्प अकाउंट हैक
  • Leica कैमरे के साथ जल्द लॉन्च हो सकता है Xiaomi Ultra 17

At ExamHope, we understand that preparing for exams can be challenging, overwhelming, and sometimes stressful. That’s why we are dedicated to providing high-quality educational resources, tips, and guidance to help students and aspirants achieve their goals with confidence. Whether you are preparing for competitive exams, school tests, or professional certifications, ExamHope is here to make your learning journey smarter, easier, and more effective.

Quick links

  • About us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions
  • Disclaimer
  • DMCA Policy

Category

  • Computer Network
  • Computer Organization and Architecture
  • Data Structures
  • C Language
  • Theory of Computation
  • Database

You may have missed

Vivo X200 Price Drop
  • IT
  • Current Affairs
  • Tech News

Vivo X200: जाने कितनी कम कीमत पर मिल रहा ये 9400 मिडिया टेक प्रोसेसर वाला स्मार्टफोन

examhopeinfo@gmail.com December 23, 2025 0
Samsung Galaxy S25 Plus
  • IT
  • Current Affairs
  • Tech News

Samsung Galaxy S25 Plus पर मिल रही भारी छूट ,जाने सेल प्राइस

examhopeinfo@gmail.com December 22, 2025 0
Electricity bill saving Smart Plug
  • IT
  • Current Affairs
  • Tech News

AI के इस ज़माने में कैसे बिजली बचा रहे हैं यह स्मार्ट प्लग?

examhopeinfo@gmail.com December 21, 2025 0
Ghost Pairing Scam on Whatsapp
  • IT
  • Current Affairs
  • Tech News

क्या है यह GhostPairing Scam और बिना पासवर्ड और सिम के क्यों हो रहा है व्हाट्सप्प अकाउंट हैक

examhopeinfo@gmail.com December 21, 2025 0
Copyright © All rights reserved for ExamHope. | MoreNews by AF themes.