CS Atlas GATE 2027
Digital Logic course
0 / 57 complete

Digital Logic/Phase 2 · Fixed & Floating Point

Chapter review LI-2.1 · Item 16 of 57

Real numbers in binary

Read at your own pace. Try the questions before opening the answers.

On this page

ACompressed recap

🧾

Fixed point i.f: integer ÷ 2ᶠ, step 2⁻ᶠ, unsigned range up to 2ⁱ − 2⁻ᶠ, signed −2ⁱ⁻¹ … 2ⁱ⁻¹ − 2⁻ᶠ. IEEE single: S | E (8, bias 127) | F (23); value ±1.F × 2^(E − 127). Double: 11/52, bias 1023. Special: E = 0 → zero/denormal (0.F × 2⁻¹²⁶); E = 255 → ∞/NaN. Range ≈ 3.4 × 10³⁸, min normal 2⁻¹²⁶, min denormal 2⁻¹⁴⁹; gap 2^(e − 23); integers exact to 2²⁴.

BMerged rule card

2.1.1 Fixed-point binary fractions: range, precision and rounding

  • i.f fixed point: value = integer ÷ 2ᶠ; step 2⁻ᶠ (same everywhere).
  • Unsigned range 0 … 2ⁱ − 2⁻ᶠ; signed 2's complement −2ⁱ⁻¹ … 2ⁱ⁻¹ − 2⁻ᶠ.
  • Real → fixed: × 2ᶠ, round/truncate, write in n bits. Negatives: 2's complement of all n bits.
  • Truncation error < 2⁻ᶠ; rounding error ≤ 2⁻ᶠ⁻¹.

2.1.2 Floating point and IEEE 754: sign, biased exponent, mantissa

  • Normalised value: (−1)ˢ × 1.F × 2^(E − bias).
  • Single: 1 + 8 + 23 bits, bias 127. Double: 1 + 11 + 52 bits, bias 1023.
  • Encode: sign → binary → normalise 1.f × 2ᵉ → E = e + bias → F = bits after the point → hex in groups of 4.
  • Decode: split S | E | F, e = E − bias, value = ±1.F × 2ᵉ.

2.1.3 IEEE 754 special values, denormals, range, precision and gaps

  • E = 0, F = 0: ±0. E = 0, F ≠ 0: denormal (−1)ˢ × 0.F × 2^(1 − bias). E = all 1s: ±∞ (F = 0) or NaN.
  • Single: max ≈ 3.4 × 10³⁸ ((2 − 2⁻²³) × 2¹²⁷), min normal 2⁻¹²⁶, min denormal 2⁻¹⁴⁹.
  • Precision: 24 bits (single), 53 (double). Gap in [2ᵉ, 2ᵉ⁺¹) = 2^(e − 23); integers exact up to 2²⁴.
  • Float addition aligns exponents; not associative. Bias for k exponent bits = 2ᵏ⁻¹ − 1.

CInterleaved GATE-style questions

Q1NAT1 markFixed point

How many fraction bits are needed for a step of at most 0.01?

Numerical answer: ________

Q2NAT2 marksFixed point

Signed 8.8 fixed point (16 bits, 2's complement). What is the most negative value?

Numerical answer: ________

Q3NAT1 markExponent

What is the exponent field (decimal) of 0.15625 in single precision?

Numerical answer: ________

Q4MCQ2 marksDecode

The single-precision pattern 0xBF40 0000 represents:

  • (A) −0.75
  • (B) −1.5
  • (C) 0.75
  • (D) −0.375

Q5MCQ1 markHidden bit

Why is the leading 1 of a normalised significand not stored?

  • (A) It is stored in the exponent
  • (B) It is the sign bit
  • (C) It is only needed for denormals
  • (D) It is always 1, so storing it wastes a bit

Q6NAT2 marksGap

In single precision, what is the distance between 1.0 and the next larger float? Give k where the distance is 2ᵏ.

Numerical answer: ________

Q7NAT2 marksToy format

Format: 1 sign, 4 exponent bits (bias 7), 3 fraction bits, IEEE rules. What is the smallest positive normal value? Give it as a decimal.

Numerical answer: ________

Q8MCQ1 markDenormal

A single-precision denormal number has the value:

  • (A) (−1)ˢ × 1.F × 2⁻¹²⁷
  • (B) (−1)ˢ × 0.F × 2⁻¹²⁷
  • (C) 0
  • (D) (−1)ˢ × 0.F × 2⁻¹²⁶

DAnswer Vault

Answer Vault

Try the questions first. Open when you are ready to check.

Q1 Answer: 71 mark

2⁻⁶ = 0.0156 is too big; 2⁻⁷ = 0.0078.

Re-read: Lesson 2.1.1 — Fixed-point binary fractions: range, precision and rounding

Q2 Answer: -1282 marks

−2⁷.

Re-read: Lesson 2.1.1 — Fixed-point binary fractions: range, precision and rounding

Q3 Answer: 1241 mark

0.00101₂ = 1.01 × 2⁻³.

Re-read: Lesson 2.1.2 — Floating point and IEEE 754: sign, biased exponent, mantissa

Q4 Answer: (A)2 marks

S 1, E 126 → e = −1, F 1… → −1.1₂ × 2⁻¹.

  • (B) is wrong: Exponent is −1, not 0.
  • (C) is wrong: Sign bit is 1.
  • (D) is wrong: Exponent is −1, not −2.

Re-read: Lesson 2.1.2 — Floating point and IEEE 754: sign, biased exponent, mantissa

Q5 Answer: (D)1 mark

The hidden bit gives one extra bit of precision for free.

  • (A) is wrong: No.
  • (B) is wrong: No.
  • (C) is wrong: Denormals have a leading 0.

Re-read: Lesson 2.1.2 — Floating point and IEEE 754: sign, biased exponent, mantissa

Q6 Answer: -232 marks

One step in the last fraction bit.

Re-read: Lesson 2.1.3 — IEEE 754 special values, denormals, range, precision and gaps

Q7 Answer: 0.0156252 marks

E = 1 → 2⁻⁶.

Re-read: Lesson 2.1.3 — IEEE 754 special values, denormals, range, precision and gaps

Q8 Answer: (D)1 mark

No hidden 1; exponent 1 − 127.

  • (A) is wrong: Wrong on both counts.
  • (B) is wrong: Wrong exponent.
  • (C) is wrong: Only when F = 0.

Re-read: Lesson 2.1.3 — IEEE 754 special values, denormals, range, precision and gaps

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.