EXAM QUESTIONS · IGCSE 0478
Data Representation Exam-Style Questions with Answers (IGCSE 0478)
Original exam-style questions on binary, hexadecimal, binary addition and overflow, logical shifts, two’s complement, file sizes and compression for Cambridge IGCSE Computer Science 0478 (Paper 1). There are 30 marks in total. Type your answer and press Check on the calculation questions, then press Show answer to see the mark scheme. No calculator – just like the real exam.
Convert the 8-bit binary number 1011 0110 to denary.
Show answer
182 [1]
128 + 32 + 16 + 4 + 2 = 182
Convert the denary number 75 to 8-bit binary.
Show answer
0100 1011 [1]
75 = 64 + 8 + 2 + 1
A memory location holds the hexadecimal value 3C.
- Convert 3C to 8-bit binary. [1]
- Convert 3C to denary. [1]
Show answer
- 0011 1100 (3 = 0011, C = 1100) [1]
- 60 (3 × 16 + 12 × 1) [1]
Give two reasons why programmers often use hexadecimal instead of binary.
Show answer
Any two from: [2]
- Hexadecimal is shorter, so it takes up less space on screen and in documents.
- It is easier for humans to read and remember.
- There is less chance of making a mistake when reading or copying it.
- It converts easily to binary, because each hex digit is exactly 4 bits.
Two 8-bit binary numbers are added together:
1011 0110 + 0110 1001
- Give the 8-bit result of the addition. [2]
- Explain the problem that occurs with this addition. [2]
Show answer
- 0001 1111 [2] (1 mark for correct working with carries, 1 mark for the correct 8-bit result)
- An overflow error occurs. [1]
- The answer is 287, which is larger than 255, the largest value that fits in 8 bits, so the 9th bit is lost and the stored result is wrong. [1]
The binary number 0010 1100 is shifted two places to the left (logical shift).
- Write the result. [1]
- State the effect of the shift on the denary value. [1]
Show answer
- 1011 0000 [1]
- It multiplies the number by 4 (44 becomes 176). [1]
- Convert −45 to an 8-bit two’s complement binary number. [2]
- Convert the 8-bit two’s complement number 1110 1100 to denary. [1]
Show answer
- 1101 0011 [2]
45 = 0010 1101 → flip the bits: 1101 0010 → add 1: 1101 0011 - −20 [1]
−128 + 64 + 32 + 8 + 4 = −20
An image is 800 pixels wide and 600 pixels high. It has a colour depth of 16 bits.
Calculate the file size of the image in kibibytes (KiB). Show your working.
Show answer
937.5 KiB [3]
- 800 × 600 × 16 = 7 680 000 bits [1]
- ÷ 8 = 960 000 bytes [1]
- ÷ 1024 = 937.5 KiB [1]
A mono sound clip is 10 seconds long. It is recorded with a sample rate of 8000 Hz and a sample resolution of 8 bits.
- Calculate the file size in bytes. Show your working. [2]
- Explain the effect of increasing the sample resolution. [2]
Show answer
- 80 000 bytes [2]
8000 × 10 × 8 = 640 000 bits [1], ÷ 8 = 80 000 bytes [1] - More bits are used to store each sample, so the sound is recorded more accurately / sounds closer to the original. [1]
- The file size increases. [1]
Compare lossy and lossless compression. Give an example of a file type where each would be suitable.
Show answer
Any four from: [4]
- Lossy compression permanently removes data; lossless compression does not remove any data.
- With lossy compression the original file cannot be restored; with lossless it can be restored exactly.
- Lossy usually gives a smaller file size.
- Lossy is suitable for photos, music or video (e.g. JPEG, MP3), where small losses are not noticed.
- Lossless is needed for text, program files or spreadsheets, where every bit must be kept (e.g. RLE, ZIP).
Run-length encoding (RLE) is used to compress the text AAAABBBCCD.
Show the compressed data and explain how RLE reduces the file size.
Show answer
- 4A 3B 2C 1D (or 4 A 3 B 2 C 1 D) [1]
- Each run of the same character is stored once with a count of how many times it repeats, so fewer values are stored. [1]
Explain why Unicode is used instead of ASCII in many modern programs.
Show answer
- ASCII uses 7 or 8 bits, so it can only represent a small number of characters (128 / 256). [1]
- Unicode uses more bits per character, so it can represent characters from many more languages, as well as symbols and emojis. [1]
Frequently asked questions
Can I use a calculator in IGCSE Computer Science?
No. Calculators are not allowed in either 0478 paper, so binary conversions and file size calculations must be done by hand.
How do you calculate an image file size?
Multiply the width in pixels by the height in pixels by the colour depth in bits, then divide by 8 to get bytes and by 1024 for KiB.
Are these past paper questions?
No. These are original exam-style questions written by a Computer Science teacher in the Cambridge style.
Revise the topic: IGCSE data representation notes · Binary to denary guide · File size calculations guide · Binary game · All exam-style questions