Bit-Mapped Graphics (SQA National 5 Computing Science): Revision Note

Exam code: X816 75

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

Bit-mapped graphics

What is a bit-mapped graphic?

  • A bit-mapped graphic is an image that is made up of small squares called pixels (picture elements)

  • Each pixel represents one tiny part of the image and is stored as a binary value (a pattern of 1s and 0s) in the computer’s memory

  • The collection of all these pixel values forms the complete image

  • This method of storage is sometimes described as storing the image as an array of pixels

Humidity sensor bitmap image

How is it represented in memory?

  • Each pixel’s binary value identifies the colour of that pixel

  • The more bits used to store each pixel, the greater the number of colours that can be represented

  • The computer stores these binary values in a grid pattern that matches the layout of the image on screen

Resolution

  • Resolution refers to the number of pixels that make up the image

  • It is calculated using the width × height of the image in pixels

  • A higher resolution means more pixels are stored, which gives more detail but increases the file size

Colour depth

  • Colour depth is the number of bits used per pixel

  • This determines how many different colours each pixel can represent

  • For example:

    • 1-bit → 2 colours (black and white)

    • 4-bit → 16 colours

    • 8-bit → 256 colours

    • 24-bit → 16,777,216 colours (True Colour)

  • The number of colours available can be calculated using 2ⁿ, where n is the colour depth in bits

Example 1 bit black and white image
1-bit (B&W) image
Example 2 bit Mario image
2-bit (4 colours) image

Factors affecting file size

  • The file size of a bit-mapped image depends on:

    • Resolution – more pixels increase the amount of data stored

    • Colour depth – more bits per pixel mean more data is needed for each pixel

  • As either resolution or colour depth increases, so does the file size

  • A balance must be found between image quality and the amount of storage space required

Seesaw to demonstrate the relationship between quality and file size of an image

Common bit-mapped file formats

  • Different bit-mapped file types are used depending on the required features:

    • JPEG – uses compression to reduce file size, suitable for photographs

    • PNG – supports transparency, often used for logos or web graphics

    • GIF – supports simple animation and a limited colour palette

Worked Example

A digital camera captures a photograph of a garden. This image is stored on the memory card using the bit-mapped method of representation.

Describe how this bit-mapped graphic is represented in the camera system's memory

[2]

Answer

  • Represented as an array or grid of tiny dots known as pixels [1 mark]

  • Each pixel is stored as a binary value (or bits) in memory [1 mark]

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.