Paper 1 · Unit 1. Number representations, multimedia and compression: calculations here are reliable marks.

1. Binary and decimal prefixes

Decimal prefixes go up in powers of 10; binary prefixes go up in powers of 2. Storage is often sold in decimal units, but computers measure in binary units, which is why a “1 TB” drive shows less than 1 TiB.

Decimal prefixValueBinary prefixValue
kilo (kB)10³ = 1000 byteskibi (KiB)2¹⁰ = 1024 bytes
mega (MB)10⁶ bytesmebi (MiB)2²⁰ = 1 048 576 bytes
giga (GB)10⁹ bytesgibi (GiB)2³⁰ = 1 073 741 824 bytes
tera (TB)10¹² bytestebi (TiB)2⁴⁰ bytes

2. Number systems and representations

RepresentationHow it worksExample (8 bits)
Unsigned binaryBase 2; positive whole numbers only, 0 to 25546 = 0010 1110
HexadecimalBase 16; one hex digit = 4 bits46 = 2E
One’s complementNegative = invert every bit of the positive value; range −127 to +127, with two zeros−46 = 1101 0001
Two’s complementMost significant bit is negative (−128); negative = invert and add 1; range −128 to +127−46 = 1101 0010
BCDEach denary digit stored separately in 4 bits46 = 0100 0110

Try it: one number, every representation

3. Binary addition, subtraction and overflow

Add binary numbers column by column, carrying 1 when a column totals 2 or 3. To subtract, add the two’s complement of the number being subtracted: 20 − 7 = 20 + (−7) = 0001 0100 + 1111 1001 = 0000 1101 (13), ignoring the final carry out.

Overflow happens when a result is too large (or too negative) to be stored in the available bits. In two’s complement it shows when adding two positives gives a negative result, or two negatives give a positive result: for example 100 + 50 = 150, which is outside −128 to +127.

4. Uses of BCD and hexadecimal

  • BCD: digital displays such as clocks and calculators, where each digit is shown separately; financial and banking systems, where denary values such as currency must be stored exactly without rounding errors.
  • Hexadecimal: memory addresses and dumps, HTML/CSS colour codes, MAC addresses, error codes. It is shorter than binary and easier for people to read and check.

5. Character sets

Character setBits per characterCharactersNotes
ASCII7128English letters, digits, punctuation and control codes
Extended ASCII8256Adds accented letters and symbols
UnicodeUp to 32 (variable, e.g. UTF-8)Over a millionEvery writing system and emojis; the first 128 codes match ASCII

Character codes are consecutive, so ‘B’ is one more than ‘A’. You do not need to memorise any codes.

6. Bitmap images

A bitmap is a grid of pixels; each pixel’s colour is stored as a binary value. The file header stores data about the image, such as its width, height, colour depth and file type.

TermMeaning
Image resolutionThe number of pixels in the image (width × height)
Screen resolutionThe number of pixels a screen can display
Colour depth / bit depthThe number of bits per pixel: n bits give 2ⁿ colours

File size (bits) ≈ width × height × colour depth, plus the header. Increasing resolution or colour depth improves quality but increases file size.

7. Vector graphics

A vector graphic stores an image as a drawing list: a set of commands that define drawing objects (lines, circles, rectangles, text). Each object has properties, such as position, size, line colour, fill colour and line thickness.

Use a bitmap when…Use a vector when…
The image is a photograph or has complex colour changesThe image is made of shapes, e.g. a logo, diagram or icon
Every pixel needs to be editedIt must be resized without losing quality
A small file is needed for a simple image

8. Sound

Sound is an analogue wave. To store it, an analogue-to-digital converter samples the amplitude at regular intervals.

  • Sampling rate: the number of samples per second (Hz). Higher = more accurate, larger file.
  • Sampling resolution: the number of bits per sample. Higher = more accurate amplitude, larger file.

File size (bits) = sampling rate × sampling resolution × length (s) × channels.

Try it: file size calculator

Bitmap image

Sound file

9. Compression

