The answersDownload the PDF
Worksheet

F8.1 Bits, bytes and units

Data representation · GCSE · OCR J277 1.2.3, AQA 8525 3.3.3, Edexcel 1CP2 2.1.1 · about 12 min

BugBotLab
NameClassDate

What this lesson is about

Why computers use binary, and the units from bits to petabytes.

Questions 6 marks in all

  1. [1 mark]Why do computers store data in binary?

    1. ATheir circuits are made of switches that are either on or off
    2. BBinary uses less electricity than denary
    3. CBinary numbers are shorter
    4. DIt was the first number system invented
  2. [1 mark]Put the units in order from smallest to largest.

    Number the lines 1 to 7 to put them in the right order.

    1. nibble
    2. terabyte
    3. megabyte
    4. gigabyte
    5. kilobyte
    6. bit
    7. byte
  3. [1 mark]How many bits are in a byte?

  4. [1 mark]How many different patterns can 5 bits make?

  5. [1 mark]What does this program print?

    frame_bytes = 320 * 240 * 3
    print(frame_bytes, frame_bytes / 1000)
  6. [1 mark]How many bytes is a kibibyte?

    1. A1,024
    2. B1,000
    3. C8
    4. D1,000,000

The task: frame sizes

The robot's camera can also capture a small 64 by 48 frame with 3 bytes per pixel. Work out and print three lines: bits: <n>, bytes: <n> and kB: <n> (kilobytes of 1,000 bytes, as a decimal). Store the width, height and bytes per pixel in variables and calculate each line; do not type the answers.

# the two lines every program starts with: the commands, then the robot
from bugbot import *
connect()

width = 64

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/f8-1-bits-bytes-and-units/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. How many different colours can a pixel with 24 bits have? Work it out with **.
  2. How many 1 MB photos fit on a 64 GB memory card? Use 1,000 for each step.
  3. Repeat the frame calculation using kibibytes and mebibytes. How big is the difference?