/en-tutor-prep-alevel-computer-science-data-representation/
/en-tutor-prep-alevel-computer-science-data-representation/
General Inquiry: info@TutorZone.com.hk
Office Hours: Monday to Saturday - 9:00 AM to 6:00 PM
WhatsApp Monday to Sunday - 24 hours
Hotline: +852 6828 1809
Instant Support: +852 9061 3106

A-Level Computer Science: Information Representation — Prefixes, Number Bases, Two Complement, Overflow and Character Sets (lesson-prep guide for tutors)

A-Level Computer Science: Information Representation — Prefixes, Number Bases, Two Complement, Overflow and Character Sets (lesson-prep guide for tutors)

  • 2026-11-26

Students think a 2 TB drive is short-changing them, think BCD is just another notation, and think two complement is a chant. This chapter uses five sets of checkable numbers to link prefixes, number bases, BCD, complements and character sets: one byte string, several meanings.

Objectives — Students can: (1) state that kibi is two to the ten and kilo is ten cubed, then show a 2 TB drive holding 1.819 TiB, which is 9.05 per cent short, and 17,179,869,184 bytes of memory reading as 17.18 GB in decimal; (2) convert across binary, denary and hexadecimal, writing 181 as 10110101 and B5, showing CA5 as 3237, and showing that 12 address lines give 4,096 addresses with FFF as the highest; (3) write 47 in BCD as 0100 0111 and correct an unadjusted 3D to 43 for 28 plus 15; (4) write plus five as 00000101 and minus five as 11111011 in eight-bit two complement, give the range as -128 to 127, and show 9 minus 5 as 00000100, 5 minus 9 as 11111100 or minus four, and 100 plus 100 as 11001000, which is overflow; (5) state that ASCII has 128 codes, extended ASCII 256 and Unicode 1,114,112 code points, then show 400 letters with 100 Chinese characters at 700 bytes in UTF-8 and 1,000 in UTF-16.

01 Prerequisites (3-minute check)

If any of these fails, fix it before the lesson starts.

Skill Quick check Pass mark
Powers of two What is two to the ten? 1024; know them up to two to the twenty
Binary place values What is 1011? Eleven, from eight plus two plus one
Hex digits What do A to F stand for? Ten to fifteen; one hex digit is four bits
Negative numbers How does a computer store a negative number? In complement form, because the circuit only knows 0 and 1
Character codes What is the ASCII code for A? 65, and lower case a is 97

02 Lesson flow (60 minutes)

Time Stage Tutor does Student does
0-8 min Opening check Ask why a 2 TB drive reads 1.82 TB and how a negative number is written in 0 and 1 Name the two prefix systems and complements
8-20 min Prefixes and bases Two prefix systems, four number bases, address lines and address space Calculate 1.819 TiB and 4,096 addresses
20-32 min BCD and the plus-six fix One decimal digit per nibble, an invalid nibble needs six added Correct 3D to 43
32-46 min Two complement One complement, two complement, range, subtraction as addition Calculate minus four and 00000100
46-54 min Overflow and character sets Same-sign addition with a different-sign result is overflow; byte counts in ASCII and Unicode Calculate 700 against 1,000
54-60 min Exit check Three questions, set the homework Work independently

03 Teaching script (read it out)

Scene 1: Two prefix systems, one number, two capacities

Put the two capacities side by side. A 2 TB drive is sold as 2,000,000,000,000 bytes, and the system reports 1.819 TiB, which looks 9.05 per cent short. On the other hand, a board with 16 GiB of memory holds 17,179,869,184 bytes, which reads as 17.18 GB in decimal, which looks 7.37 per cent larger.
Neither number is wrong, there are two prefix systems. Kilo is ten cubed, 1000; mega is ten to the six; giga ten to the nine; tera ten to the twelve. Kibi is two to the ten, 1024; mebi two to the twenty; gibi two to the thirty; tebi two to the forty. Drive makers sell in decimal, the operating system reports in its own binary habit, so one pile of bytes has two readings.
Make students divide once themselves: 2,000,000,000,000 over two to the forty is 1.819. Then fix the industry convention: memory, cache and the operating system use kibibytes and gibibytes, while drive capacity and network bandwidth use kilobytes and gigabytes. When an exam asks for the difference, the answer is a percentage, not a rough figure.
Student task: how many GiB does a 512 GB drive report?

A sentence you can read aloud: The same byte string gives two answers under decimal and binary prefixes, so 512 GB reads as 476.84 GiB.

Scene 2: Number bases: one byte, three spellings

