Question 1
A school's lighting controller stores each room's brightness level as one unsigned byte.
(a) Convert the denary value 183 into 8-bit binary. [1]
(b) Convert the denary value 183 into hexadecimal. [1]
(c) Another room's level is stored as hexadecimal 3E. Convert 3E into denary. [1]
Show your working.
[3]
- p1 [1]
(a) Gives 10110111 (128 + 32 + 16 + 4 + 2 + 1 = 183).
- p2 [1]
(b) Gives B7 (1011 is B and 0111 is 7, or 183 = 11 x 16 + 7).
- p3 [1]
(c) Gives 62 (3 x 16 + 14 = 62).
Also accept
- For p2, "0xB7" or "b7" earns the mark.
- For p1, "1011 0111" written with a space earns the mark.
- Follow through for p2 from a wrong binary answer in (a) if the nibbles are converted correctly.
No marks for
- For (b), "117". That reads the nibbles 1011 and 0111 as the denary numbers 11 and 7 side by side.
- For (c), "314". That treats E as 14 and writes 3 and 14 next to each other instead of multiplying the 3 by 16.
A full-marks answer
(a) 183 = 128 + 32 + 16 + 4 + 2 + 1, so the binary is 10110111.
(b) Split into nibbles: 1011 = 11 = B and 0111 = 7, so 183 is B7 in hexadecimal.
(c) 3E = 3 x 16 + 14 = 48 + 14 = 62.