Track progress, take quizzes and save notes on this lesson.

Free forever · no card needed

Start free
Intermediate

Number Systems and Data Units

1.2.3 Units·1.2.4 Data storage (numbers)

Aligned to the OCR J277 specification

Level
Intermediate
Reading time
7 min
Published
12 June 2026
Updated
1 July 2026
On this page
  1. 1.Why Computers Use Binary
  2. 2.Binary to Denary Conversion
  3. 3.Binary Addition and Overflow
  4. 4.Hexadecimal
  5. 5.Binary Shifts
  6. 6.File Size Calculations
  7. 7.Common Exam Mistakes

Key takeaways

  • Computers use binary (base 2) because transistors have two stable states: on (1) and off (0). Bit place values double from right to left: 1, 2, 4, 8, 16, 32, 64, 128.
  • Each hexadecimal digit represents exactly 4 binary bits (one nibble), making hex a convenient shorthand for binary. Hex uses digits 0-9 and letters A-F, where A=10 and F=15.
  • A left binary shift multiplies a value by 2 per position; a right binary shift divides by 2 per position. Bits shifted off the end are lost.
  • Overflow occurs when the result of an addition exceeds the maximum value storable in the available bits - with 8 bits the maximum is 255, so any result above that causes an overflow error.
  • Image file size in bits = colour depth x height (px) x width (px); sound file size in bits = sample rate x duration (s) x bit depth.

Why Computers Use Binary

All data processed by a computer is ultimately stored as binary — sequences of 0s and 1s. This is because electronic components (transistors) have two stable states: on (1) and off (0). Binary maps directly onto this physical reality.

A single binary digit is a bit. Bits are grouped into units:

UnitSizeEquivalent
Bit1 bitSmallest unit of data
Nibble4 bitsHalf a byte
Byte8 bitsSmallest addressable unit in most systems
Kilobyte (KB)1,000 bytes~1 thousand bytes
Megabyte (MB)1,000 KB~1 million bytes
Gigabyte (GB)1,000 MB~1 billion bytes
Terabyte (TB)1,000 GB~1 trillion bytes
Petabyte (PB)1,000 TB~1 quadrillion bytes

OCR J277 uses powers of 1,000 (kilobyte = 1,000 bytes). Using powers of 1,024 is also acceptable in calculations.

Binary to Denary Conversion

Each bit position in a binary number has a place value that doubles from right to left. For 8 bits:

Bit position76543210
Place value1286432168421

Worked example — convert 10110101 to denary:

Place1286432168421
Bit10110101
Value128032160401

Denary to binary — repeatedly divide by 2 and record the remainder, reading remainders bottom-up:

Worked example — convert 77 to binary:

DivisionQuotientRemainder
77 ÷ 2381
38 ÷ 2190
19 ÷ 291
9 ÷ 241
4 ÷ 220
2 ÷ 210
1 ÷ 201

Reading remainders bottom-up: 01001101

Verify:

The most significant bit (MSB) is the leftmost bit (highest value). The least significant bit (LSB) is the rightmost bit (lowest value).

Binary Addition and Overflow

Binary addition rules:

  • (write 0, carry 1)
  • (carry) (write 1, carry 1)

Worked example — add 01001101 (77) + 00110010 (50):

  01001101   (77)
+ 00110010   (50)
----------
  01111111   (127)

Step-by-step (right to left): 1+0=1; 0+1=1; 1+0=1; 1+0=1; 0+1=1; 0+1=1; 1+0=1; 0+0=0. Result: 01111111 =

Overflow occurs when the result of an addition is too large to be stored in the available number of bits. With 8 bits, the maximum value is 255 (11111111). If the result exceeds 255, a carry bit is generated beyond the 8th bit — that extra bit cannot be stored, so the result is incorrect. This is an overflow error.

Worked example — overflow: add 11111110 (254) + 00000011 (3):

  11111110   (254)
+ 00000011   (3)
----------
 100000001   (257 — requires 9 bits)

In 8 bits, only the lower 8 bits are kept: 00000001 (1). The true answer is 257 but only 1 is stored — overflow error.

Hexadecimal

Hexadecimal (base 16) uses 16 symbols: 0–9 and A–F, where A=10, B=11, C=12, D=13, E=14, F=15.

DenaryHexBinary
000000
991001
10A1010
15F1111
16100001 0000
255FF1111 1111

Each hex digit represents exactly 4 binary bits (one nibble). This makes hex a convenient shorthand for binary.

Denary to hex — divide by 16, record remainders:

Worked example — convert 181 to hex:

DivisionQuotientRemainder
181 ÷ 16115
11 ÷ 160B (11)

Reading bottom-up: B5

Verify:

Binary to hex — split binary into groups of 4 from the right; convert each group:

Worked example — convert 10110101 to hex:

  • Split: 1011 | 0101
  • 1011 = 8+2+1 = 11 = B
  • 0101 = 4+1 = 5 = 5
  • Result: B5 ✓ (consistent with the denary→hex example above)

