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 | |
|---|---|---|
| 100001011 shifted left 3 places | AThe two leftmost bits (10) were lost, but the 2 bits added on the right were 1s in the wrong places. Added bits must be 0s, so the answer is 11001100 only if the shift is done correctly: the correct result is 11001100, so the error is keeping the lost bits instead of dropping them. | |
| 211010110 shifted right 2 places | B00110101: every bit moves 2 places right, the 2 rightmost bits (10) are lost and 2 zeros are added on the left | |
| 3Shifting an 8-bit number left by 3 places moves each bit 3 positions and adds three 0s at the right-hand end | C01011000: every bit moves 3 places left, the 3 leftmost 0s are lost and 3 zeros are added on the right | |
| 4Shifting all 8 bits out of an 8-bit register leaves only zeros | D00000101 -> 00101000 | |
| 510110011 shifted left 2 places = 11001100 | EZeros must be added on the left, not 1s, and the 3 rightmost bits are lost. The correct result is 00001101. | |
| 601101100 shifted right 3 places = 11101101 | F11111111 shifted right 8 places = 00000000 |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
shift n places — Shifting by n places moves every bit n positions, losing n bits at one end and adding n zeros at the other. Shift all 8 bits out and you get 00000000.Left shift 2: 00000111 becomes 00011100Left shift by 3 adds 3 zeros on the rightRight shift 2: 10110100 becomes 00101101Left shift 8: 10110011 becomes 00000000Right shift 3: 00011000 becomes 00000011