GCSE · Computer Science · OCR · Spec J277
Binary representation of characters
There are no letters inside a computer, only 0s and 1s. So how does it know which letter is which?
Computer Science · Data representation
One row of bits, two readings
Flip the bits and the readout shows the row as a number. Now read the same row as an ASCII character code, using these codes: 84 is capital T, 116 is lower-case t, 65 is capital A, 97 is lower-case a and 48 is the character 0. Whatever row you build, the bits are the same either way. Only the rules you read them with change. This row writes each 7-bit ASCII code with a 0 on the front, so keep the 128 bit at 0.
Computer Science · How many codes?
Every extra bit doubles the codes
Build a 3-bit code one bit at a time. Choose a branch each time and see where you land.
Bit 1 → Bit 2 → Bit 3
Every bit is a two-way choice: 0 or 1.
2 × 2 × 2 = 8 different 3-bit codes, and the tree ends 8 times.
Count the ends as you go: 2, then 4, then 8. That is 2 to the power 1, 2 and 3. With n bits there are 2 to the power n codes. 7 bits give 128 (ASCII), 8 bits give 256 and 16 bits give 65536. The price is that every character then needs that many bits of storage.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
How a computer turns 0s and 1s into letters, digits and symbols.
What you need to know
- Computers use binary, sequences of bits that are each 0 or 1, for all the data and instructions they process.
- A binary sequence can stand for a number, a sound or a letter, as long as you know which one it is meant to be.
Have a goYour friend insists a row of bits is always a number and could never be a letter. Is your friend right?
No. The bits can stand for a number, a sound or a letter, as long as it is identified which one it is meant to be.
The bits carry no meaning of their own, so someone has to say what they represent.
- A character is a single letter, digit, punctuation mark or other symbol.
- A computer stores each character as a binary code: a unique pattern of bits that stands for it.
- A character set is an agreed list of characters, with the binary code given to each one.
- Text only displays correctly if the sender and the receiver use the same character set.
Have a goA text arrives and every letter looks wrong, although the bits were sent perfectly. What might be different about the receiving computer?
It may be using a different character set from the sender.
Different rules turn the same bits into different characters, so both ends must use the same set.
- ASCII uses 7 bits per character, giving 128 codes. It covers English letters in upper and lower case, digits, punctuation marks and control codes.
- ASCII codes run in order: A is 65, B is 66, C is 67, a is 97, the character 0 is 48. Count along for the rest.
Have a goCapital letters run in order and A is 65. Count along the alphabet to work out the code for capital E.
69
E is four letters after A (B, C, D, E), so 65 + 4 = 69. Adding 5 would count A itself as a step, but A is already 65.
- With n bits there are 2 to the power n codes, so more bits per character means more characters, but more storage for each one.
- Unicode uses more bits per character than ASCII, so it has far more codes: many languages, symbols and emojis. Its first 128 codes match ASCII.
The big picture
A computer stores each character as a binary code from an agreed character set, such as ASCII or Unicode. The same bits mean different things under different rules, and more bits per character gives more possible characters at the cost of more storage.
Key points
Worked example
Problem
A computer holds the 8-bit pattern 01000100 and reads it as an ASCII character code. Which capital letter is it? You know that A is 65, B is 66 and C is 67.
⚠ Watch out
Starting from the wrong anchor. Capitals count on from A = 65, lower-case letters from a = 97 and digit characters from 0 = 48. Counting from 65 to find lower-case e gives 69, which is the code for capital E.
Memory hook
Bits are just switches. The character set is the rulebook that says which character a pattern of switches stands for.
Check yourself
If the character 0 is 48, what is the ASCII code for the digit character 5? Then say why the sender and the receiver need the same character set.
Flashcards
(14)What is a bit?
What can one binary sequence stand for?
What is a character?
How does a computer store a character?
What is a character set?
Why must the sender and receiver use the same character set?
How many bits does ASCII use per character, and how many codes is that?
What does ASCII cover?
Which three ASCII codes can you count on from?
Which anchor do you count on from to find the code for lower-case g?
In ASCII, which is lower-case t and which is capital T: 116 or 84?
What does each extra bit do to the number of possible codes?
What is the trade-off of using more bits per character?
How are Unicode and ASCII related?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore OCR GCSE Computer Science topics
How this lesson was checked. This OCR GCSE Computer Science (specification J277)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 14 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.