Discussion
Consider the unsigned 8-bit fixed point binary number representation below,
b7 b6 b5 b4 b3 . b2 b1 b0
where the position of the binary point is between b3 and b2. Assume b7 is the most significant bit. Some of the decimal numbers listed below cannot be represented exactly in the above representation:
(i) 31.500 (ii) 0.875 (iii) 12.100 (iv) 3.001
Which one of the following statements is true?
Answer: C
The numbers that cannot be represented exactly are (iii) and (iv) only.
The format has five integer bits (b7 to b3), so integer parts from 0 to 31, and three fraction bits (b2 to b0), so fractions in steps of 1/8 = 0.125.
- 31.500 = 11111.100 in binary: representable.
- 0.875 = 7/8 = 00000.111: representable.
- 12.100 needs 0.1, which is not a multiple of 1/8 (in binary it does not terminate): not representable.
- 3.001 needs 0.001, smaller than the step 0.125: not representable.
So the claims that (i) or (ii) cannot be represented are false, and so is 'none can be represented'.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development