Four place values at a time are enough: 128, 64, 32, 16, 8, 4, 2, 1. 181 is 10110101, from 128 plus 32 plus 16 plus 4 plus 1.
Hexadecimal exists because one hex digit is exactly four bits, so one byte is exactly two hex digits. Split 10110101 down the middle into 1011 and 0101, which is B5. Reverse it: hex CA5 is C times 256 plus A times 16 plus 5, which is 3237.
Then addresses. 12 address lines give two to the 12, which is 4,096 locations, numbered from zero, so the highest is FFF and the next free address is 1000. This is where students slip: the space is 4,096 but the highest address is 4,095.
Finish with why papers like hexadecimal: 10110101 is eight digits to count, B5 is two, and an error is visible at a glance. That abbreviation is the practical use of hex.
Student task: write denary 200 in binary and in hex.

A sentence you can read aloud: 200 is 11001000 and also C8, the same bits under a different lens.

Scene 3: BCD: what a display actually needs

The BCD rule is simple: each decimal digit gets one nibble, four bits. 47 becomes 0100 0111, four and then seven. Plain binary needs only 00101111. Both take eight bits, but only 100 byte values are legal BCD, zero to ninety-nine, which is 100 over 256 or 39.1 per cent, so the rest is waste.
So why use it? Because displays and counting need each decimal digit. Seven-segment displays, calculators, digital clocks, tills and money all use BCD: decoding is direct, and decimal fractions such as 0.1 never round off the way they do in binary.
The lesson is addition. For 28 plus 15 the nibbles add to 3D, and the low nibble is D, that is thirteen, not a legal decimal digit. The fix is to add six to the low nibble: D plus six carries, giving 43, read as 43, which matches 28 plus 15. Now 59 plus 1 gives 5A, the low nibble A plus six becomes 60, which is 60.
Students should hold one condition: any nibble above nine gets six added, and one is carried to the next nibble.
Student task: add 47 and 38 in BCD, writing the unadjusted and the corrected result.

A sentence you can read aloud: BCD is not another number system, it moves each decimal digit into four bits, so every addition must be checked for a nibble above nine.

Scene 4: Two complement: turn subtraction into addition

Start with one complement: flip every bit, so plus five is 0101 and minus five is 1010. It has two zeros, 0000 and 1111, so the circuit needs an extra step. Two complement is flip and add one: minus five becomes 1011, and zero is single.
The eight-bit range is minus 128 to plus 127. The usual question is why not minus 127: because the pattern 10000000 has no partner among the positives, so it is given to minus 128.
Subtraction becomes addition: 9 minus 5 is 9 plus minus five, 00001001 plus 11111011, giving 1 00000100; drop the carry and the answer is 00000100, which is four. And 5 minus 9 is 00000101 plus 11110111, giving 11111100; the leading one means negative, flip and add one for 00000100, so the answer is minus four.
Then overflow. In eight bits, 100 plus 100 gives 01100100 plus 01100100, which is 11001000; read as signed that is minus 56, so two positives produced a negative, which is overflow. Reverse it: minus 100 plus minus 100 gives 1 00111000, and after dropping the carry 00111000 is plus 56, so two negatives produced a positive, also overflow.
One test only: two operands of the same sign giving a result of the opposite sign is overflow, and whether the addition itself carried out is irrelevant.
Student task: work 60 minus 75 in eight-bit two complement, writing both addends and the result.

A sentence you can read aloud: Two complement turns subtraction into addition, and overflow is judged by signs, not by carries.

Scene 5: Character sets: one letter, how many bytes

ASCII uses seven bits, so 128 codes: A is 65, a is 97, the digit zero is 48. Upper and lower case differ by 32, which is exactly bit six changing from 0 to 1, so students can see case in binary. Extended ASCII uses eight bits for 256 codes and adds accented European letters.
The problem is size: Chinese, Japanese and Arabic do not fit. Unicode gives each character a code point from 0 to 10FFFF, which is 1,114,112. Storage has several encodings; UTF-8 is variable, one byte for an English letter, three for a Chinese character and four for some emoji, while UTF-16 uses two bytes for most characters.
Put a file on the board: 400 English letters plus 100 Chinese characters is 400 plus 300, so 700 bytes in UTF-8, and 500 times 2, so 1,000 bytes in UTF-16. The same text differs by 300 bytes.
Name two real consequences: the wrong encoding produces garbled text, and storage or transfer cost is counted in bytes, not in characters.
Student task: 1,000 English letters plus 200 Chinese characters, how many bytes in UTF-8 and in UTF-16?

A sentence you can read aloud: ASCII is one byte per character, Unicode is one code point in several bytes, so a character count is not a byte count.

04 Question types and worked steps

