IGCSE Computer Science
Chapter 1 – Data Representa on (Coaching Notes)
1. Number Systems
➤ 1.1 Binary Representa on
Binary system uses two digits: 0 and 1.
Computers use binary because their internal circuits operate in two states: ON (1)
and OFF (0).
➤ 1.2 Denary, Binary and Hexadecimal
➤ 1.3 Conversion Methods
Denary → Binary
Divide by 2, record remainders, reverse the order.
Binary → Denary
Mul ply each bit by 2ⁿ, add them up.
Binary ↔ Hexadecimal
Group binary digits in 4s → convert each group using hex chart.
Denary ↔ Hexadecimal
Divide by 16 for denary to hex, mul ply and sum for hex to denary.
➤ 1.4 Why Hexadecimal?
Easier to read and write than binary
Commonly used in:
o Memory addresses
o Colour codes in web design
o Error messages
➤ 1.5 Binary Addi on (8-bit Posi ve Numbers)
Rules:
0+0=0
0+1=1
1 + 1 = 10 → write 0, carry 1
1 + 1 + 1 = 11 → write 1, carry 1
Example:
01001100
+ 00111010
-----------
10000110
➤ 1.6 Overflow
Occurs when the sum exceeds the maximum 8-bit value (255).
Example:
11111111 + 00000001 = 1 00000000 → overflow (9 bits)
➤ 1.7 Logical Binary Shi s
Example:
Le shi 00001101 → 00011010
➤ 1.8 Two's Complement (Posi ve + Nega ve Integers)
Used to represent nega ve numbers in binary.
Steps to represent -n:
1. Write binary of n
2. Invert all bits (1's complement)
3. Add 1 → gives nega ve in two’s complement
Example:
+5 = 00000101
→ Invert = 11111010
→ Add 1 = 11111011 = -5
2. Text, Sound and Images
➤ 2.1 Text Representa on
Characters are represented using character sets.
Each character has a unique binary code.
Types of Character Sets:
ASCII: 7-bit, 128 characters
Unicode: 16+ bits, supports global languages
Example:
'A' in ASCII = 65 → 01000001
➤ 2.2 Sound Representa on
Sound is analogue; it is sampled to become digital.
Sample Rate: No. of samples per second (Hz)
Sample Resolu on: Bits per sample
More sampling = be er quality, but larger file size
➤ 2.3 Image Representa on
An image is made of pixels.
Each pixel stores a colour using binary.
Key Terms:
Resolu on: Number of pixels (width × height)
Colour Depth: Bits per pixel
Higher resolu on & depth → be er quality + bigger file
3. Data Storage & Compression
➤ 3.1 Measuring Data
➤ 3.2 File Size Calcula ons
Image File Size (in bits):
= width × height × colour depth
Sound File Size (in bits):
= sample rate × sample resolu on × me × channels
➤ 3.3 Data Compression
Why compress?
Reduces file size
Saves storage & bandwidth
Sample Quick Ques ons
1. What is the binary of 25? → 00011001
2. What causes overflow? → Sum > 255 (8-bit limit)
3. ASCII or Unicode: which is be er for emojis? → Unicode
4. What is 1111 in hex? → F
5. File size of a 100×100 image, 8-bit depth? → 100×100×8 = 80000 bits = 10KB