J277 4: Units and Binary

OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1

Units and binary

From bits to petabytes: how much data fits, and how computers count with ones and zeros.

Paper 1 · Lesson 4

1 / 21
volgende
Slide 1: Slide
newEditorComputer ScienceUpper Secondary (Key Stage 4)GCSE

In deze les zitten 21 slides, met interactieve quizzen en tekstslides.

time-iconLesduur is: 60 min
Dit is niet oké

Introductie

OCR GCSE Computer Science (J277), Paper 1, lesson 4 of 26. Students learn why computers use binary, the units of data from bit and nibble up to petabyte (in multiples of 1000, as OCR uses), how to calculate file sizes and storage requirements, and how to convert between denary and 8-bit binary (0 to 255). Includes a retrieval do-now on memory and storage, picture questions, drag-and-drop, an open question, a spot-the-mistake task, fill in the blanks and an exam-style question with mark scheme. This lesson was created with AI assistance.

Onderdelen in deze les

OCR GCSE COMPUTER SCIENCE · J277 · PAPER 1

Units and binary

From bits to petabytes: how much data fits, and how computers count with ones and zeros.

Paper 1 · Lesson 4

Welcome the class. This lesson covers J277 section 1.2 (memory and storage): units of data, why computers use binary, file size and storage calculations, and converting between denary and 8-bit binary.

Say: last lesson was about where data is stored. Today is about how much data there is, and what it looks like inside the machine.

Device-free: show the cover on the board and ask students to write the title and date.

Cover photo: Sufyan / Unsplash, shown as a hologram.

01 · LEARN · MISSION BRIEFING

By the end of this lesson

01

Explain why computers use binary and name the units of data from bit to petabyte.

02

Calculate file sizes and how much storage is needed.

03

Convert between denary and 8-bit binary (0 to 255).

SYSTEM VOICE

System online. Mission briefing. Today you will find out why computers store everything in binary, measure data from bits all the way up to petabytes, and convert numbers between denary and binary.

Play the system voice clip (the play button). Its words are on the slide: "System online. Mission briefing. Today you will find out why computers store everything in binary, measure data from bits all the way up to petabytes, and convert numbers between denary and binary."

Read the three outcomes aloud. Return to them at the exit poll.

Device-free: read the briefing aloud and have students copy the three outcomes.

Do now (lesson 3): drag each word to what it describes.

Volatile main memory

Holds the boot-up instructions

Secondary storage used when RAM is full

Optical storage, read by a laser

Solid state storage, no moving parts






SSD

RAM

Blu-ray disc

Virtual memory

ROM

Retrieval from lesson 3 (RAM, ROM, virtual memory, secondary storage). Give 3 minutes, then go through the answers.

Answers: RAM = volatile main memory. ROM = holds the boot-up instructions (the BIOS), non-volatile. Virtual memory = part of secondary storage used as extra RAM when RAM is full. Blu-ray disc = optical storage, read by a laser. SSD = solid state storage, no moving parts.

Misconception: virtual memory is not extra RAM chips; it is space on secondary storage, so it is much slower than RAM.

Device-free: read out each description and students write the matching word on mini whiteboards.

01 · LEARN · WHY BINARY?

Computers work with on and off

A processor contains billions of tiny switches called transistors. Each one is either off or on: two states, 0 or 1.

Binary (base 2) uses only the digits 0 and 1, so every number, letter, image and sound a computer handles is stored as binary.

Big idea: computers use binary because their circuits are made of switches (transistors) that have two states, off and on. Two states map neatly onto two digits, 0 and 1.

Ask: why not use ten states, like denary? Answer: two states are simple and reliable to make and tell apart; ten voltage levels would be easy to confuse.

Key term: binary = base 2, a number system with only the digits 0 and 1.

Device-free: students write the definition of binary and one reason computers use it. Image credit: Igor Omilaev / Unsplash

01 · LEARN · BITS, NIBBLES AND BYTES

Grouping binary digits

One binary digit, a 0 or a 1. The smallest unit of data.

4 bits.

8 bits. Enough to store one character of text.

BIT

1

NIBBLE

1011

BYTE

10110010

Every extra bit doubles the number of patterns.

1 bit = 2 patterns · 2 bits = 4 · 4 bits = 16 · 8 bits = 256

So one byte can hold the denary numbers 0 to 255.

