Digital computers store and process all information — numbers, text, images, sound — using only two symbols: 0 and 1. This section explains why binary is used and how data is organized in a digital system.
A digital computer is built from millions of tiny electronic switches called transistors. Each transistor has exactly two stable states:
| State | Voltage Level | Binary Digit |
|---|---|---|
| ON | High (~5V or ~3.3V) | 1 |
| OFF | Low (~0V) | 0 |
Because hardware can reliably distinguish between only two voltage levels, the binary number system (base-2) is the natural choice for representing data. Using more than two levels would make circuits far more complex and error-prone.
A bit (binary digit) is the most fundamental unit of data. It holds a single value: either 0 or 1.
A nibble is a group of 4 bits. It can represent different values (0–15).
A byte is a group of 8 bits. It can represent different values and is typically used to store a single character.
| Unit | Size |
|---|---|
| Kilobyte (KB) | bytes = 1,024 bytes |
| Megabyte (MB) | bytes ≈ 1 million bytes |
| Gigabyte (GB) | bytes ≈ 1 billion bytes |
| Terabyte (TB) | bytes ≈ 1 trillion bytes |
To represent text, computers use character encoding schemes that map characters to binary numbers.
ASCII (American Standard Code for Information Interchange) is the most widely used encoding for English text.
Example:
A = ASCII code 65 = binary 01000001a = ASCII code 97 = binary 01100001Unicode is a universal encoding standard designed to represent all written languages in the world.
EBCDIC (Extended Binary Coded Decimal Interchange Code) is an 8-bit encoding used primarily on IBM mainframe computers. It is not commonly used in modern personal computers.
BCD represents each decimal digit (0–9) using a 4-bit binary code. It is used in applications where decimal accuracy is critical, such as financial calculations and digital clocks.
| Concept | Key Fact |
|---|---|
| Bit | Single binary digit (0 or 1) |
| Nibble | 4 bits, values |
| Byte | 8 bits, values |
| ASCII (7-bit) | 128 characters |
| ASCII (8-bit extended) | 256 characters |
| Unicode | Represents all world languages |
| Binary used because | Hardware has 2 stable voltage states |