Want more lessons like this one?

Generate lessons on anything you study. Free account, no card needed.

Start generating

Binary Shifts

A binary shift moves all the bits in a binary number left or right by a specified number of positions.

Left shift — each shift left multiplies the value by 2:

BitsValue
000001015
0000101010 (shifted left 1)
0001010020 (shifted left 2)

Bits shifted off the left end are lost. Empty positions on the right are filled with 0.

Right shift — each shift right divides the value by 2 (integer division):

BitsValue
0001010020
0000101010 (shifted right 1)
000001015 (shifted right 2)

Bits shifted off the right end are lost. Empty positions on the left are filled with 0.

Worked example — shift 00000110 (6) left by 2:

  • 00000110 → 00011000 =

Worked example — shift 00011000 (24) right by 3:

  • 00011000 → 00000011 =

File Size Calculations

OCR J277 requires the ability to calculate file sizes for sound, image and text files.

Text file size:

Worked example — a text file with 500 characters, each stored in 8 bits: bits bytes ✓

Image file size (uncompressed):

Worked example — a 200 × 100 pixel image with 24-bit colour depth: bits bytes KB (using 1,000 bytes = 1 KB) ✓

Sound file size (uncompressed):

Worked example — a 10-second audio clip, sample rate 44,100 Hz, 16-bit depth: bits bytes KB ✓

Common Exam Mistakes

1. Getting bit order wrong in binary-to-denary conversion

The rightmost bit is always worth 1 (LSB), doubling leftward: 1, 2, 4, 8, 16, 32, 64, 128. A common error is reversing the order or using the wrong place value for a given position.

2. Confusing overflow with rounding

Overflow is not rounding — it is a structural failure when the result exceeds the storage capacity. The stored result is wrong, not merely imprecise.

3. Confusing left and right shift effects

Left shift multiplies by powers of 2 (each position = ×2). Right shift divides by powers of 2 (each position = ÷2). Confusing direction reverses the effect.

4. File size formula errors

Always check units in file size calculations. The image formula uses colour depth × height × width in pixels. The sound formula uses sample rate × duration × bit depth. Swapping values (e.g. using resolution in dpi instead of pixels) gives a wrong answer.

MistakeCorrection
"Shifting left by 1 adds 1 to the value"Shifting left by 1 multiplies the value by 2
"KB = 1,024 bytes only"OCR J277 uses 1 KB = 1,000 bytes (1,024 is also acceptable)
Writing 10110101 as B5 without checkingVerify: 1011=B, 0101=5 → B5 = (11×16)+5 = 181

Key terms

Bit
The smallest unit of data, representing a single binary digit: 0 or 1.
Nibble
A group of 4 bits, equal to half a byte. One nibble corresponds to exactly one hexadecimal digit.
Byte
A group of 8 bits. The smallest addressable unit of data in most computer systems.
Binary (base 2)
A number system using only the digits 0 and 1, where each bit position has a place value that doubles from right to left.
Denary (base 10)
The standard decimal number system using digits 0-9, where each position is a power of 10.
Hexadecimal (base 16)
A number system using digits 0-9 and letters A-F (A=10 to F=15). Each hex digit represents exactly 4 binary bits.
Most significant bit (MSB)
The leftmost bit of a binary number, which has the highest place value.
Least significant bit (LSB)
The rightmost bit of a binary number, which has the lowest place value (always 1).
Overflow
An error that occurs when the result of a binary addition exceeds the maximum value storable in the available number of bits, producing a wrong result.
Binary shift
Moving all bits in a binary number left or right by a number of positions. Each left shift multiplies by 2; each right shift divides by 2.
Colour depth
The number of bits used to represent the colour of each pixel in an image. More bits means more possible colours.
Sample rate
The number of audio samples taken per second when recording sound, measured in Hz. Higher sample rates produce better quality but larger file sizes.

Frequently asked questions

Write the place values 128, 64, 32, 16, 8, 4, 2, 1 above each bit from left to right. Add together the place values where the bit is 1. For example, 10110101 gives 128+32+16+4+1 = 181.

Overflow happens when the result of a binary addition is too large to be stored in the available number of bits. With 8 bits the maximum is 255; if the result exceeds 255 a carry bit beyond the 8th bit is generated and lost, producing a wrong stored result.

Split the binary number into groups of 4 bits from the right, then convert each group to its hex digit. For example 10110101 splits into 1011 (= 11 = B) and 0101 (= 5), giving B5. To go from hex to binary, expand each hex digit into 4 bits.

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

Primary and Secondary Storage

Next

Data Representation

Related lessons

9 min

6 min

Lesson

Boolean Logic

OCR GCSE Computer Science · OCR J277

1 month ago

7 min

Top students don’t revise more. They revise what counts.

Start revising free

Free to start. No card needed.