LossyLossless
HowPermanently removes data that is less noticeableReduces size without losing any data; the original is rebuilt exactly
ExamplesJPEG photos, MP3 audio, streamed videoRLE, PNG, ZIP, FLAC audio
Use whenSmall files matter more than perfect quality, e.g. streamingEvery bit must be kept, e.g. text, program files, medical images

How each type of file can be compressed

  • Text: lossless only, e.g. RLE for repeated characters, or replacing repeated words with shorter codes (dictionary coding).
  • Bitmap: RLE stores runs of the same colour as a count and a colour; lossy methods reduce resolution or colour depth, or remove detail the eye won’t notice.
  • Vector: simplify the drawing list, e.g. fewer objects or fewer points, and remove redundant properties.
  • Sound: lossy perceptual coding removes sounds humans cannot hear or that are masked by louder sounds; or reduce sampling rate or resolution. Lossless formats such as FLAC keep all data.

RLE example: the pixel row WWWWWWBBBWW can be stored as 6W 3B 2W.

10. Examiner tips

  1. Kibi vs kilo: use 1024 for KiB, MiB…, and 1000 for kB, MB…. Read which one the question uses.
  2. Show your working in conversions and file-size calculations; method marks are available.
  3. Two’s complement subtraction: add the negative; ignore the final carry out of the 8th bit.
  4. Explain overflow in terms of the result needing more bits than are available.
  5. BCD is not binary: 46 in BCD is 0100 0110, not 0010 1110.
  6. Vector answers: use the words drawing list, drawing object and property.
  7. Justify the compression method for the situation, e.g. lossless for a text file because no data may be lost.
  8. Remember the file header when asked what a bitmap file contains.

11. Practice questions

Practice: answer and check instantly

Type a short answer, then press Check or Enter.

Show answer

1024 = 2¹⁰.

Show answer

1000 = 10³.

Show answer

0100 0111: 4 → 0100, 7 → 0111.

Show answer

1111 1011: 5 = 0000 0101, invert → 1111 1010, add 1.

Show answer

1111 1010: invert every bit of 0000 0101.

Show answer

1000 × 500 × 16 = 8 000 000 bits ÷ 8 = 1 000 000 bytes.

Show answer

A vector graphic.

Show answer

Lossless.

Exam-style questions

9. A company logo will be printed on business cards and on a large banner. Explain why it should be stored as a vector graphic. [3]

Show mark guide

Stored as drawing objects with properties in a drawing list [1] · can be scaled to any size without losing quality/pixelating [1] · small file size for a simple image made of shapes [1].

10. A 60-second stereo recording uses a sampling rate of 44 100 Hz and a sampling resolution of 16 bits. Calculate the file size in MiB. Show your working. [3]

Show mark guide

44 100 × 16 × 60 × 2 = 84 672 000 bits [1] · ÷ 8 = 10 584 000 bytes [1] · ÷ 1 048 576 ≈ 10.09 MiB [1].

12. Topic test: predict your grade

Topic test: predict your grade

15 questions, about 10 minutes. Answer them all, then press Mark my test.

1. How many bytes are in 1 MiB?
2. What is the range of 8-bit two’s complement?
3. How is −1 stored in 8-bit two’s complement?
4. What is a disadvantage of one’s complement?
5. How is 93 stored in BCD?
6. Where is BCD commonly used?
7. To subtract in binary using two’s complement, you…
8. When adding two positive numbers in two’s complement gives a negative result, this is…
9. How many characters can extended ASCII represent?
10. What does a bitmap file header contain?
11. Doubling the colour depth from 8 to 16 bits makes the file…
12. A vector graphic is best for…
13. What is the sampling rate?
14. Which is lossy compression?
15. Which should a text file use?

Frequently asked questions

How do you convert a denary number to two’s complement?

Write the positive value in binary, then invert every bit and add 1. For example, -5 in 8 bits is 11111011.

What is the difference between a kibibyte and a kilobyte?

A kibibyte (KiB) is 1024 bytes, using powers of 2. A kilobyte (kB) is 1000 bytes, using powers of 10.

What is the difference between bitmap and vector graphics?

A bitmap stores the colour of every pixel, so it loses quality when enlarged. A vector graphic stores shapes as drawing objects and properties, so it scales without losing quality.

Was this page helpful?