Computer Science
Data representation
- 1.
Convert binary 10110110 to unsigned decimal, showing place values.
[2 marks] · no calculatorAnswer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- Weight bits from right to left by powers of two. The zero bits contribute nothing, so add 128 + 32 + 16 + 4 + 2 rather than reading the digits as a decimal numeral.
Marking points
- Nonzero place values are 128, 32, 16, 4 and 2.
- Their sum is 182.
Examiner tip: An unsigned interpretation has no negative sign bit.
- 2.
Explain one advantage and one limitation of lossless compression for a source-code file.
[3 marks] · no calculatorAnswer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- Source files cannot tolerate approximate reconstruction. Lossless encoders exploit repeated patterns, but a file with little exploitable repetition may not offset dictionary or header costs.
Marking points
- The original bytes can be reconstructed exactly.
- This preserves program text/semantics unlike discarded characters.
- Reduction depends on redundancy; some files shrink little or grow with overhead.
Examiner tip: Lossless guarantees reconstruction, not a guaranteed compression ratio.
- 3.
Interpret 11100110 as an 8-bit two's-complement integer and state the representable range.
[3 marks] · no calculatorAnswer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- Use -128 + 64 + 32 + 4 + 2 = -26. With eight bits there are 256 patterns; two's complement assigns one extra pattern to the negative side because zero occupies a nonnegative pattern.
Marking points
- The leading bit has weight -128.
- Value = -26.
- Range is -128 to +127.
Examiner tip: Do not treat the remaining bits as an unsigned magnitude after a sign bit.
- 4.
Calculate raw storage for a 640 x 480 image at 24 bits per pixel, in bytes and KiB. Ignore metadata; 1 KiB = 1024 bytes.
[3 marks]Answer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- Multiply width by height and then by three bytes per pixel. Divide by 1024 for KiB, keeping the binary prefix distinct from decimal kilobytes.
Marking points
- Total pixels = 307200.
- Storage = 921600 bytes.
- Storage = 900 KiB.
Examiner tip: Convert bits to bytes once, not once per colour channel and again at the end.
- 5.
Add 01111111 and 00000001 using 8-bit two's complement. Give the stored bit pattern and explain why the signed result is invalid.
[4 marks] · no calculatorAnswer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- The bit operation wraps within eight bits, but signed arithmetic has a narrower positive limit. Carry behaviour alone is not the signed-overflow criterion; compare input and output signs.
Marking points
- The bit pattern is 10000000.
- The mathematical sum is 128.
- The stored pattern represents -128, outside the intended positive result.
- Two positive operands produced a negative sign, indicating signed overflow.
Examiner tip: Do not confuse signed overflow with a ninth-bit unsigned carry.
- 6.
A stereo recording uses 48000 samples per second per channel, 16 bits per sample and lasts 10 s. Calculate raw size in bytes and explain how halving sample rate affects size and possible fidelity.
[4 marks]Answer explanation
Draft walkthroughs are based on marking guidance, not independently verified derivations.
- Account separately for time, channels and bits per sample, then divide by eight. A reduced sample rate retains fewer temporal measurements; anti-alias filtering is needed when frequencies exceed the new sampling limit.
Marking points
- Use 48000 x 2 x 16 x 10 bits.
- Raw size = 1920000 bytes.
- Halving sample rate gives 960000 bytes with other factors fixed.
- The lower rate reduces the highest faithfully representable frequency and may cause aliasing without filtering.
Examiner tip: Stereo doubles channel data, not the duration or sample bit depth.
Marking points are indicative, not an official mark scheme. Accept equivalent valid methods and supported interpretations that address the task; award each mark once without requiring the model wording.