Skip to content

Syllabus · CS Computer Science and Information Technology

All topics in this subject
C programming foundations6
Arrays and pointers7
Recursion6
Probability and statistics foundations9
Linked lists, stacks and queues3
Trees, BSTs and heaps3
Graph foundations3
Algorithms foundations3
Discrete mathematics foundations15
Digital logic foundations22
Computer organization foundations12
Operating systems foundations6

Floating-point fields normal values and subnormals

Lesson 54 of 958 minFree

Store a scale as well as digits

Fixed point uses one scale for every stored value. Floating point stores a significand and an exponent, so the scale changes with the value. This gives a wider useful range at a fixed bit count, but neighboring values are not uniformly spaced. A floating-point bit pattern is not a two's-complement integer encoding of its numerical value.

Prerequisites: binary fractions, powers of two, signed representation and fixed-point rounding. Goals: decode normal and subnormal fields, encode exactly representable examples, derive range/spacing, and recognize special fields. This lesson describes a fully specified educational format and then relates its structure to IEEE binary32. It does not claim the educational format is an IEEE standard or that every language's float type must be binary32.

The educational seven-bit format

Write fields as s | eee | fff: one sign bit s, three unsigned exponent bits e and three unsigned fraction bits f. Exponent bias is 3. The field f is an integer from 0 to 7; the binary fraction .fff equals f/8. A separator is only notation, not a stored bit.

Exponent field eFraction field fInterpretation
1 through 6any(−1)^s × (1+f/8) × 2^(e−3)
01 through 7(−1)^s × (f/8) × 2^(1−3)
00Signed zero
70Signed infinity
71 through 7NaN, not a numerical finite value

For normal values there is an implicit leading 1, so three stored fraction bits provide four significant binary digits. The exponent is biased, not two's complement: e=010 means unsigned 2, so the true exponent is −1. With e=0 the subnormal rule uses exponent 1−bias=−2 and an implicit leading 0. Substituting e=0 into the normal formula would be wrong.

Normalize before encoding

A nonzero positive normal value is written (1.fraction)₂×2^E, with significand in [1,2). Move the binary point and compensate with the exponent so the numerical value is unchanged. The sign bit supplies the sign; it does not change the exponent bias rule.

Worked example 1: 5.5=(101.1)₂=(1.011)₂×2². The sign is 0, biased exponent e=2+3=5=101, and fraction f=011. Store 0|101|011. Check (1+3/8)×4=5.5. The leading 1 is implicit and is not inserted again into the three-bit fraction field.

Worked example 2: decode 1|010|100. It is normal because e=2. Significand=1+4/8=1.5, true exponent=2−3=−1, and sign is negative. Value=−1.5×1/2=−0.75. Treating fraction 100 as integer 100 or treating the whole word as signed integer arithmetic gives a different, invalid interpretation.

If normalization requires more than three stored fraction digits, representation may need rounding. Field encoding by itself does not authorize truncating; the next lesson supplies a rounding rule. First classify the value and check range rather than forcing every number into the normal formula.

Derive normal range and local spacing

The smallest positive normal uses e=1,f=0: 1×2^−2=1/4. The largest finite normal uses e=6,f=7: (1+7/8)×2³=15. Exponent 7 is reserved, so it cannot represent another normal binade.

Within one normal exponent E, incrementing f by 1 adds 2^(E−3). For example, in [1,2), E=0 and values are 1,1.125,1.25,…,1.875. Their spacing is 1/8. In [2,4), E=1 and spacing is 1/4. The precision stays four significant bits, while absolute spacing grows with magnitude.

At a power-of-two boundary, the spacing below and above can differ. The predecessor of 2 is 1.875, a gap of 0.125; the successor is 2.25, a gap of 0.25. “The spacing near 2” needs a direction or interval. A floating-point format does not provide the same absolute error resolution everywhere.

Subnormals fill the region near zero

With e=0, the value is (−1)^s(f/8)×2^−2=(−1)^s f/32. The smallest positive subnormal is 1/32=0.03125; the largest is 7/32=0.21875. The next positive value is the smallest normal 8/32=0.25, so the gap stays 1/32 across that boundary.

Worked example 3: 0|000|101 has value 5/32=0.15625, not (1+5/8)×2^−3. Its leading significand bit is 0. Subnormals preserve gradual steps toward zero, but do not have the same relative precision as normals; their effective significant-digit count shrinks as the value becomes smaller.

A representable subnormal is not automatically an arithmetic error. An underflow exception flag is a separate arithmetic matter involving conditions such as a tiny, inexact result under the applicable rules. This lesson classifies representations, not a complete exception-status protocol.

