GCSE Revision Aid: This resource is designed to support your revision and may contain errors. If you find a discrepancy with your class teaching, your teacher is correct β€” please let us know at gcserevise@scott.scottrix.co.uk.

CS16: Converting Number Bases

Foundation Higher AQAEdexcelOCREduqas

Step-by-step methods for converting between binary, decimal and hexadecimal - the essential skill for GCSE Computer Science.

Fastmail

πŸ“‹ Overview of Conversions

You need to be able to convert between all three number bases: decimal (base 10), binary (base 2), and hexadecimal (base 16). There are six possible conversions to master.
From To Method
Binary Decimal Add up positional values where bit is 1
Decimal Binary Repeated division by 2 (or subtract largest power of 2)
Hex Decimal Multiply each digit by its place value and add
Decimal Hex Repeated division by 16
Binary Hex Group bits into fours, convert each group
Hex Binary Expand each hex digit to 4 bits

01οΈβƒ£βž‘οΈπŸ”Ÿ Binary to Decimal

Method: Write out the binary place values above each bit. Add up all the place values where there is a 1. Ignore positions with a 0.
8-bit Place Values:
128 64 32 16 8 4 2 1

For each bit position: if bit = 1, add the place value; if bit = 0, ignore it.
Convert 10110100 to decimal
Place values: 128  64  32  16   8   4   2   1
Binary:         1   0   1   1   0   1   0   0

128 + 0 + 32 + 16 + 0 + 4 + 0 + 0 = 180
Convert 01101011 to decimal
Place values: 128  64  32  16   8   4   2   1
Binary:         0   1   1   0   1   0   1   1

0 + 64 + 32 + 0 + 8 + 0 + 2 + 1 = 107

πŸ”Ÿβž‘οΈ01️⃣ Decimal to Binary

Method 1: Repeated Division by 2

Method: Repeatedly divide the decimal number by 2. Record the remainder each time (it will always be 0 or 1). Read the remainders from bottom to top to get the binary number.
Convert 107 to binary using division
107 / 2 = 53 remainder 1
 53 / 2 = 26 remainder 1
 26 / 2 = 13 remainder 0
 13 / 2 =  6 remainder 1
  6 / 2 =  3 remainder 0
  3 / 2 =  1 remainder 1
  1 / 2 =  0 remainder 1

Read remainders from BOTTOM to TOP: 1101011

In 8 bits: 01101011

Method 2: Subtracting Powers of 2

Method: Find the largest power of 2 that fits into the number. Subtract it and put a 1 in that position. Repeat with the remainder. Put 0s in positions where the power doesn't fit.
Convert 180 to binary using subtraction
180 - 128 = 52    β†’ bit 7 = 1
 52 - 64 = can't  β†’ bit 6 = 0
 52 - 32 = 20     β†’ bit 5 = 1
 20 - 16 = 4      β†’ bit 4 = 1
  4 - 8 = can't   β†’ bit 3 = 0
  4 - 4 = 0       β†’ bit 2 = 1
  0 - 2 = can't   β†’ bit 1 = 0
  0 - 1 = can't   β†’ bit 0 = 0

Result: 10110100

πŸ”’βž‘οΈπŸ”Ÿ Hex to Decimal

Method: Multiply each hex digit by its place value (powers of 16) and add the results together. Remember: A=10, B=11, C=12, D=13, E=14, F=15.
Hex Place Values:
Position: 2 1 0
Multiplier: 256 16 1

For each hex digit: multiply digit value by its place value, then add all results.
Convert 3C4 to decimal
3C4 = 3 x 256 + C x 16 + 4 x 1
    = 3 x 256 + 12 x 16 + 4 x 1
    = 768 + 192 + 4
    = 964
Convert FF to decimal
FF = F x 16 + F x 1
   = 15 x 16 + 15 x 1
   = 240 + 15
   = 255

πŸ”Ÿβž‘οΈπŸ”’ Decimal to Hex

Method: Repeatedly divide the decimal number by 16. Record the remainder each time. Convert remainders 10-15 to A-F. Read the remainders from bottom to top.
Convert 964 to hexadecimal
964 / 16 = 60 remainder 4
 60 / 16 =  3 remainder 12 (= C)
  3 / 16 =  0 remainder 3

Read from bottom to top: 3C4

Convert 255 to hexadecimal
255 / 16 = 15 remainder 15 (= F)
 15 / 16 =  0 remainder 15 (= F)

Read from bottom to top: FF

01οΈβƒ£βž‘οΈπŸ”’ Binary to Hex

Method: Group the binary digits into groups of 4, starting from the right. Convert each group of 4 bits to its hex equivalent. This works because 1 hex digit = exactly 4 binary bits.
Convert 11010110 to hex
Binary:  1101  0110
Groups:   D     6

