Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1-128 64 32 16 8 4 2 1 | A11111011 -> 00000100 -> 00000101 = 5 | |
| 211111011 = -128+64+32+16+8+2+1 = -5 | BThe student used only 4 bits instead of all 8 bits. | |
| 3If the checked result is negative, flip the bits and add 1 to get the positive value and confirm the size | CA round-trip check: converting the binary back gives -5, which matches the starting number | |
| 4A 1 in the sign bit adds -128, so add the other place values to it to check a negative number | DThe 8 place values used to convert an 8-bit two's complement number back to denary for checking | |
| 5-3 in 8 bits: 00000011 -> flip -> 11111100 | EThe student forgot to add 1 after flipping the bits. | |
| 6-5 stored as 1011 | F10000011 = -128 + 2 + 1 = -125 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
-128 64 32 16 8 4 2 1 — Check a two's complement answer by converting it back to denary with these place values, then compare the result with your starting number. They must match.Place values: -128 64 32 16 8 4 2 111111011 = -128 + 64 + 32 + 16 + 8 + 2 + 1-128 + 64 + 32 + 16 + 8 + 2 + 1 = -511111011 flip = 00000100
00000100 + 1 = 00000101
So 11111011 is -5Always write 8 bits: 00000101, not 101