Skip to content

AQA A-Level Computer Science: Data Representation

6 exam-style questions with full mark schemes and model answers. Write your own answer and the AI examiner marks it against the mark scheme.

Question 112 marksConvert

A processor uses 8-bit registers. Answer each part, showing your working.

(a) The denary value 214214214 is to be stored.

  • (i) Convert 214214214 to 8-bit unsigned binary. [1]
  • (ii) Convert your answer to (i) to hexadecimal. [1]
  • (iii) Convert the hexadecimal value 9C to denary. [1]

(b) The two 8-bit unsigned values 10110101 and 01011010 are added together. Perform the binary addition, state the 8-bit value that is actually stored in the register, and explain how the processor knows that the result is incorrect. [3]

(c) The register now holds signed integers in two's complement.

  • (i) Represent 45-4545 in 8-bit two's complement. [2]
  • (ii) State the range of denary values that an 8-bit two's complement register can hold. [1]

(d) The value 262626 (00011010) undergoes a logical shift left of 1 place, and separately the two's complement value 40-4040 (11011000) undergoes an arithmetic shift right of 1 place. Give the resulting bit pattern in each case and state the arithmetic effect of each shift. [3]

AI examiner · marked against the mark scheme
Question 29 marksConvert

A computer stores real numbers in floating point using a 6-bit two's complement mantissa (1 sign bit + 5 fraction bits, with the binary point immediately after the sign bit) and a 4-bit two's complement exponent.

(a) A floating-point number is stored with mantissa 010110 and exponent 0011. Convert this number to denary, showing the value of the exponent, the value of the mantissa, and the final result. [4]

(b) Represent the denary value 3.5-3.53.5 in this format. Your mantissa must be normalised. Show all your working, including the normalisation and the two's complement negation, and state the final mantissa and exponent. [5]

AI examiner · marked against the mark scheme
Question 36 marksCalculate

An uncompressed bitmap image has the following properties.

PropertyValue
Width1024 pixels
Height768 pixels
Colour depth24 bits per pixel

(a) Calculate the size of the uncompressed image, giving your answer in mebibytes (MiB). Show your working in clear steps (bits, then bytes, then MiB). [4]

(b) State how many distinct colours a colour depth of 24 bits per pixel can represent, and explain briefly why. [2]

AI examiner · marked against the mark scheme
Question 45 marksApply

A status byte holds the value 11001010. Each part below applies a bitwise mask to this same original byte. For each part, give the resulting 8-bit pattern and name the effect on the masked bits.

(a) 11001010 AND 00001111. [2]

(b) 11001010 OR 11110000. [1]

(c) 11001010 XOR 00001111. [2]

AI examiner · marked against the mark scheme
Question 54 marksCompare

(a) Explain the difference between lossy and lossless compression, and give one example of data for which each is appropriate. [2]

(b) One row of a two-colour bitmap (W = white, B = black) is shown below.

WWWWWWWWWWWWBBBBWWWWWWWWWWWW

Show how run-length encoding (RLE) compresses this row, and state whether RLE is lossy or lossless. [2]

AI examiner · marked against the mark scheme
Question 63 marksDefine

(a) State how many bits there are in a nibble and how many bits there are in a byte. [1]

(b) A file is exactly 3 MiB in size. Calculate its size in bytes. [1]

(c) Explain the difference between a kilobyte (kB) and a kibibyte (KiB). [1]

AI examiner · marked against the mark scheme