AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    Convert a bitmap image into binary data. Given a simple bitmap, students…

    Full specification wording

    Representing images: Convert a bitmap image into binary data. Given a simple bitmap, students should be able to write down a bit pattern that represents the image.

    A bitmap is a grid of pixels, and each pixel stores one colour value.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 18 of 18

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    A bitmap is a grid of pixels, and each pixel stores one colour value. To convert a simple bitmap into binary, first fix the grid size and the colour depth. For a black-and-white image at 1 bit per pixel, agree a convention such as 1 for black and 0 for white, then read the grid row by row, left to right, writing one bit per pixel. A 4 × 3 grid therefore produces 4 × 3 = 12 bits, for example 111100001111. State the convention you used, because reversing it changes the pattern. For more colours, each pixel needs more bits: 2 bits give 4 colours, 3 bits give 8 colours, and generally n bits give 2ⁿ colours. The total file size in bits is width × height × colour depth, so a 10 × 10 image at 3 bits per pixel needs 10 × 10 × 3 = 300 bits. Always keep rows in order and do not drop pixels, since the pattern must reconstruct the same picture.

    What earns the marks

    • Identifies that a bitmap is a grid of pixels and that each pixel is encoded separately.
    • States the colour-depth convention used, for example 1 = black and 0 = white at 1 bit per pixel.
    • Reads the grid in a consistent order (row by row, left to right) and writes one bit per pixel.
    • Calculates the number of bits as width × height × colour depth, e.g. 4 × 3 × 1 = 12 bits.
    • Recognises that n bits per pixel allow 2ⁿ distinct colours, e.g. 3 bits give 8 colours.
    • Checks the bit pattern has exactly the expected number of bits and reconstructs the original image.

    Common mistakes and how to put them right

    • Writing bits column by column while claiming to read row by row.

      Put it right: Choose one order, state it, and apply it consistently so the pattern matches the grid.

    • Forgetting to state the colour convention.

      Put it right: Say which bit value represents black and which represents white, otherwise the pattern is ambiguous.

    • Miscounting total bits by using width + height instead of width × height × colour depth.

      Put it right: Multiply the three values to get the bit total.

    Exam tips

    • Write the grid dimensions and colour depth before starting, then count the bits you produce against width × height.
    • State your 0/1 colour convention in one short sentence so the marker can follow your pattern.
    • For multi-colour questions, work out 2ⁿ colours from the stated bit depth before encoding any pixel.

    Try the lesson

    The start of the Representing images: Convert a bitmap image into binary data. Given a simple bitmap, students should be able to write down a bit pattern that represents the image. lesson, made from checked teaching notes for this specification point.

    Have a go first

    A 1-bit-per-pixel bitmap uses 0 for white and 1 for black. A row of four pixels is white, black, black, white. Which bit pattern represents this row?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of Representing images: Convert a bitmap image into binary data. Given a simple bitmap, students should be able to write down a bit pattern that represents the image.

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge