Week 2 · Unit 1 Number systems (2): why computers use binary, bit and byte, the number of binary patterns 2 to the power n · 3 lessons
2
Bits and bytes: two units for data
ICT Secondary 3 Term 1, Unit 1, Topic 1: pp. 11–13
GoalCount bits and bytes and change between them.
New words
bit · one binary digit: a single 0 or a single 1byte · a group of 8 bitskilobyte (KB) · in this course, 1024 bytesunit of data · a fixed amount used to measure how much data there is
Explanation
A bit is one binary digit, a single 0 or a single 1. A pattern such as 1011 has four bits, and 1000111 has seven. Bits are joined into bigger units. A byte is 8 bits, the unit in which a computer usually stores one symbol: in a simple code one byte is enough for one letter, one digit or one sign (other codes, for example for Arabic letters, may need two bytes for one letter). Bigger sizes are built from bytes. In this course 1 kilobyte (1 KB) is 1024 bytes; some books use 1000, so always check which one is meant. Bits and bytes measure how much data there is, not how fast it moves. To change units, multiply: bytes × 8 gives bits, and KB × 1024 gives bytes.
Unit
Size
Example
bit
one 0 or one 1
1
byte
8 bits
01100110
kilobyte (KB)
1024 bytes = 8192 bits
a short text file
Worked examples
Step
Calculation
Result
letters to bytes
40 × 1
40 bytes
bytes to bits
40 × 8
320 bits
A short message has 40 letters. In a simple code each letter takes one byte, so the message takes 40 bytes. Each byte is 8 bits, so the message is 40 × 8 = 320 bits.
Step
Calculation
Result
KB to bytes
3 × 1024
3072 bytes
bytes to bits
3072 × 8
24576 bits
A text file is 3 KB. With 1 KB = 1024 bytes it holds 3 × 1024 = 3072 bytes, and that is 3072 × 8 = 24576 bits.
Class activity
Write a sentence of about 30 characters on paper. Count its characters, spaces and signs included, and give its size in bytes and in bits when each character takes one byte.
Practice
1
How many bits are in 3 bytes?
3 × 8 = 24 bits.
2
With 1 KB = 1024 bytes, how many bytes are in 2 KB?
2 × 1024 = 2048 bytes.
3
How many bits does the pattern 1001110 have?
Seven bits.
4
A message of 50 characters is stored with one byte per character. How many bytes and how many bits is it?
50 bytes, which is 50 × 8 = 400 bits.
5
Is a byte a unit of speed?
No. Bits and bytes measure how much data there is, not how fast it moves.