Back to the 2023 paper

Module 1: Functional Block of computer and Data representaion

20237m

Explain IEEE standard for floating point representation with example.

Worked SolutionAI Assisted

IEEE 754 Floating Point Standard

Represents real numbers in binary scientific notation: (−1)S×(1.F)×2E−bias(-1)^S \times (1.F) \times 2^{E-bias} for normalized numbers.

Single Precision (32-bit):

| S (1) | Exponent (8) | Mantissa/Fraction (23) |
  • S=0S=0 positive, 11 negative.
  • Exponent = true exponent EE + bias 127127 (range −126-126 to +127+127).
  • Mantissa stores fractional part after leading 1. (hidden bit).
  • Value =(−1)S×1.M×2E−127= (-1)^S \times 1.M \times 2^{E-127}.

Double Precision (64-bit): S(1)S(1) | Exponent(11, bias 1023) | Mantissa(52). Value =(−1)S×1.M×2E−1023= (-1)^S \times 1.M \times 2^{E-1023}.

Special values:

  • E=0,M=0E=0, M=0 → ±0\pm0; $E=0, M
    eq0→denormalized → denormalized 0.M \times 2^{-126}$ (gradual underflow).
  • E=255,M=0E=255, M=0 → ±∞\pm\infty; $E=255, M
    eq0$ → NaN.
  • Normalized: 1≤E≤2541\le E\le254.

Example - Single Precision

Represent −12.7510-12.75_{10} in IEEE 754 32-bit:

  1. Sign: negative → S=1S=1.
  2. Binary: 12.75=1100.112=1.10011×2312.75 = 1100.11_2 = 1.10011 \times 2^{3} (normalize).
  3. Exponent: Etrue=3E_{true}=3 → Ebiased=3+127=130=100000102E_{biased}=3+127=130=10000010_2.
  4. Mantissa: fractional part 10011 padded to 23 bits → 10011000000000000000000.

Result:

1 | 10000010 | 10011000000000000000000

Hex = 0xC14C0000.

Another example - 0.0850.085? 6.510=110.12=1.101×226.5_{10}=110.1_2=1.101\times2^{2} → S=0,E=129=10000001,M=1010...S=0, E=129=10000001, M=1010... → 0 10000001 10100000000000000000000 = 0x40D00000.

To decode, reverse: SS, E−127E-127, insert 1., compute (−1)S×1.M×2E−bias(-1)^S\times1.M\times2^{E-bias}.

Similar questions

Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.