Type Example Steps Answer
Prefix conversion A 2 TB drive and 16 GiB of memory Divide by powers of ten for decimal, powers of two for binary 1.819 TiB, 9.05 per cent short; 17.18 GB, 7.37 per cent larger
Base conversion Binary 10110101 Split into groups of four, one hex digit each B5, which is 181
Address space 12 address lines Two to the number of lines, minus one for the highest address 4,096 addresses, highest FFF
BCD addition 28 plus 15 Add nibbles, add six and carry wherever a nibble exceeds nine 3D corrected to 43, that is 43
Two complement subtraction 5 minus 9 Add the complement, drop the carry, flip and add one for the magnitude 11111100, that is minus four
Overflow 100 plus 100 Same-sign operands with an opposite-sign result 11001000, which is minus 56 as signed, so overflow
Character set size 400 English letters plus 100 Chinese characters Count bytes per encoded character, not characters times a constant 700 bytes in UTF-8 and 1,000 in UTF-16
Sanity check (teach this): Four checks. First, the prefix gap always points the same way: decimal prefixes give the larger number, so a drive looks smaller and memory looks larger, and both come from 1000 against 1024. Second, the BCD fix applies only when a nibble exceeds nine: 28 plus 15 gives D and needs it, while 12 plus 13 gives 0x25 and needs nothing. Third, every complement subtraction should be checked backwards by flipping and adding one: 11111100 flips to 00000011 and adds one to 00000100, which is the gap between nine and five. Fourth, byte counts follow the encoding, not a constant: UTF-8 is not always two bytes, and estimating by characters times two is off by 300 bytes here.

05 Independent practice (3 questions)

Question Answer What to watch
How many GiB does a 512 GB drive report? Separately, how many addresses does a processor with 24 address lines have, and what is the highest address in hex? 476.84 GiB; 16,777,216 addresses, highest FFFFFF, next free 1000000 Divide decimal by powers of two; subtract one for the highest address
Add 47 and 38 in BCD, writing the unadjusted and the corrected byte, and say why six is added. Unadjusted 7F; the low nibble F is above nine, so add six for 85, that is 85 A nibble above nine needs six and a carry, because decimal carries there and binary does not
Work 60 minus 75 in eight-bit two complement, writing the complement of the subtrahend and the result, and say whether it overflows. Minus 75 is 10110101, 60 is 00111100, so the sum is 11110001, that is minus 15; the operands differ in sign, so there is no overflow Subtraction becomes addition, and mixed signs never overflow

06 Common mistakes and what to say

Mistake Student writes Say this
Treating KiB as KB Saying a 2 TB drive is 2,000,000,000,000 bytes and the system is wrong The system divides by two to the forty for 1.819 TiB; both readings are right, only the prefixes differ.
Adding BCD without the fix Writing 3D for 28 plus 15 The low nibble is D, so add six for 43, which is 43; otherwise it reads as three and thirteen.
Reading 11111100 as 252 Saying 5 minus 9 is 252 The leading one means a signed negative; flip and add one for four, so the answer is minus four.
Multiplying characters by a fixed byte count Saying 500 characters is 500 or 1,000 bytes Count per encoding: 400 letters with 100 Chinese characters is 700 bytes in UTF-8.

07 Homework (paper, section and question numbers)

08 Exit check (last 5 minutes)

Question Answer Decision
One rule Any BCD nibble above nine gets six added and one carried Saying only that BCD is decimal means scene three must be redone
One number 2 TB is 1.819 TiB Saying about two TB means scene one must be redone
One test Same-sign operands with an opposite-sign result is overflow Saying a carry means overflow means scene four must be redone

09 Tutor FAQ

Why does a 2 TB drive read 1.82 TB in the system?

Two prefix systems. The box uses decimal, so 2 TB is 2,000,000,000,000 bytes; the system uses binary, so the same bytes over two to the forty give 1.819 TiB. Nobody is lying, the units differ, and the whole 9.05 per cent gap comes from 1000 against 1024.

When must BCD be used instead of plain binary?

When each decimal digit has to be displayed or counted: seven-segment displays, calculators, digital clocks, tills and money. Plain binary would need a decimal conversion every time, and fractions such as 0.1 do not terminate in binary, so displays drift.

Does Unicode always take more space than ASCII?

No. UTF-8 still uses one byte for ASCII characters and only two to four for non-ASCII. Here 400 letters with 100 Chinese characters take 700 bytes, about 1.4 bytes a character, against 1,000 bytes in UTF-16.

Find a tutor — freeTutor Registration →

A TutorZone lesson-prep guide. Written by the TutorZone team; questions and lesson flow are original and are not taken from any school or publisher material.

Join as a tutor or coach — academic, music, sports, arts, STEM. Free to register. See how it works →