Define each term. Bit = binary digit (a 0 or a 1). Nibble = 4 bits. Byte = 8 bits.

Click to reveal the doubling rule. 1 bit gives 2 patterns (0, 1); 2 bits give 4 (00, 01, 10, 11); 4 bits give 16; 8 bits give 256. Because 0 is one of the 256 patterns, a byte holds 0 to 255, not 1 to 256.

Misconception: students often say a byte holds up to 256. The largest value is 255.

Device-free: students list all four 2-bit patterns, then predict how many patterns 3 bits make (8).

01 · LEARN · UNITS OF DATA

Each unit is 1000 times the one before

8 bits = 1 byte (B)

1000 bytes = 1 kilobyte (KB)

1000 KB = 1 megabyte (MB)

1000 MB = 1 gigabyte (GB)

1000 GB = 1 terabyte (TB)

1000 TB = 1 petabyte (PB)

Up a unit: divide by 1000. Down a unit: multiply by 1000. Bits to bytes: divide by 8.

Teach the ladder from bit to petabyte. This series uses multiples of 1000 (1 KB = 1000 bytes), as the OCR J277 specification does. Some students will have seen 1024; tell them 1000 is what to use here.

Real-world sense of scale: a text message is a few hundred bytes, a photo a few MB, a film a few GB, a laptop drive about 1 TB, a large data centre many PB.

Misconception: bits to bytes is divide by 8, not by 1000.

Device-free: students copy the ladder as a staircase diagram, smallest at the bottom. Image credit: Taylor Vick / Unsplash

Which of these is the largest amount of storage?

A

1500 MB

B

0.5 TB

C

900 000 KB

D

2 GB

Answer: 0.5 TB. Convert everything to GB: 2 GB = 2 GB; 1500 MB = 1.5 GB; 0.5 TB = 500 GB; 900 000 KB = 900 MB = 0.9 GB.

Misconception: students pick 900 000 KB because the number is biggest. The unit matters more than the number.

Device-free: students write the four amounts in GB on mini whiteboards and circle the largest. Image credit: 铮 夏 / Unsplash

01 · LEARN · CALCULATING STORAGE

Worked examples: will it fit?

EXAMPLE 1

Leah has 250 songs. Each song is 5 MB. Will they fit in 1 GB of free space on her phone?

250 × 5 MB = 1250 MB

1250 MB ÷ 1000 = 1.25 GB

1.25 GB is more than 1 GB, so they will not fit.

EXAMPLE 2

How many 4 MB photos can Jamal store on a 16 GB memory card?

16 GB × 1000 = 16 000 MB

16 000 MB ÷ 4 MB = 4000

4000 photos. Always convert to the same unit first.

Click through each step. Ask the class for the next step before each click.

Example 1: 250 × 5 = 1250 MB. 1250 ÷ 1000 = 1.25 GB. 1.25 GB is more than 1 GB, so no; Leah needs another 250 MB.

Example 2: 16 GB × 1000 = 16 000 MB. 16 000 ÷ 4 = 4000 photos.

Method: put everything in the same unit, then multiply (total size) or divide (how many fit). If a division gives a decimal when counting files, round down: part of a file cannot be stored.

Device-free: students copy both worked examples, then try: how many 2 MB songs fit on 8 GB? (8000 ÷ 2 = 4000).

A text file is 16 000 bits. What is its size in kilobytes (KB)?

Answer: 2 KB. Working: 16 000 bits ÷ 8 = 2000 bytes. 2000 bytes ÷ 1000 = 2 KB.

Misconception: dividing 16 000 by 1000 straight away gives 16, which skips the bits-to-bytes step.

Device-free: students show the two steps on mini whiteboards.

01 · LEARN · NUMBER BASES

Denary is base 10. Binary is base 2.

Denary uses ten digits, 0 to 9. Each column is worth 10 times the one to its right: 1, 10, 100, 1000.

Binary uses two digits, 0 and 1. Each column is worth 2 times the one to its right: 1, 2, 4, 8, 16, 32, 64, 128.

With 8 bits, the range is 00000000 (0) to 11111111 (255).

Key terms: denary = base 10, the number system people use every day. Binary = base 2.

Show that 345 in denary means 3 hundreds, 4 tens and 5 ones. Binary works the same way, but each column is worth double the one to its right.

Range in 8 bits: 0 to 255 (256 different values).

Device-free: students write the eight binary place values from 128 down to 1 at the top of their page; they will use them for the rest of the lesson. Image credit: Markus Spiske / Unsplash

01 · LEARN · BINARY TO DENARY

Each column is worth double the one to its right

128

0

64

1

32

1

16

0

8

1

4

0

2

0

1

1

01101001 = 64 + 32 + 8 + 1 = 105

SYSTEM VOICE

Binary place values. Each column is worth double the one to its right: 1, 2, 4, 8, 16, 32, 64 and 128. To read a binary number, add up the columns that hold a 1.

Play the system voice clip. Its words are on the slide: "Binary place values. Each column is worth double the one to its right: 1, 2, 4, 8, 16, 32, 64 and 128. To read a binary number, add up the columns that hold a 1."

Binary to denary: write the place values above the bits, then add the values that have a 1 under them. Click to reveal: 01101001 = 64 + 32 + 8 + 1 = 105.

Check: 64 + 32 = 96, + 8 = 104, + 1 = 105.

Misconception: starting the place values at the left with 1. The 1s column is always on the right.

Device-free: write 00011100 on the board; students convert it (16 + 8 + 4 = 28).

A games console stores the byte 10010110. What is it in denary?

A

182

B

105

C

149

D

150

Answer: 150. Working: 10010110 has 1s under 128, 16, 4 and 2. 128 + 16 + 4 + 2 = 150.

Distractors: 105 is the previous example (01101001). 182 is 10110110, an extra 1 in the 32s column. 149 is an addition slip.

Device-free: students write the place values above the bits and add on mini whiteboards. Image credit: Brecht Corbeel / Unsplash

01 · LEARN · DENARY TO BINARY

Subtract the biggest place value that fits

▮ TERMINAL // denary_to_binary 200

1  128 fits? YES  200 - 128 = 72  bit 1

2   64 fits? YES   72 -  64 =  8  bit 1

3   32 fits? NO                   bit 0

4   16 fits? NO                   bit 0

5    8 fits? YES    8 -   8 =  0  bit 1

6    4 fits? NO                   bit 0

7    2 fits? NO                   bit 0

8    1 fits? NO                   bit 0

9  RESULT    11001000

Method

1. Write the place values 128 down to 1.

2. Left to right: if the value fits, subtract it and write 1.

3. If it does not fit, write 0.

4. Check by adding: 128 + 64 + 8 = 200.

Click to reveal the working a line at a time. Ask the class "does it fit?" before each click.

200: 128 fits (72 left, bit 1). 64 fits (8 left, bit 1). 32 no. 16 no. 8 fits (0 left, bit 1). 4 no, 2 no, 1 no. Result 11001000.

Check: 128 + 64 + 8 = 200.

Always write all 8 bits, including leading zeros, when an 8-bit answer is asked for.

Device-free: students convert 99 using the same method (64 + 32 + 2 + 1 = 01100011).

Drag each byte to its denary value.

37

64

129

255





11111111

00100101

10000001

01000000

Answers: 00100101 = 32 + 4 + 1 = 37. 01000000 = 64. 10000001 = 128 + 1 = 129. 11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

Ask: which one is the largest number 8 bits can hold? (11111111 = 255.)

Device-free: write the four bytes on the board; students convert each and match them to the denary numbers.

03 · DEBUG · SPOT THE MISTAKE

Kofi converted 89 into binary. Find his mistake.

▮ TERMINAL // kofi_working.txt

1  128 fits? NO                   bit 0

2   64 fits? YES   89 -  64 = 25  bit 1

3   32 fits? NO                   bit 0

4   16 fits? YES   25 -  16 =  9  bit 1

5    8 fits? YES    9 -   8 =  1  bit 1

6    4 fits? NO                   bit 0

7    2 fits? YES                  bit 1

8    1 fits? YES    1 -   1 =  0  bit 1

9  ANSWER    01011011

Check each line. Which line is wrong, and what should the answer be? Tap the marker to check.

Give students a minute in pairs to find the mistake before tapping the marker.

Answer: line 7. Only 1 is left after the 8s column, so 2 does not fit and that bit should be 0. Kofi did not subtract on line 7, so line 8 still had 1 left. Correct: 89 = 64 + 16 + 8 + 1 = 01011001. Kofi's answer 01011011 = 91.

