Brief Introduction
Your computer might store thousands of photos, hundreds of music tracks, and countless high-definition movies. Your documents, installed apps, games, and operating system all live on your storage drive.
Yet to the computer hardware, none of these are inherently "pictures," "songs," "videos," or "sentences."
Physical computer hardware operates exclusively on bits.
- How do billions of bits assemble into a realistic photo?
- How does the word
Helloget preserved in storage? - How does a 2 GB movie fit onto flash chips?
In this lesson, we break down data representation step by step.
1. Bit — The Smallest Digital Building Block
As seen in the previous lesson, a computer's digital system operates on two distinct physical states: 0 or 1.
A single binary digit is named a Bit (Binary Digit).
A lone bit can represent very little information by itself. To represent complex reality, computers group many bits together.
2. What Happens When We Combine Multiple Bits?
With 2 bits, we unlock 4 distinct combinations:
Total: 2² = 4 combinations
3 bits: 2³ = 8 | 4 bits: 2⁴ = 16 combinations
Fundamental Rule
n bits → 2ⁿ possible combinations
The more bits grouped together, the richer the information that can be encoded.
3. What Is a Byte?
In computer architecture, the most vital standard group of bits is the Byte.
Example: 10110101 (8 binary digits = 1 byte).
Range: from 00000000 to 11111111.
4. Units Beyond the Byte
As data scales, we use standard decimal and binary prefix multiples:
5. Is a KB Always 1024 Bytes?
In traditional binary systems: 1 KB = 1024 Bytes (2¹⁰).
However, modern drive manufacturers measure storage using decimal powers of 10: 1 kB = 1,000 Bytes (10³).
1 KiB = 1,024 Bytes
1 MiB = 1,024 KiB
1 GiB = 1,024 MiB
1 kB = 1,000 Bytes
1 MB = 1,000,000 Bytes
1 GB = 1,000,000,000 Bytes
This explains why a drive labeled "500 GB" on its packaging appears as ~465 GB inside Windows.
6. Storing Numbers in Binary
Consider storing the positive decimal integer 13:
Hardware arithmetic circuits manipulate these binary place-value bits directly to perform addition and calculation.
7. How Negative Numbers Are Stored
If positive 5 is stored as binary, how does a computer store -5?
Modern computers universally represent signed negative integers using Two's Complement.
8. Floating-Point Numbers (Decimals)
How do computers encode real numbers like 3.14159?
Hardware uses the IEEE 754 Floating-Point Standard, which divides bits into a Sign bit, an Exponent, and a Mantissa (fractional part).
This is not a software bug; it is an inherent artifact of representing base-10 fractions in finite binary bits.
9. How Text Becomes Binary
To store a word like Hello, we need an agreed convention that maps every character to a specific numeric identifier: Character Encoding.
ASCII Encoding
ASCII defines 7-bit/8-bit numeric codes for English letters, numbers, and symbols:
10. Unicode — Encompassing Every Human Language
ASCII was limited to English. For global languages—Bengali, Chinese (你好), Arabic (مرحبا), Japanese (こんにちは), plus emojis (🚀)—computing created Unicode.
UTF-8 is the universal encoding of the modern web. It is variable-length (1 to 4 bytes per character) and fully backward compatible with ASCII.
11. How Images Become Binary
A computer raster image is made of microscopic squares called Pixels. In the standard RGB (Red, Green, Blue) model, each pixel has 3 color channels (0 to 255):
12. Image Resolution and Size
In a standard 1920 × 1080 Full HD image:
With 3 bytes (24 bits) per pixel for RGB, uncompressed raw storage would require roughly 6.2 MB for just a single still frame!
13. Image Compression (JPEG)
Raw pixel grids are too large for storage and transmission. JPEG uses mathematical transforms to discard subtle details imperceptible to human eyes (lossy compression):
14. How Audio Becomes Binary
A microphone converts continuous acoustic sound pressure into an analog electrical voltage. Analog-to-Digital converters (ADC) transform it into bits:
The wave's voltage is measured 44,100 times every second (standard CD quality).
The precision allocated to store each amplitude measurement.
15. How Video Becomes Binary
Video is a synchronized rapid sequence of image frames paired with multichannel audio (e.g., 30 FPS = 30 still images per second):
16. Computer Programs Are Data Too
Data is not restricted to static files like photos or songs. Executable applications are also stored as binary data:
17. Identical Bits, Different Meanings
Suppose memory contains the byte: 01000001
A Profound Computing Truth
Bits possess zero inherent meaning on their own. Meaning arises entirely from Interpretation + Context + Format.
Interpreted as text, it is the letter 'A'. As an integer, it is 65. As pixel data, it could be an intensity level of red.
18. What Is a File?
A file is a structured container of bytes stored with a defined metadata format so software knows how to parse it:
19. Why Compression Is Critical
Decompresses back into the original bits with 100% mathematical fidelity (e.g. ZIP, PNG, FLAC).
Discards redundant perceptual data to achieve radical size reductions (e.g. JPEG, MP3, MP4, WebP).
20. Data at Global Scale
From a 1 KB text note to the exabytes of video housed in YouTube datacenters, all modern digital civilization rests on this identical foundation of bits and bytes.
21. The Complete Journey: From Camera Flash to Storage
22. Where Do Bits Physically Live?
Bits are not physical characters carved into chips. In flash SSDs, they are trapped electrons altering the voltage conductivity of microscopic floating-gate transistors.
23. Abstraction — The Core Principle of Computing
Abstraction hides overwhelming physical complexity behind intuitive higher-level interfaces:
24. From Bits to Artificial Intelligence
Even multi-billion-parameter neural networks and Large Language Models consist fundamentally of matrix weight matrices stored and computed as floating-point binary bits.
🧠 Key Takeaways
- A Bit is a binary digit — 0 or 1.
- 1 Byte = 8 bits (256 combinations).
- A group of
nbits produces 2ⁿ possible combinations. - Numbers, Text (Unicode/UTF-8), Images (RGB Pixels), Audio, and Video are all digital data.
- Software program instructions are also stored as digital data.
- Bits have no intrinsic meaning; format and interpretation create meaning.
- Abstraction enables developers to create software without manually managing electrons.
Lesson 05 — Transistors: The Smallest Electronic Switch in the World
How are 0 and 1 physically generated inside silicon?
Next, our hardware construction begins: Transistor → Logic Gate → Circuit → Adder → ALU → CPU → Computer.