Binary: the language of computers

Advanced

Computers only understand 0 and 1. One 01 is a bit; eight bits make a byte — just enough to store one English letter.

For:Secondary 1 Information & Communication Technology · Unit:Computer systems · Lesson 3 of 13 in the learning path

After this lesson, you can:
  • The computer world is only 0s and 1s (bits)
  • 8 bits = 1 byte, roughly one English letter
  • Units: KB → MB → GB → TB, each 1024 times bigger
資訊及通訊科技Information & Communication Technology
Before this lesson you should know: Software and operating systems

§Text Passage

1A computer's circuits can reliably distinguish only two states — electricity on (1) or off (0) — so all data is expressed in binary: text, images, video and sound must all become strings of 0s and 1s before they can be stored. A single 0 or 1 is called a bit, and eight bits make one byte, exactly enough to represent one English letter, digit or symbol: the computer's most basic language.

2In practice, the computer uses ASCII encoding to turn characters into numbers: capital A, for instance, is 01000001 in binary — 65 in decimal; when you press A on the keyboard, what is actually stored is that string of 0s and 1s. Learning to convert a binary number such as 1011 into decimal shows how a computer counts, and how images and sound become streams of numbers saved inside files.

3Hong Kong example: a 1000 GB hard disk selling for a few hundred dollars in a Sham Shui Po computer mall, or the 8 GB of data in a mobile plan, all comes down to the arithmetic of bits and bytes. Understanding the conversion between bits and bytes lets you compare file sizes and broadband speeds with confidence, so exaggerated advertising never misleads you and you shop wisely.

1Summary 重點摘要

Computers only understand 0 and 1. One 01 is a bit; eight bits make a byte — just enough to store one English letter.

2Vocabulary cards Vocabulary

B
Bit位元

One binary digit: only 0 or 1.

B
Byte位元組

A group of 8 bits — usually one English letter or symbol.

B
Binary二進制

A counting system that carries when reaching two: only 0 and 1.

A
ASCIIASCII 碼

A standard giving every English letter and symbol a number, e.g. A = 65.

K
KB / MB / GB / TB容量單位

Storage units from small to large, each 1024 times the last: KB → MB → GB → TB.

D
Decimal十進制

Our everyday counting system with the digits 0–9, carrying at ten.

P
Pixel像素

The smallest dot of an image; each dot's colour is a number, finally stored as 0s and 1s.

D
Data資料

The information a computer handles — text, numbers, images, sound — all stored in binary.

3Step by step Steps

  1. Why computers use only 0 and 1A computer circuit most reliably distinguishes two states: current on (1) and off (0). With only two states, a signal survives slight interference and still reads clearly as 0 or 1, and the circuitry stays simple, reliable and cheap; telling ten states apart directly invites errors. So a computer stores everything in binary: text, images, sound and video all become strings of 0s and 1s before storage. It is the same logic as a light switch, which is merely on or off.
  2. Counting in binaryDecimal carries at ten; binary carries at two: the binary sequence 1, 10, 11, 100, 101, 110, 111, 1000 corresponds to decimal 1 through 8. The crucial point is that binary '10' means two, not ten — the classic error — so always state the base, writing 1011₂ or 'binary 1011' in words. In an exam answer, omitting the base leaves '10' ambiguous between two and ten and costs marks directly. Labelling the base is the first rule of binary questions.
  3. Binary to decimal: place valuesConvert by multiplying each digit by its place value and adding; from the right the values run 1, 2, 4, 8, 16 — the powers of two. For binary 1011 the digits from the right are 1, 1, 0, 1, so 1×1 + 1×2 + 0×4 + 1×8 = 11, meaning 1011₂ = 11 in decimal. A quick check on place values: the rightmost place is always 1 and each step left doubles it. Beginners often reverse the place values left-to-right and ruin the whole sum; writing the place values right-to-left before starting is the safest routine.
  4. Bits, bytes and file sizesOne 0 or 1 is a bit; eight bits make one byte, just enough to store one English letter. Upward: 1024 bytes = 1 KB, 1024 KB = 1 MB, 1024 MB = 1 GB, 1024 GB = 1 TB — each step is 1024 times, not 1000. For everyday scale: a phone photo runs 2 to 5 MB, a song about 4 MB, and an hour of video counts in GB, which is why a 128 GB phone fills up quickly — one reason cloud storage and streaming keep growing in popularity.
  5. Beyond numbers: text, images and soundBinary stores more than numbers. Text uses code tables — ASCII writes capital A as 65 (binary 01000001), and typing A records exactly that string of 0s and 1s. An image is a grid of pixels, each colour stored as a number, so a megapixel camera saves a million values; sound is sampled as loudness numbers at tiny intervals. Every medium ends as 0s and 1s, differing only in the encoding — and that is why copying a file loses nothing at all.
  6. Decimal to binary: divide by two, take remaindersThe reverse uses repeated division by 2: divide the number by 2, note each remainder, stop when the quotient reaches 0, then read the remainders bottom-up. For 13: 13 ÷ 2 = 6 remainder 1; 6 ÷ 2 = 3 remainder 0; 3 ÷ 2 = 1 remainder 1; 1 ÷ 2 = 0 remainder 1; read bottom-up as 1101, the binary form of 13. Verify with place values: 1×8 + 1×4 + 0×2 + 1×1 = 13. The two methods invert each other — answering with one and checking with the other is the safest combination in an exam.