Result: D6

Convert 1011001111010110 to hex
Binary:  1011  0011  1101  0110
Groups:   B     3     D     6

Result: B3D6

Tip: If the binary number doesn't divide evenly into groups of 4, add leading zeros to the left. For example, 11010 becomes 0001 1010 = 1A.

πŸ”’βž‘οΈ01️⃣ Hex to Binary

Method: Convert each hex digit to its 4-bit binary equivalent. Write the groups of 4 bits next to each other. This is the reverse of binary-to-hex.
Convert 7B to binary
7 = 0111
B = 1011

Result: 01111011

Convert FACE to binary
F = 1111
A = 1010
C = 1100
E = 1110

Result: 1111101011001110

Tip: Always write each hex digit as exactly 4 bits, including leading zeros. So hex 3 = 0011, not just 11.

⚠️ Common Mistakes

Mistake Why It's Wrong How to Fix It
Reading division remainders top-to-bottom The first remainder is the least significant bit Always read remainders from BOTTOM to TOP
Not padding binary groups to 4 bits Hex 3 = 0011, not 11 Always use 4 bits per hex digit, pad with leading zeros
Grouping binary from left instead of right Wrong grouping gives wrong answer Always group from the RIGHT, add leading zeros to left group
Forgetting A=10 through F=15 Hex digits above 9 are letters Memorise: A=10, B=11, C=12, D=13, E=14, F=15

❓ Practice Questions

Q1: Convert binary 11001010 to decimal.

Q2: Convert decimal 200 to binary (8 bits).

Q3: Convert hex A5 to decimal.

Q4: Convert binary 111100001010 to hex.

Q5: Convert hex 2F to binary.

βœ… Answers

  1. 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 = 202
  2. 200 - 128 = 72, 72 - 64 = 8, 8 - 8 = 0. Binary: 11001000
  3. A x 16 + 5 x 1 = 10 x 16 + 5 = 160 + 5 = 165
  4. Group: 1111 0000 1010 = F0A
  5. 2 = 0010, F = 1111. Binary: 00101111

🎯 Exam Tips

⚠️ Common Errors

βœ— Padding binary with zeros on the wrong side when converting to hex βœ“ When grouping binary into 4-bit groups for hex conversion, pad with leading zeros on the LEFT, not trailing zeros on the right.

βœ— Forgetting that hex digits A-F represent 10-15 βœ“ A=10, B=11, C=12, D=13, E=14, F=15. These are single hex digits, not two-digit numbers. F is 15, not 16.

βœ— Adding binary without carrying when the column sum exceeds 1 βœ“ In binary addition: 0+0=0, 0+1=1, 1+1=10 (0 carry 1), 1+1+1=11 (1 carry 1). You must carry just like in decimal addition.

βœ— Converting binary to hex by converting each bit individually instead of grouping in fours βœ“ Group binary into sets of 4 bits from the right, then convert each group to one hex digit. Converting bit-by-bit gives wrong results.

✍️ Model Answer

Full-Mark Response

Convert the hexadecimal number 3F to binary and then to decimal. Show all working. [3 marks]

Hex to Binary: 3 = 0011 F = 1111 3F = 00111111 Binary to Decimal: 00111111 0Γ—128 + 0Γ—64 + 1Γ—32 + 1Γ—16 + 1Γ—8 + 1Γ—4 + 1Γ—2 + 1Γ—1 = 0 + 0 + 32 + 16 + 8 + 4 + 2 + 1 = 63 So 3F₁₆ = 00111111β‚‚ = 63₁₀

πŸ“Š AO Deep Dive

Assessment Objective Analysis

AO1 (Computational Thinking β€” 40%): Demonstrate knowledge and understanding of the principles and concepts of computer science, including converting between number bases for AQA 8525, OCR J277 & Edexcel 1CP2.

AO2 (Application β€” 40%): Apply knowledge and understanding of computer science, including converting between number bases to analyse problems in computational terms and to design, write and evaluate solutions.

AO3 (Evaluation β€” 20%): Evaluate the effectiveness, correctness and efficiency of computational solutions, including converting between number bases, and make reasoned judgements about trade-offs.

πŸ“ Exam Technique

GCSE Computer Science Exam Tips:
Binary↔Hex: group bits in fours. Pad with leading zeros on the left if needed. Memorise hex values 0-F (0-15). For addition, show carries clearly. For conversions, always show working β€” marks are given for method. Double-check by converting back. Label every answer with the correct base subscript.

πŸ“ Exam Questions by Topic

🎬 Video Resources

Share this page

Ready to ace your GCSE Computer Science exams?

Get the best revision books and guides to boost your grades.