Computer Arithmetic
In unsigned fixed point with the low 4 of 8 bits as the fraction, what value does the bit pattern 0011 1000 represent?
- A56
- B3.8
- C3.5
Show answer and explanation
Answer: C. 3.5
The upper four bits, 0011, are the integer part, 3; the lower four bits, 1000, are the fraction, where the first bit weighs 2⁻¹ = 0.5. Together that is 3 + 0.5 = 3.5. Equivalently, reading the bits as the integer 56 and dividing by 2⁴ = 16 for the four fraction bits gives 56 ÷ 16 = 3.5. 56 ignores the binary point, and 3.8 misreads binary 1000 as the decimal ".8".
- A. 56 ignores the binary point and reads the bits as an integer.
- B. 3.8 misreads the binary fraction as decimal.
- C. Correct. Integer part 3 plus fraction 0.5 is 3.5.