Question 1(c) 2015 · October-November · Paper 33 · 3 marks
Reveal official mark-scheme answer
Official answer for Question 1
Part (c)
Part (c)
Any point 1 mark
Show text version of question
Question 1
Part (c)
Question 1
In a particular computer system, real numbers are stored using floating-point representation with:
- 8 bits for the mantissa, followed by
- 8 bits for the exponent
Two’s complement form is used for both mantissa and exponent.
Part (c)
A student writes a program to output numbers using the following code:
X 0.0 FOR i 0 TO 1000 X X + 0.1 OUTPUT X ENDFOR
The student is surprised to see that the program outputs the following sequence:
Explain why this output has occurred.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
...............................................................................................................................................[3]
Question 4
Why this question appears here
98% assigned-topic match · Data representation › Floating-point representation and manipulation
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_w15_qp_33.pdf
