SLIDE 1
CSZone.co.uk
Click to advance · Arrow keys also work
OCR J277 · Component 1 · Topic 1.2.3
Units of
Data
Why Binary · Units · Conversions · File Size Calculations
CSZone
OCR GCSE Computer Science J277
Learning Objectives
By the end of this video you will be able to...
Explain why data must be stored in binary
Name all data units from bit to petabyte and convert between them
Calculate sound file size using: sample rate × duration × bit depth
Calculate image file size using: colour depth × height × width
Calculate text file size using: bits per character × number of characters
⚡ File size calculation questions appear in every OCR J277 paper — learn the formulas and unit conversion steps exactly
Why Binary?
All data in a computer is stored and processed in binary
THE REASON
Computers are built from transistors — electronic switches that can only be in two states: on (1) or off (0). Binary uses only two digits — 0 and 1 — which maps directly to these two states.
Every piece of data — text, images, sound, video, programs — must be converted into binary before the computer can process or store it
A single binary digit (0 or 1) is called a bit — the smallest unit of data
Mark scheme phrasing: "computers are made of switches/transistors that can only be on or off — binary has two values (0 and 1) to represent these two states"
Data Units — Bit to Petabyte
The complete hierarchy you must know
Bit (b)Single binary digit — 0 or 1
Nibble4 bits
Byte (B)8 bits
Kilobyte (KB)1,000 bytes
Megabyte (MB)1,000 KB
Gigabyte (GB)1,000 MB
Terabyte (TB)1,000 GB
Petabyte (PB)1,000 TB
📝 The spec uses 1,000 for each step. Using 1,024 is also acceptable in the exam — you will not be penalised either way.
Converting Between Units
Two rules — multiply or divide by 1,000
GOING DOWN (larger → smaller unit)
3 GB → MB
3 × 1,000 = 3,000 MB
2.5 TB → GB
2.5 × 1,000 = 2,500 GB
GOING UP (smaller → larger unit)
5,000 MB → GB
5,000 ÷ 1,000 = 5 GB
750,000 KB → GB
750,000 ÷ 1,000 ÷ 1,000 = 0.75 GB
BITS → BYTES
Divide by 8 | e.g. 80,000 bits ÷ 8 = 10,000 bytes
⚡ File size formulas always give you the answer in bits. You must divide by 8 first to get bytes, then convert using 1,000.
File Size Formulas
Three formulas — all give answer in bits
🔊 Sound = sample rate × duration (s) × bit depth
🖼️ Image = colour depth × height (px) × width (px)
📝 Text = bits per character × number of characters
After calculating (in bits): ÷ 8 → bytes → ÷ 1,000 → KB → ÷ 1,000 → MB → ÷ 1,000 → GB
Sound File Size — Worked Example
Formula: sample rate × duration (s) × bit depth
A sound file is recorded at a sample rate of 44,100 Hz, for 30 seconds, with a bit depth of 16 bits. Calculate the file size in MB.
44,100 × 30 × 16= bits
= 21,168,000 bits
÷ 8= bytes
= 2,646,000 bytes
÷ 1,000= KB
= 2,646 KB
÷ 1,000= MB
= 2.646 MB
Image File Size — Worked Example
Formula: colour depth × height (px) × width (px)
An image is 800 × 600 pixels with a colour depth of 24 bits. Calculate the file size in MB.
24 × 600 × 800= bits
= 11,520,000 bits
÷ 8= bytes
= 1,440,000 bytes
÷ 1,000= KB
= 1,440 KB
÷ 1,000= MB
= 1.44 MB
Text File Size — Worked Example
Formula: bits per character × number of characters
A text file contains 20,000 characters. Each character is stored using 8 bits (ASCII). Calculate the file size in KB.
8 × 20,000= bits
= 160,000 bits
÷ 8= bytes
= 20,000 bytes
÷ 1,000= KB
= 20 KB
📝 Notice that 8 bits per character ÷ 8 = 1 byte per character — so for ASCII, the number of characters = the number of bytes
Fixed Capacities & Metadata
Two more spec points you must know
FIXED CAPACITIES
Storage devices come in fixed sizes — you cannot buy exactly the capacity you calculate. If your calculation gives 800 GB, you would need to buy a 1 TB drive (the next fixed size up).
Example: a school calculates it needs 2,400 GB of storage. Available drives: 1 TB, 2 TB, 4 TB. The minimum that fits is a 4 TB drive (2,400 GB = 2.4 TB, so 2 TB is not enough).
METADATA ALLOWANCE
Every file also stores metadata — data about the file, such as filename, date created, file type. This takes up extra space beyond the raw data. The OCR spec says allowing for metadata in your calculations is acceptable.
In the exam: if a question asks you to calculate storage required and you add a small amount for metadata overhead, you will not lose the mark. Your un-adjusted answer is also fine.
Exam Practice
Pause and have a go before the answer appears
Question 1
State the number of bytes in one kilobyte, and the number of kilobytes in one gigabyte.
2 marks
✓ MARK SCHEME
1 mark
1 kilobyte = 1,000 bytes
1 mark
1 gigabyte = 1,000,000 KB (1,000 KB per MB × 1,000 MB per GB)
Using 1,024 is also acceptable: 1 KB = 1,024 bytes; 1 GB = 1,048,576 KB
Exam Practice
Question 2 — Sound
A sound recording has a sample rate of 8,000 Hz, a duration of 5 seconds, and a bit depth of 8 bits. Calculate the file size. Give your answer in KB, showing your working.
3 marks
✓ MARK SCHEME
8,000 × 5 × 8 = 320,000 bits (1 mark — correct working)
÷ 8 = 40,000 bytes
÷ 1,000 = 40 KB (1 mark — answer) (1 mark — correct unit)
Mark scheme awards: 1 for correct formula/working, 1 for correct numerical answer, 1 for correct unit. Showing each step protects marks even if you make an arithmetic error.
Exam Practice
Question 3 — Image
An image is 1,920 × 1,080 pixels with a colour depth of 16 bits. Calculate the file size. Give your answer in MB, showing your working.
3 marks
✓ MARK SCHEME
16 × 1,080 × 1,920 = 33,177,600 bits (1 mark)
÷ 8 = 4,147,200 bytes
÷ 1,000 = 4,147.2 KB
÷ 1,000 = ≈ 4.15 MB (1 mark answer) (1 mark unit)
The order you multiply in does not matter — colour depth × height × width is the same as height × width × colour depth.
Exam Practice
Question 4 — Conversion
A hard drive stores 3,000 files, each 1 MB in size. Calculate the total storage required. Give your answer in GB.
2 marks
✓ MARK SCHEME
3,000 × 1 MB = 3,000 MB (1 mark — working)
3,000 ÷ 1,000 = 3 GB (1 mark — answer)
Always show the working step. If your final answer is wrong but your working is correct, you can still get the working mark.
Common Mistakes
Don't lose easy marks
1
Forgetting to divide by 8 after calculating bits. All three formulas give the result in bits. You must divide by 8 to convert to bytes before doing any further unit conversions.
2
Giving the answer in the wrong unit. The question will specify — KB, MB, or GB. If your answer is in bytes or bits, it is wrong even if the number is correct. Always complete all conversion steps.
3
Using the wrong formula — e.g. applying the sound formula to an image. Sound = sample rate × duration × bit depth. Image = colour depth × height × width. Text = bits per character × number of characters. Learn each formula separately.
4
Not showing working. The mark scheme awards a mark for correct working separately from the final answer. If you make an arithmetic error but your method is right, you still get the working mark — but only if you wrote the steps down.
Topic Summary — 1.2.3
What You Need to Know
WHY BINARY
Transistors: two states (on/off). Binary has two digits — maps directly to hardware.
UNITS (×1,000 each step)
bit → nibble(4b) → byte(8b) → KB → MB → GB → TB → PB
FIXED CAPACITIES & METADATA
Devices come in fixed sizes — round up to next available size. Adding metadata allowance to calculations is acceptable.
FILE SIZE FORMULAS (answer in bits → ÷8 → bytes → ÷1000s)
🔊 sample rate × duration × bit depth
🖼️ colour depth × height × width
📝 bits per char × num characters
CSZone
Next Video
1.2.4
Data Storage
Binary · Hex · Addition · Shifts
Head to CSZone.co.uk for the complete quiz, worksheet and interactive slides