4Diagrams Diagrams

二進制:只有 0 同 1 的語言 Binary電腦入面只有「開」同「關」:1 = 開燈,0 = 燈熄1 0 1 08421位值:8 + 0 + 2 + 0 = 10(十進制)每一位只係十進制嘅十分一;二進制每一位係兩倍——1, 2, 4, 8, 16…點解用二進制?電路只有「有電/冇電」最穩陣——訊號亂都分得出一張相=幾百萬個 0/1;所有相片歌詞影片,電腦眼底全部都係二進制
Fig. 1: Binary basics

5Worked example Example

Example: convert binary 1101 to decimal, then verify.

  1. Write the place values right-to-left: 1, 2, 4, 8.
  2. The digits of 1101 are, from the right, 1, 0, 1, 1.
  3. Compute: 1×1 + 0×2 + 1×4 + 1×8 = 1 + 0 + 4 + 8 = 13.
  4. Verify by repeated division: 13 ÷ 2 leaves 1, 6 ÷ 2 leaves 0, 3 ÷ 2 leaves 1, 1 ÷ 2 leaves 1; read bottom-up to recover 1101.
  5. Conclusion: binary 1101 equals decimal 13, confirmed by both methods.
  6. Answer: Binary 1101 equals decimal 13 — multiply each digit by the place values 1, 2, 4, 8 and add; check by repeated division by 2, reading the remainders bottom-up to recover 1101, so both methods agree.

6Common mistakes Mistakes

✗ Reading binary 10 as ten.
✓ Binary 10 is two — binary carries at two, decimal at ten.
✗ Thinking 1 KB is 1000 bytes like a kilogram.
✓ Computer storage goes up in 1024s (two to the power of ten), not 1000s.
✗ Thinking photos and text are kept as photos and text.
✓ Everything — photos, text, sound, video — ends up as 0s and 1s; only the encoding differs.
✗ Thinking one byte can hold a Chinese character.
✓ One byte (8 bits) usually holds just one English letter; Chinese characters need encodings such as Big-5 or Unicode, taking two bytes or more.

7Quick check Quick check

Q1How many bits make a byte? A. 4 B. 8 C. 1024

Q2What is binary 1010 in decimal?

Q3Order from small to large: GB, byte, KB, MB, TB

Q4Convert binary 111 to decimal.

Q5Why do computers use binary instead of decimal?

8Recap Recap

  • The computer world is only 0s and 1s (bits)
  • 8 bits = 1 byte, roughly one English letter
  • Units: KB → MB → GB → TB, each 1024 times bigger
  • Text, images, sound and video are all stored in binary
  • Conversion trick: place values 1, 2, 4, 8 from the right — multiply, then add

Other subjects in this grade

Same subject, other grades