10 min read Beginner Lesson 03 (of 30)
Course 01 · Part 1 — Foundations

Lesson 03 — Why Do Computers Use Binary?

Why do computers only understand 0 and 1? Explore how physical electrical signals become digital states and transform into text, images, and intelligent systems.

Brief Introduction

Whenever you view an image, stream a video, play a game, or ask a question in ChatGPT—deep inside, the computer is processing vast amounts of data.

Yet how does a computer actually understand that data?

Number 25
Text Hello
Image Human Face
Program Thousands of lines

At the lowest level of computer hardware, all these concepts must be represented in a form that electronic circuits can physically process.

Binary: 0 and 1

Why only 0 and 1? To answer this, we must examine the physical foundations of computing machinery.

1. Computers Ultimately Operate on Electricity

When looking at screens, keyboards, or CPU processors, it is tempting to think computers are fundamentally made of software.

Underneath all software lies hardware. And beneath hardware are electrical signals.

Within a computer's electronic circuits, electrical voltages and currents change continuously. In simplified conceptual terms:

Signal Present

1 = ON / High

Signal Absent

0 = OFF / Low

This is a simplified conceptual model. Real physical hardware uses specific voltage threshold ranges rather than a single fixed voltage, but this core concept is essential for understanding digital computation.

2. Why Are Two States So Important?

Imagine a simple light switch. It has two distinct positions: OFF or ON.

If we label OFF as 0 and ON as 1, this simple switch can represent information:

OFF → 0 | ON → 1

A single switch can only express two states. What happens when we group multiple switches together? We can represent significantly more combinations:

2 Positions (4 combinations):
0 0 0 1 1 0 1 1
3 Positions (8 combinations):
000 001 010 011 100 101 110 111
The real power of binary comes not from 0 and 1 in isolation—it comes from combining many binary states together.

3. What Is a Bit?

Short for Binary Digit, a Bit is the fundamental atom of digital information.

A single bit can hold only one of two values: 0 or 1. It is the smallest possible unit of data in computing.

0 1 bit
1 1 bit
101101 6 bits

4. How Much Information in a Bit?

Because each bit has 2 possible states (0 or 1): 1 bit = 2 combinations

  • 2 bits = 2² = 4 combinations
  • 3 bits = 2³ = 8 combinations
  • 4 bits = 2⁴ = 16 combinations
Bits Possible Combinations
12
24
38
416
8256
1665,536
324,294,967,296
General Formula: n bits → 2ⁿ possible combinations

5. Why Are 8 Bits So Important? (The Byte)

When 8 bits are grouped together, they form a Byte.

1 Byte = 8 bits 2⁸ = 256 possible combinations

Ranging from: 00000000 to 11111111.

Because 256 combinations comfortably encode all standard English alphanumeric characters, punctuation, and system controls, the byte became the primary foundational unit for data storage and memory addressing.

6. How Binary Numbers Map to Decimal

In daily life, humans use the Decimal system (Base 10) with 10 digits: 0 1 2 3 4 5 6 7 8 9.

The binary system uses only 2 digits (Base 2): 0 and 1.

Human Language Decimal (Base 10)
Machine Language Binary (Base 2)

7. Reading a Binary Number

Consider the binary value: 1011

Reading each positional weight from right to left:

Position 32³ = 8
Position 22² = 4
Position 12¹ = 2
Position 02⁰ = 1
1011₂ = (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 8 + 0 + 2 + 1 = 11₁₀

Binary 1011 translates precisely to decimal 11.

8. Why Don't Computers Use Decimal Directly?

Decimal feels natural to people because we have ten fingers. Why didn't computer designers build chips with 10 voltage levels?

In physical electronics, distinguishing between two states is drastically simpler, faster, and more reliable than distinguishing ten:

Low Voltage → 0 High Voltage → 1

Attempting to differentiate 10 distinct electrical voltage steps (e.g. 0.0V, 0.5V, 1.0V ... 4.5V) within billions of microscopic transistors would make circuits extremely vulnerable to minor heat variations and electrical noise.

The core strength of digital electronics lies in transforming continuous, noisy physical phenomena into unambiguous discrete states.

9. Electrical Noise and Noise Margins

In the physical world, real electrical signals fluctuate due to thermal noise, electromagnetic interference, and manufacturing imperfections.

By defining broad voltage bands rather than exact single numbers, circuits tolerate significant fluctuations without corrupting data:

LOW RANGE (0) | Noise Margin | HIGH RANGE (1)

Key Idea: Digital logic does not demand perfect physical voltages. As long as a voltage falls within the valid threshold region, it is cleanly interpreted as 0 or 1.

10. Does Binary Equal Electricity?

No.

Binary is an information representation system. Electricity is simply the physical medium used by semiconductor hardware.

Electrical Conditions Electronic Circuits Digital States 0 / 1 Binary Representation Data & Instructions

The symbols 0 and 1 are mathematical abstractions that give conceptual meaning to physical electrical states.

11. Not Just Numbers — Text is Also Binary

Computers have no innate understanding of characters like H, e, l, l, o.

Character encoding standards (such as ASCII and Unicode) assign every character a specific numeric code, which then converts into binary:

Character ('A') Numeric Code (65) Binary (01000001)

12. How Images, Audio, and Video Become Binary

A digital image consists of a grid of tiny dots called pixels. Each pixel's color is defined by numeric intensity values (Red, Green, Blue):

Image: Image → Pixels → Color values (RGB) → Numbers → Binary
Audio: Sound wave → Samples → Numbers → Binary
Video: Frames + Audio Streams → Numbers → Binary

To a computer processor, all rich media—text, audio, photo, and 4K video—is unified into digital binary data.

13. Instructions Are Binary Too

Computers do not merely store passive data; they execute operations (Add, Move, Compare, Load, Store). The CPU's machine instructions are also encoded as binary sequences:

Program Machine Instructions Binary Representation Electronic Processing

14. From Binary to Logic

Computers perform logical operations on binary values such as AND, OR, NOT using electronic circuits called Logic Gates:

AND Gate Truth Table
Input AInput BOutput
000
010
100
111
Binary Values → Logic Operations → Decision Making

15. Where Transistors Come In

How does hardware construct these logical decisions? This is where the Transistor (an ultra-fast microscopic electronic switch) enters:

Electricity Transistor Logic Gate Digital Circuit CPU

This direct hierarchical bridge is the foundational thread running through all computing hardware.

16. The Greatest Advantage of Binary

The simplicity of binary is its greatest strength. By combining just two fundamental states (0 and 1) into billions of permutations, computing unlocks:

Numbers Text Images Audio Video Programs Databases AI Models

17. A Quick Walkthrough — From Pressing "A" to Screen Display

Imagine you press the letter key: A

1 Keyboard controller detects physical switch contact
2 Computer hardware receives digital serial signal
3 OS driver interprets key scan code as letter "A"
4 Encoding maps it to integer code 65
5 The number is represented in binary (01000001)
6 Processor circuits and RAM manipulate the bit values
7 Render engine selects glyph bitmap outline
8 Display system lights up screen pixels
A

Behind that clean letter on your display lies an intricate choreography of hardware and software abstractions.

18. Is Binary Mandatory for Computing?

Binary is the overwhelmingly dominant representation in digital engineering, but not the only theoretical one.

Engineers have historically developed analog computers, ternary (base-3) computers, and today are researching quantum computers using qubits.

Nonetheless, modern computers remain universally binary because binary semiconductors are vastly more practical, manufacturable, noise-tolerant, and scalable than any existing alternative.

19. From Binary to the Modern Computer

Now we have a clear conceptual picture of binary representation. The next essential questions follow naturally:

"How does a transistor physically generate 0 and 1?"
"How do transistors wire together to form AND, OR, and NOT gates?"
"How do those logic gates assemble into circuits capable of mathematical addition?"

Answering these questions will take us straight into the physical electronic heart of modern processors.

🧠 Key Takeaways

  1. Binary is a Base-2 numbering and information representation system.
  2. Binary uses only two digits: 0 and 1.
  3. A single bit represents two possible states.
  4. 8 bits = 1 byte (yielding 256 distinct combinations).
  5. A group of n bits can represent 2ⁿ distinct combinations.
  6. Modern digital systems use binary because reliably distinguishing two broad voltage ranges is vastly simpler than many.
  7. Binary is not electricity itself; it is an abstract representation encoded through electrical states.
  8. Numbers, text, images, audio, video, and code instructions all reduce to digital binary data.
  9. Logic gates carry out boolean operations upon binary values.
  10. Logic gates are constructed from semiconductor switches called transistors.
  11. Transistors → Logic Gates → Circuits → CPU: this hierarchy is the key to understanding computers.
🚀 Next Lesson

Lesson 04 — Bits, Bytes & How Data is Represented in Computers

In the next lesson, we advance to practical data representation:

Bit Byte KB MB GB TB

And answer a vital question: "How does a computer use 0 and 1 to encode so many different types of complex information?"

After that, we dive straight into hardware to begin assembling physical computer logic.