Why computers use binary
Every quantity a computer stores, whether it is text, an image, a sound, or a whole number, is ultimately represented as a pattern of binary digits. This is a direct consequence of the underlying hardware: a transistor is most reliably built to represent one of two stable states, so binary, base two, is the natural fit for electronic circuitry. Decimal, base ten, is what people use day to day; hexadecimal, base sixteen, is used throughout computer science as a compact, human-readable stand-in for binary, because each hexadecimal digit corresponds exactly to four binary digits. Understanding the relationship between these three bases, and being able to convert confidently between them, is the foundation for everything else in this section of the specification. This guide sets out the oxfordaqa igcse computer science data representation: number bases to binary arithmetic content in full, working methodically from the underlying reason binary is used at all, through to the arithmetic operations built on top of it.
Number bases
A number base describes how many distinct digits are available before a new column is needed. Decimal uses ten digits, 0 to 9. Binary uses two digits, 0 and 1. Hexadecimal uses sixteen digits, 0 to 9 followed by A to F, where A represents ten, B represents eleven, and so on up to F, which represents fifteen. A single bit pattern can represent different types of data depending on how it is interpreted: the same eight bits might be read as an integer, as a character, or as part of an image, which is a point worth stating explicitly in an exam answer that asks why binary representation is so central to computing. Hexadecimal exists purely for human convenience rather than for any hardware reason: a processor never actually stores or processes hexadecimal digits, but writing 1111 0000 as F0 is far easier for a person to read, write and check accurately, particularly in longer bit patterns such as memory addresses or colour values, where a string of thirty-two binary digits becomes an unwieldy eight hexadecimal digits instead.
Converting between number bases
You are expected to convert confidently in both directions between binary and decimal, binary and hexadecimal, and decimal and hexadecimal, working with decimal values between 0 and 255. The maximum values you should be fluent with are decimal 255, binary 1111 1111, and hexadecimal FF, so it is worth memorising that trio as a checkpoint for your own working.
Binary to decimal
Each position in a binary number represents a power of two, starting from the rightmost bit. The positions, from right to left across eight bits, are worth 128, 64, 32, 16, 8, 4, 2 and 1. Add together the position values wherever a bit is 1.
Binary: 1011 0110
128 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 182
Decimal to binary
Work from the largest power of two downward, subtracting it from the remaining value whenever it fits, and recording a 1 in that column; record a 0 when it does not fit.
Decimal: 182
128 fits (182-128=54), write 1
64 does not fit, write 0
32 fits (54-32=22), write 1
16 fits (22-16=6), write 1
8 does not fit, write 0
4 fits (6-4=2), write 1
2 fits (2-2=0), write 1
1 does not fit, write 0
Result: 1011 0110
Binary and hexadecimal
Because sixteen is two to the power of four, each hexadecimal digit maps directly onto exactly four binary digits, which makes this conversion faster than going through decimal. Split an eight-bit binary number into two groups of four and convert each group separately.
Binary: 1011 0110
1011 = B (8+0+2+1=11)
0110 = 6 (0+4+2+0=6)
Result: B6
Decimal and hexadecimal
The most reliable route between decimal and hexadecimal is to convert through binary as an intermediate step: decimal to binary, then binary to hexadecimal, or hexadecimal to binary, then binary to decimal. With practice, small values can be converted directly, but using binary as the bridge avoids careless errors under exam pressure.
Units of information
A bit is the fundamental unit of information, and it can only ever hold one of two values, 0 or 1. A byte is a group of eight bits. Beyond the byte, quantities are described using decimal prefixes, and this specification uses powers of ten throughout, not powers of two, so make sure your working matches that convention exactly in an exam answer.
| Prefix | Symbol | Value |
|---|---|---|
| Kilo | kB | 1,000 bytes |
| Mega | MB | 1,000 kilobytes |
| Giga | GB | 1,000 megabytes |
| Tera | TB | 1,000 gigabytes |
Note carefully that lower-case b denotes a bit and upper-case B denotes a byte; this distinction is a favourite small trap in exam questions, and mixing the two up in your own answer will lose marks even when the numerical working is otherwise correct. Historically, kilobyte and megabyte were sometimes used loosely to mean powers of two rather than powers of ten, but for this specification, always work in powers of ten and do not introduce powers of two into your calculations.
Binary arithmetic
Two skills matter here: adding two binary numbers together, and applying a binary shift. Both are restricted to a maximum of eight bits, and answers will never require carrying beyond the eighth bit.
Binary addition
Add binary numbers column by column from the right, exactly as you would add decimal numbers, remembering that 1 + 1 = 10 in binary, which means writing 0 and carrying 1 into the next column.
0100 1101
+ 0001 0110
-----------
0110 0011
Binary shifts
You are expected to understand and use only a logical binary shift, and fractional representations are not required at this level. A logical left shift moves every bit one position to the left, filling the vacated rightmost position with a 0; a logical right shift does the reverse. Shifting left by one position doubles the value the bit pattern represents, and shifting right by one position halves it, which means binary shifts give a fast way to perform simple multiplication or division by powers of two.
Original: 0001 0110 (decimal 22)
Shift left by 1: 0010 1100 (decimal 44)
Worked example: a full conversion chain
Exam questions sometimes ask for a value to be converted through more than one base in a single task, which is a useful way to test whether the underlying method, rather than a memorised shortcut, is properly understood. Take the decimal value 218.
Step 1, decimal to binary: 218 = 128+64+16+8+2 = 1101 1010
Step 2, binary to hexadecimal: 1101 = D, 1010 = A, so 218 = DA
Step 3, check by converting DA back: D=13, A=10, 13x16+10 = 208+10 = 218
Working the conversion in one direction and then checking it in reverse, as the third step does above, is a reliable exam habit: it catches an arithmetic slip before it costs marks, and it takes very little extra time once the underlying method is fluent. The same check-by-reversing habit works equally well for binary addition: once you have added two binary numbers, subtract one of the original values from your answer and confirm the other original value comes back out.
Common mistakes to avoid
- Mixing up the direction of a binary shift, treating a left shift as if it divided the value rather than multiplied it.
- Using powers of two when the specification requires powers of ten for kilo, mega, giga and tera prefixes.
- Writing a lower-case b when a byte, upper-case B, was intended, or the reverse.
- Forgetting to carry correctly during binary addition, particularly across several consecutive columns of 1s.
- Converting decimal to hexadecimal directly and making an arithmetic slip, rather than using binary as a safer intermediate step.
Self-check questions
- Convert the binary number 1100 1010 to decimal.
- Convert the decimal number 201 to binary.
- Convert the binary number 1111 0000 to hexadecimal.
- Add the binary numbers 0010 1101 and 0001 0011.
- Apply a logical left shift of one position to 0000 1101, and state the decimal value before and after the shift.
This part of the specification rewards methodical, repeated practice more than any other, because the underlying arithmetic is the same each time; only the numbers change. These oxfordaqa igcse computer science revision notes on data representation: number bases to binary arithmetic are designed to be worked through with a pencil, not merely read, since the conversions only become fast through repetition. Students preparing igcse 9210 data representation: number bases to binary arithmetic material should expect this topic to appear in combination with later data representation content on character encoding and images, so fluency here pays dividends across the whole data representation section, not just within this one guide.
Where this leads next
Once conversion between binary, decimal and hexadecimal feels automatic, and binary addition and shifts no longer require conscious effort, you are ready for the companion guide covering character encoding, images, sound and data compression, all of which build directly on the units of information and binary representation established here. Anyone reviewing data representation: number bases to binary arithmetic oxfordaqa igcse content should treat this page as reference material to return to before attempting any calculation-heavy oxfordaqa igcse computer science practice questions, since a small error in a basic conversion tends to cascade through an entire calculation. Consider every rule above oxfordaqa igcse computer science explained with a full worked example, precisely so nothing here needs to be taken on trust; work through each one by hand until the underlying arithmetic feels entirely routine, and keep this page among your core oxfordaqa igcse computer science notes for the data representation section as a whole.
Oxfordaqa igcse computer science data representation: number bases to binary arithmetic, with conversion methods and worked calculations.
Maoni