You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson provides exam-style practice for the Data Representation topic of OCR J277 Paper 1 (Computer Systems). Data representation questions are a staple of Paper 1 and test your ability to convert between number systems, calculate file sizes, and explain encoding and compression.
| Question type | Typical marks | Skills tested |
|---|---|---|
| Number system conversions | 1-3 | Binary, denary, hex conversions |
| Binary addition | 2-3 | Adding two 8-bit numbers, identifying overflow |
| Binary shifts | 2-3 | Left/right shifts, stating effect on value |
| File size calculation (image) | 3-4 | Using width x height x colour depth formula |
| File size calculation (sound) | 3-4 | Using sample rate x bit depth x duration formula |
| ASCII/Unicode comparison | 2-4 | Explaining differences, advantages, disadvantages |
| Compression explanation | 3-6 | Lossy vs lossless, RLE, Huffman coding |
| Unit conversions | 1-2 | Converting between bits, bytes, KB, MB, etc. |
mindmap
root((Data Representation Paper 1))
Number Systems
Binary to Denary
Denary to Binary
Hex Conversions
Arithmetic
Binary Addition
Logical Shifts
Overflow
Encoding
ASCII
Unicode
File Sizes
Image WxHxD
Sound RxBxTxC
Compression
Lossy
Lossless
RLE
Huffman
Units
Bit Byte KB MB GB
Convert the binary number 11010110 to denary.
128 + 64 + 16 + 4 + 2 = 214
Convert the denary number 189 to hexadecimal.
Method: Convert to binary first.
Answer: BD
Alternative: 189 / 16 = 11 remainder 13. 11 = B, 13 = D. Answer: BD
Add the binary numbers 01110101 and 00101110. State if overflow occurs.
| Row | b8 | b7 | b6 | b5 | b4 | b3 | b2 | b1 | Decimal |
|---|---|---|---|---|---|---|---|---|---|
| Carry | 1 | 1 | 1 | 1 | 1 | 1 | |||
| 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 117 | |
| + | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 46 |
| Sum | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 163 |
Answer: 10100011 (163). No overflow because the result fits in 8 bits.
OCR Exam Tip: Overflow occurs when a carry is generated from the most significant bit (leftmost). If both numbers start with 0 (positive) and the result starts with 1, check carefully — for unsigned integers, the result is valid as long as it fits in 8 bits.
Perform a logical left shift by 2 positions on the binary number 00010100 (20). State the new denary value.
Before: 00010100 (20) After: 01010000 (80)
The value has been multiplied by 4 (2^2). 20 x 4 = 80.
A digital photograph has a resolution of 2048 x 1536 pixels and uses 24-bit colour depth. Calculate the file size in megabytes (MB).
| Step | Calculation | Result |
|---|---|---|
| Total pixels | 2048 x 1536 | 3,145,728 |
| Total bits | 3,145,728 x 24 | 75,497,472 |
| Bytes | 75,497,472 / 8 | 9,437,184 |
| MB | 9,437,184 / (1024 x 1024) | 9.0 MB |
A stereo audio recording is 5 minutes long with a sample rate of 44,100 Hz and a bit depth of 16 bits. Calculate the file size in MB.
Duration: 5 x 60 = 300 seconds
| Step | Calculation | Result |
|---|---|---|
| Total bits | 44,100 x 16 x 300 x 2 | 423,360,000 |
| Bytes | 423,360,000 / 8 | 52,920,000 |
| MB | 52,920,000 / (1024 x 1024) | 50.47 MB |
Explain two differences between ASCII and Unicode.
| Point | ASCII | Unicode |
|---|---|---|
| Character set size | 128 characters (7-bit) or 256 (8-bit extended) | Over 149,000 characters |
| Language support | Primarily English/Latin alphabet | All written languages worldwide, plus emoji |
| Storage per character | 1 byte | 1-4 bytes (UTF-8) or 2-4 bytes (UTF-16) |
| File size | Smaller | Larger for the same text |
Sample answer: ASCII uses 7 or 8 bits per character and can represent up to 256 characters, which is sufficient for English but not for other languages. Unicode can represent over 149,000 characters from all world languages. However, Unicode files are generally larger because each character may require more bits to store.
A photographer stores images on their website. Explain why they would use lossy compression rather than lossless compression.
Sample answer:
The following data represents a row of pixels in a simple image: WWWWWBBBWWWWWWBBB
Encode this using RLE.
W appears 5 times, then B appears 3 times, then W appears 6 times, then B appears 3 times.
RLE: 5W 3B 6W 3B
Original: 17 characters. Compressed: 8 characters (4 pairs). Significant reduction.
OCR Exam Tip: When answering RLE questions, clearly show the count followed by the value for each run. State the original and compressed sizes to demonstrate the space saving.
Multi-part questions that combine several data representation skills appear regularly in OCR J277 Paper 1. Here is a fully worked example.
Question: A music streaming app stores a 3-minute stereo audio clip at a sample rate of 48,000 Hz with a bit depth of 16 bits. The app also stores a 1024 x 768 thumbnail image using 8-bit colour depth. The colour index uses hex codes. Answer the following:
(a) Calculate the uncompressed size of the audio clip in MB. (3 marks)
(b) Calculate the uncompressed size of the thumbnail image in KB. (3 marks)
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.