This module covers how a computer stores numbers and text using only 0s and 1s. You will convert between binary and denary, use hexadecimal as a shorter way to write binary, add binary numbers and spot overflow, read a character code table, and work out how many different values a given number of bits can hold.
Check the current Cambridge Computer Science 0478 syllabus for the content points in your exam year, and read which years your syllabus covers if you are unsure. Our Computer Science learning guide shows where this module sits among the others.
What should you already know?
You need to be comfortable with powers of 2 up to 128 and with adding and subtracting whole numbers. If 2, 4, 8, 16, 32, 64, 128 does not yet roll off your tongue, learn that list first, because every lesson uses it.
An orienting example
How does a computer store the word Hi?
Step 1, find the character codes. In ASCII, A is 65 and a is 97. H is the 8th letter, so H = 65 + 7 = 72. The letter i is the 9th letter, so i = 97 + 8 = 105.
Step 2, convert to binary. 72 = 64 + 8, so 72 is 01001000. And 105 = 64 + 32 + 8 + 1, so 105 is 01101001.
Step 3, write each byte in hexadecimal. Split into nibbles: 0100 1000 is 4 and 8, so 48. Then 0110 1001 is 6 and 9, so 69.
So “Hi” is stored as the bytes 01001000 01101001, which a programmer writes as 48 69. One small example touched every lesson in this module.
In what order should you study the lessons?
- Convert between binary and denary: the base skill. Everything else leans on place values.
- Use hexadecimal as a compact representation: builds directly on binary by grouping bits in fours.
- Add binary values with overflow awareness: uses your binary fluency and explains why a fixed number of bits has a limit.
- Explain character encoding from a supplied example: shows that text is stored as numbers, using the same binary skills.
- Relate bit depth to possible representations: turns the limit from the addition lesson into a rule you can apply to colours, characters and more.
Then test the whole module with the mixed practice set.
What are the common traps?
- Reading place values from the wrong end. The right-most bit is worth 1, not the left-most.
- Grouping hex from the left. Always group from the right, padding the left with zeros.
- Forgetting the carry when three 1s meet. 1 + 1 + 1 = 11 in binary: write 1, carry 1.
- Confusing a character with its value. The character ‘7’ is stored as code 55, not as the number 7.
- Saying n bits give n values. They give 2n values.
How should you use the practice set?
Do the questions on paper first and show every step, the same way you would in an exam. Open an answer only after you have written yours. When one is wrong, the practice page tells you which lesson to revisit, and you can record the error in the mistake log so you retest it later.
You can check conversions in the Python reasoning sandbox, and tracing questions in the pseudocode trace trainer, but do the paper working first so the sandbox confirms your method rather than replacing it.
Students who like to be shown where their own working breaks often find this module a good place to start online one-to-one Computer Science tuition.