Exam tip: always check a conversion by adding the place values back up.

Device-free: copy Kofi's working onto the board and ask students to circle the wrong line.

1

Megabyte

2

Bit

3

Byte

4

Nibble

5

Kilobyte

6

Gigabyte

Put these units in order, from smallest to largest.

Correct order: bit, nibble (4 bits), byte (8 bits), kilobyte (1000 bytes), megabyte (1000 KB), gigabyte (1000 MB). Ask: what comes next? (Terabyte, 1000 GB, then petabyte, 1000 TB.)

OCR uses multiples of 1000 in exams; 1024 is also accepted in mark schemes.

Device-free: students write the eight units on a strip of paper in order.

Complete the key facts.

A bit is a single binary digit. A nibble is 4 bits and a byte is 8 bits. 1 kilobyte is 1000 bytes. The largest denary number that 8 bits can hold is 255.

bit
nibble
byte
kilobyte
255
256
megabyte
denary

Answers: bit, nibble, byte, kilobyte, 255.

Distractors: 256 (the number of patterns, not the largest value), megabyte (1000 KB), denary (base 10).

Device-free: read the sentences aloud with gaps; students write the missing words.

04 · EXAM · PRACTICE QUESTION

Exam practice (4 marks)

Chloe saves photos from her camera onto a 2 GB memory card.

(a) Each photo is 3 MB. Calculate how many photos will fit on the memory card. Show your working. [2]

(b) The camera stores the number 75 in one byte. Convert denary 75 into 8-bit binary. [2]

5

minute

00

second

5 minutes

Students answer in silence, in exam conditions, with the 5-minute timer. Then show the next slide.

Mark scheme. (a) 1 mark: converts to the same unit (2 GB = 2000 MB). 1 mark: 666 photos (2000 ÷ 3 = 666.67, rounded down). Accept 682 if 1024 is used (2048 ÷ 3). Do not accept 667: part of a photo cannot be stored.

(b) 2 marks: 01001011. 1 mark if one nibble is correct (0100 or 1011), or if the answer is correct but not given as 8 bits (1001011).

Device-free: print or project the question; students answer on paper.

04 · EXAM · MODEL ANSWER

Model answer and working

▮ TERMINAL // model_answer.txt

1  (a) 2 GB x 1000 = 2000 MB

2      2000 / 3 = 666.67

3      ANSWER 666 photos (round down)

4  (b) 75 = 64 + 8 + 2 + 1

5      128  64  32  16   8   4   2   1

6        0   1   0   0   1   0   1   1

7      ANSWER 01001011

Common mistakes

Rounding 666.67 up to 667. You cannot store part of a photo.

Writing 1001011. An 8-bit answer needs all 8 bits, so keep the leading 0.

Click to reveal the working a line at a time; students mark their own answer in a different colour.

(a) 2 GB = 2000 MB. 2000 ÷ 3 = 666.67, so 666 photos. (b) 75 = 64 + 8 + 2 + 1, so 01001011. Check: 64 + 8 = 72, + 2 = 74, + 1 = 75.

Device-free: read out the model answer; students mark their own work using the mark scheme on the previous slide's notes.

1

I can do it on my own

2

I can do it with the place values in front of me

3

I need more practice

How confident are you converting between denary and binary?

Exit poll. Revisit the three outcomes from the start of the lesson. Students who choose "I need more practice" can use the Isaac Computer Science and BBC Bitesize links on the next slide.

Device-free: fist-to-five, or students write 1, 2 or 3 on a sticky note as they leave.

KEEP GOING

Practise beyond the lesson

Isaac Computer Science

Free lessons and questions on number bases and units of data.

isaaccomputerscience.org

BBC Bitesize

GCSE Computer Science (OCR): data representation revision and tests.

bbc.co.uk/bitesize

OCR past papers

J277/01 papers and mark schemes: look for questions on units and binary.

ocr.org.uk

Next lesson: binary addition, overflow, binary shifts and hexadecimal.

Point students to independent practice. Isaac Computer Science and BBC Bitesize are free. OCR publishes J277 past papers and mark schemes on its website.

Homework idea: convert five denary numbers of their choice (0 to 255) into binary and check each by adding the place values.

Device-free: students write down the three sites and the homework task.