Zeros infinities and NaNs

The two s|000|000 patterns encode +0 and −0. Their signs are stored even though their numerical values compare equal under ordinary IEEE equality. They are not the same bit pattern. The two s|111|000 patterns denote signed infinities, not the largest finite number. A nonzero fraction with e=111 denotes a NaN. NaN encodings are not extra finite magnitudes and ordinary equality does not make a NaN equal to itself.

Count the educational patterns to check the field partition: normals 2×6×8=96; nonzero subnormals 2×7=14; zeros 2; infinities 2; NaNs 2×7=14. Total 128=2^7. This counts encodings, not distinct real-number values. Multiple NaNs and signed zeros must not be silently merged when counting bit patterns.

Relating the model to IEEE binary32

IEEE binary32 has one sign bit, eight exponent bits, 23 stored fraction bits and exponent bias 127. Normal precision is 24 bits including the implicit 1. Normal exponent fields run from 1 to 254; 0 and 255 have the special roles described above, with the appropriate field widths. Thus minimum positive normal is 2^−126, minimum positive subnormal is 2^−149 and maximum finite value is (2−2^−23)2^127. These are format facts, not memory byte-order rules.

Key checks: split fields first; classify exponent before applying a formula; distinguish fraction field from significand; subtract bias only in the correct case; include the hidden 1 only for normals; distinguish the smallest normal from the smallest positive value. Check counts and re-encode a decoded example as independent tests.

Original practice

These six single-correct MCQs are original learning questions, not previous-year questions. Choose exactly one option.

C01. In the seven-bit format s|eee|fff with bias 3, normal exponent fields 1…6 and three fraction bits, which pattern represents +5.5?

A. 0|010|011 B. 0|101|101 C. 0|101|011 D. 1|101|011

Answer: C

A is incorrect: exponent field 2 means true exponent −1, not +2.

B is incorrect: fraction 101 is 5/8, giving 6.5 rather than 5.5.

C is correct: 5.5=1.011₂×2², so e=5 and f=3.

D is incorrect: sign 1 gives −5.5.

C02. Using the same seven-bit format, what is the smallest positive subnormal?

A. 1/32 B. 1/8 C. 1/4 D. 1/64

Answer: A

A is correct: f=1 and e=0 give (1/8)×2^−2=1/32.

B is incorrect: it omits the fixed subnormal exponent factor.

C is incorrect: 1/4 is the smallest positive normal.

D is incorrect: it uses exponent −3 instead of the subnormal exponent −2.

C03. How many normal-number encodings does this seven-bit format have, counting both signs?

A. 128 B. 48 C. 112 D. 96

Answer: D

A is incorrect: 128 includes all special encodings as well.

B is incorrect: 48 counts only one sign.

C is incorrect: exponent field 0 is not a normal exponent field.

D is correct: 2 signs×6 normal exponent fields×8 fraction patterns=96.

C04. What does pattern 0|111|001 denote in this format?

A. The largest finite number B. NaN C. Positive infinity D. The smallest normal number

Answer: B

A is incorrect: the largest finite pattern has exponent field 110, not 111.

B is correct: all-one exponent and nonzero fraction encode NaN.

C is incorrect: infinity requires fraction 000.

D is incorrect: the smallest positive normal has e=001,f=000.

C05. What is the spacing between successive representable normal values in [1,2) in this format?

A. 1/4 B. 1/16 C. 1/8 D. 1/32

Answer: C

A is incorrect: 1/4 is the spacing in [2,4).

B is incorrect: that would require one additional fraction bit in this binade.

C is correct: E=0 and three fraction bits give 2^(0−3)=1/8.

D is incorrect: 1/32 is the subnormal spacing, not the spacing near 1.

C06. IEEE binary32 stores 23 fraction bits. How many significant binary digits do normal values have including the implicit leading bit?

A. 23 B. 24 C. 32 D. 22

Answer: B

A is incorrect: it omits the implicit leading 1 of a normal.

B is correct: 23 stored fraction bits plus one implicit leading bit give 24.

C is incorrect: 32 includes sign and exponent fields, not just precision.

D is incorrect: no fraction bit is removed by normalization.

Scope and sources

This is one bounded Digital Logic lesson, not complete GATE CS coverage. The official syllabus establishes relevance only; the derivations, examples and practice are original. Technical references were used to check representation and circuit conventions, not to reproduce their exercises.

Sources checked 14 October 2026.

Sign in to keep your progress. Sign in