Worked Examples: Number Conversions
Step-by-step solutions for all conversion types
Binary to Denary
Question
Convert the binary number 11010110 to denary.
Solution
Final Answer
11010110โ = 214โโ
Denary to Binary (Division Method)
Question
Convert denary 179 to an 8-bit binary number.
Solution
Final Answer
179โโ = 10110011โ
Verify: 128 + 32 + 16 + 2 + 1 = 179 โ
Binary Addition
Question
Add the binary numbers 01011011 and 00101110.
State whether overflow occurs.
Solution
01011011 + 00101110 ----------
Column 1 (rightmost): 1 + 0 = 1
Column 2: 1 + 1 = 10, write 0, carry 1
Column 3: 0 + 1 + 1(carry) = 10, write 0, carry 1
Column 4: 1 + 0 + 1(carry) = 10, write 0, carry 1
Column 5: 1 + 1 + 1(carry) = 11, write 1, carry 1
Column 6: 0 + 0 + 1(carry) = 1
Column 7: 1 + 1 = 10, write 0, carry 1
Column 8: 0 + 0 + 1(carry) = 1
1 1 1 1 โ carries 01011011 (91) + 00101110 (46) ---------- 10001001 (137)
Final Answer
01011011 + 00101110 = 10001001
Verify: 91 + 46 = 137 โ
No overflow - result (137) fits within 8 bits (max 255)
Hexadecimal to Denary
Question
Convert hexadecimal B7 to denary.
Solution
B = 11, 7 = 7
B (11) is in the 16s column: 11 ร 16 = 176
7 is in the 1s column: 7 ร 1 = 7
Final Answer
B7โโ = 183โโ
Binary to Hexadecimal
Question
Convert binary 11011001 to hexadecimal.
Solution
1101 = 8 + 4 + 1 = 13 = D
1001 = 8 + 1 = 9 = 9
Final Answer
11011001โ = D9โโ
Verify: D9 = (13ร16) + 9 = 208 + 9 = 217
Binary: 128+64+16+8+1 = 217 โ
Binary Shifts
Question
a) Perform a left shift by 2 on 00010100 (20)
b) Perform a right shift by 2 on 01100100 (100)
Solution (a) - Left Shift
Original: 0 0 0 1 0 1 0 0
After: 0 1 0 1 0 0 0 0
Fill empty positions on right with 0s
Left shift by 2 = multiply by 2ยฒ = multiply by 4
20 ร 4 = 80
Answer (a)
00010100 << 2 = 01010000 (80)
Solution (b) - Right Shift
Original: 0 1 1 0 0 1 0 0
After: 0 0 0 1 1 0 0 1
Fill empty positions on left with 0s, rightmost bits are lost
Right shift by 2 = divide by 2ยฒ = divide by 4
100 รท 4 = 25
Answer (b)
01100100 >> 2 = 00011001 (25)