Converting decimal to binary, octal and hex
With repeated division you keep dividing by the base. The remainders, read from bottom to top, give the number.
Rules
- Divide by the base repeatedly
- Read the remainders from bottom to top
- Remainders 10 to 15 in hex: A to F
Your turn
Three problems on this topic. Spaces don’t matter.
- 1 · From decimal
- 2
- 3
Convert the decimal number to base 2.
168
Result in base 2
Worked example
Convert the decimal number to base 2.
125
Worked solution
- 1125 : 2 = 62 remainder 1
- 262 : 2 = 31 remainder 0
- 331 : 2 = 15 remainder 1
- 415 : 2 = 7 remainder 1
- 57 : 2 = 3 remainder 1
- 63 : 2 = 1 remainder 1
- 71 : 2 = 0 remainder 1
- 8Read the remainders from bottom to top.
- 9= (1111101)2
Typical mistake: Read the remainders from bottom to top; the first remainder is the lowest digit.
Common questions
Why bottom to top?
The first remainder belongs to the lowest digit, the last to the highest.
