Topic 1 of 8 · Form 2
Data representation
Binary (base 2), denary (base 10) and hexadecimal (base 16); converting between them; binary addition and overflow; logical binary shifts (left shift multiplies by 2; right shift divides by 2); two's complement for negative integers (8-bit range −128 to 127).
Notes for this topic 1 file, in order
Create a free account to download PDFs.
Number systems
Binary (base 2), denary (base 10) and hexadecimal (base 16); converting between them; binary addition and overflow; logical binary shifts (left shift multiplies by 2; right shift divides by 2); two's complement for negative integers (8-bit range −128 to 127).
Worked example: Convert 10110111 to denary and hexadecimal.
128 + 32 + 16 + 4 + 2 + 1 = 183; 1011 = B, 0111 = 7 → B7
Uses of hexadecimal
Colour codes in HTML, MAC addresses, memory dumps and error codes – easier for humans to read than binary.
Text, sound and images
- Character sets: ASCII and Unicode.
- Sound: sample rate and sample resolution; file size = sample rate × resolution × duration.
- Images: pixels, resolution and colour depth; file size = width × height × colour depth.
Worked example: Calculate the file size in KiB of a 640 × 480 image with 8-bit colour depth.
640 × 480 × 8 = 2 457 600 bits = 307 200 bytes = 300 KiB
Data storage and compression
Units: bit, nibble, byte, KiB, MiB, GiB, TiB (1 KiB = 1 024 bytes). Lossy (JPEG, MP3) and lossless (run-length encoding) compression.
Check yourself
- Convert 45 to 8-bit binary.
- What is the effect of a logical left shift of two places on 00010101?
- Give one advantage of lossless compression.
Show answers
- 00101101
- 01010100 (the value is multiplied by 4: 21 → 84)
- No data is lost, so the original file can be fully restored.
Questions about this topic (0)
No questions about this topic yet.
Sign in or create a free account to join in.