Question 1 Report
Binary shifts move all bits left or right by a specified number of positions.
(a) Perform each shift operation on the 8-bit binary number and state the result. [4]
| Original (denary) | Original (binary) | Shift | Result (binary) | Result (denary) |
|---|---|---|---|---|
| 12 | 00001100 | Left shift by 1 | ||
| 12 | 00001100 | Left shift by 2 | ||
| 12 | 00001100 | Right shift by 1 | ||
| 12 | 00001100 | Right shift by 2 |
(b) State the effect of a left shift by 1 on the denary value. [1]
(c) State the effect of a right shift by 1 on the denary value. [1]
(d) Explain what happens to the denary value when you left-shift the binary number 10000000 by 1 in an 8-bit system. [2]
(e) State the relationship between a left shift by N positions and multiplication. [2]
(f) Convert the denary number 156 to binary. Show your working. [2]
(g) Convert the binary number 11010110 to hexadecimal. Show your working. [2]
(h) Perform binary addition of 01101011 and 00110101. Show the carry row and identify whether overflow has occurred. [3]
(i) Explain why hexadecimal is used as a shorthand for binary in computing. [2]
(j) Convert the hexadecimal values 3F, A2 and 1B to denary. Show your working for each. [1]
(a) Binary shift operations on 00001100 (denary 12). [4]
| Original (denary) | Original (binary) | Shift | Result (binary) | Result (denary) |
|---|---|---|---|---|
| 12 | 00001100 | Left shift by 1 | 00011000 | 24 |
| 12 | 00001100 | Left shift by 2 | 00110000 | 48 |
| 12 | 00001100 | Right shift by 1 | 00000110 | 6 |
| 12 | 00001100 | Right shift by 2 | 00000011 | 3 |
Left shifts move bits towards the most significant end and fill vacated positions with 0. Right shifts move bits towards the least significant end, discarding bits that fall off the right.
(b) A left shift by 1 doubles (multiplies by 2) the denary value: 12 becomes 24. [1]
(c) A right shift by 1 halves (integer division by 2) the denary value: 12 becomes 6. [1] Any fractional part is lost.
(d) Left-shifting 10000000 by 1 pushes the leading 1 beyond the 8-bit boundary. [2] The result is 00000000 (denary 0). The original value (128) is lost because the only set bit has been shifted out of the available storage. This is a form of overflow.
(e) A left shift by N positions is equivalent to multiplying the number by \(2^N\). [2] For example, left shift by 3 multiplies by \(2^3 = 8\). Similarly, a right shift by N divides by \(2^N\) (with truncation).
(f) Converting 156 to binary by repeated division by 2: [2]
| Division | Quotient | Remainder |
|---|---|---|
| 156 / 2 | 78 | 0 |
| 78 / 2 | 39 | 0 |
| 39 / 2 | 19 | 1 |
| 19 / 2 | 9 | 1 |
| 9 / 2 | 4 | 1 |
| 4 / 2 | 2 | 0 |
| 2 / 2 | 1 | 0 |
| 1 / 2 | 0 | 1 |
Reading remainders from bottom to top: 10011100.
(g) Converting 11010110 to hexadecimal: [2]
Split into nibbles: 1101 and 0110.
Hexadecimal: D6.
(h) Binary addition of 01101011 + 00110101: [3]
Carry: 0 1 1 1 1 1 0 0
0 1 1 0 1 0 1 1
+ 0 0 1 1 0 1 0 1
------------------
1 0 1 0 0 0 0 0Result: 10100000. Denary check: 107 + 53 = 160, and 10100000 = 128+32 = 160. No overflow has occurred because both operands are positive (MSB = 0) and the result (160) fits within an 8-bit unsigned range (0-255).
(i) Hexadecimal is used as shorthand for binary because each hex digit represents exactly 4 binary bits. [2] This makes conversion trivial and reduces long binary strings to a much shorter, more readable form. For example, the 8-bit binary 11111111 becomes simply FF, which is easier for programmers to read and less error-prone to transcribe.
(j) Hex to denary conversions: [1]
Everything you need to excel in your exams