Number Base Converter
Convert between decimal, binary, and hexadecimal with full working shown at every step. Covers AQA A Level CS (7517) §4.5.1–4.5.2.
📖 Learn Step-by-Step42 (Decimal)=101010(Binary)
Decimal
42
Binary
101010
Hexadecimal
2A
Step-by-step working
Input is already decimal: 42
Convert decimal 42 to binary (repeated division by 2):
42 ÷ 2 = 21 remainder 0
21 ÷ 2 = 10 remainder 1
10 ÷ 2 = 5 remainder 0
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Read remainders bottom→top: 101010
Number Base Practice Questions
Use the converter above to check your working, then try these exam-style questions.
Q1Convert binary to denary
Given Binary Number:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
Your Answer (Denary):
Q2Convert denary to binary
Given Denary Number:
173
Your Answer (Binary):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
Q3Convert binary to hexadecimal
Given Binary Number:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 1 | 1 | 1 | 0 |
Your Answer (Hexadecimal):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Hex | ||||||||
Q4Convert hexadecimal to binary
Given Hexadecimal: A3
Your Answer (Binary):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Binary | ||||||||
| Nibble: | (8421) | (8421) | ||||||
| Hex | ||||||||
Q5Convert hexadecimal to denary
Given Hexadecimal: 3F
Working (optional — convert to binary first):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Binary | ||||||||
| Nibble: | (8421) | (8421) | ||||||
| Hex | ||||||||
Your Answer (Denary):
Q6Convert denary to hexadecimal
Given Denary Number:
200
Working (convert to binary, then to hex):
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | |
|---|---|---|---|---|---|---|---|---|
| Binary | ||||||||
| Nibble: | (8421) | (8421) | ||||||
| Hex | ||||||||
Quick reference — number bases
Decimal (base 10):
- Uses digits 0–9
- Each position is a power of 10 (units, tens, hundreds…)
Binary (base 2):
- Uses digits 0 and 1
- Each position is a power of 2 (1, 2, 4, 8, 16, 32, 64, 128…)
- Computers use binary because transistors have two states
Hexadecimal (base 16):
- Uses 0–9 and A–F (A=10, B=11, C=12, D=13, E=14, F=15)
- Each hex digit represents exactly 4 binary bits (a nibble)
- Used for memory addresses, colour codes, MAC addresses
Conversion methods:
- Binary → Decimal: sum the place values where bit = 1
- Decimal → Binary: repeated division by 2, read remainders bottom→top
- Binary ↔ Hex: group 4 bits per hex digit
- Decimal → Hex: repeated division by 16