Question bank › GCSE Computer Science › Fundamentals of data representation

Data compression: Huffman coding & RLE

Answer on paper first, then reveal the mark scheme one mark at a time.

1Grade 8–97 marks

(a) Run length encoding (RLE) represents data as frequency/data pairs. Give the RLE of this bit pattern as frequency/data pairs. [2]

0000000111110000000011

(b) The Huffman tree shown was built for the text ABRACADABRA.

(i) State the Huffman code for the character R. [1]

(ii) Calculate the number of bits needed to store ABRACADABRA using this Huffman code. [2]

(iii) Calculate how many bits are saved compared with storing the text using 7-bit ASCII. [2]

11642A (5)B (2)R (2)C (1)D (1)01010101

Still losing marks on this topic?

Book a free introductory session and we'll find exactly which step is costing you.

Book a free intro