Chapter 1 – Introduction to How a Computer Works
Understanding how a computer works inside is the foundation of computer science.
This guide explains all concepts from Chapter 1 in a simple way so that every student can understand—from digital circuits to high-level programming languages.
What Is a Digital Computer?
A digital computer works using 0s and 1s (binary numbers) and follows a program.
- Program = A list of instructions
- Instruction = A single command for the computer
Example
If the program says:
ADD 5 and 10
The computer internally works like:
00000101 + 00001010
Even simple tasks are broken down into binary operations.
Machine Language (Binary Language)
Machine language is the only language a CPU understands directly.
It consists of binary codes such as:
10100010 00000001
This might mean “move data from memory to register.”
Humans cannot understand it easily, so we use assembly and higher-level languages.
Structured Computer Organization
A computer is built in layers (levels).
Each level hides the complexity of the level below it.
Think of it like a 7-storey building:
You live on the top floors and don’t need to know what happens in the basement.
Computer Level Hierarchy (All Levels Explained with Examples)
The following levels build the complete structure of a computer:
Level 0 — Digital Logic Level
This level contains electronic circuits, such as:
- AND, OR, NOT gates
- Flip-flops
- Transistors
Everything here works in binary → 0 (OFF), 1 (ON)
Example: AND Gate
| A | B | Output |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
These simple circuits are combined to create CPUs and memory.
Level 1 — Control / Microarchitecture Level
This level contains the Control Unit (CU) which:
- Decodes instructions
- Controls the execution
- Moves data inside the CPU
Two types of control:
1. Hardwired Control
- Implemented directly in hardware
- Very fast
- Hard to modify
Example
When executing ADD instruction:
- Fetch the numbers
- Add them
- Store the result
These steps are controlled by hardware circuits.
2. Microprogrammed Control
- Uses a small memory called control memory
- Stores microinstructions
- Easy to modify
Example of Micro-operations
LOAD R1, M[200]
LOAD R2, M[204]
ADD R1, R2
STORE R1, M[208]
These microinstructions define how a higher-level instruction works.
Level 2 — Machine Level / Instruction Set Architecture (ISA)
This level defines the instructions the CPU understands.
It includes:
- Instruction formats
- Data types
- Registers
- Addressing modes
Example (x86 ISA)
MOV AX, 5
ADD AX, 10
These are readable by humans but directly executed by hardware.
Level 3 — System Software Level
This level contains:
- Operating System
- Compilers
- Interpreters
- Linkers
- Device drivers
The OS manages everything.
Example
When you open Google Chrome:
- OS loads it into RAM
- Manages CPU time
- Controls tabs as processes
- Handles internet hardware
Without the OS, nothing would run.
Level 4 — Assembly Language Level
This is the lowest human-readable language.
Machine code:
10110001
Assembly:
MOV R1, R2
Example
To add numbers in assembly:
MOV R1, 5
MOV R2, 10
ADD R1, R2
Assembler converts this to machine language.
Level 5 — High-Level Language Level
Languages:
- C
- C++
- Python
- Java
These are easy to write and understand.
Example (C code)
sum = a + b;
The compiler converts this to assembly → machine language → hardware instructions.
Level 6 — User Level
This is what you interact with:
- Word
- YouTube
- Games
- Browsers
- Apps
User sees only the results, not the internal processing.
Evolution of Multilevel Machines
Early Computers (1950s)
Only two levels:
- ISA Level
- Hardware Level
Programs were written in machine language or assembly.
1951 – Maurice Wilkes Introduces Microprogramming
Hardware becomes simpler and faster.
1960s – Batch Operating Systems
Programs were submitted through punch cards.
Example Punch Card
010001 101010 000111
1970s – Time-Sharing Systems
Many users used terminals connected to one CPU.
1980s – RISC Revolution
Instruction sets were simplified → processors became faster.
Examples:
- ARM processors
- MIPS processor
Important Milestones in Computer Architecture
1. Von Neumann Architecture
Components:
- Memory
- CPU
- Input/Output
- Bus
Example
To execute A = B + C:
- Fetch instruction
- Fetch B and C
- Add them
- Store result in A
All data passes through the system bus.
2. Moore’s Law
Transistors on a chip double every 18 months.
Example
If a chip had:
- 1000 transistors in 1970
- 2000 in 1972
- 4000 in 1974
This exponential growth made computers smaller and faster.
Types of Computers
1. Disposable Computers
Found in:
- Musical greeting cards
Used for single-purpose tasks.
2. Embedded Computers
Inside:
- Washing machine
- Microwave
- TVs
- Cars
Small and specialized.
3. Game Consoles
Such as:
- PlayStation
- Xbox
4. Servers
Powerful PCs used in:
- Banks
- Data centers
- Websites
5. Mainframes
Used for:
- Large databases
- Airlines
- Government systems
6. Supercomputers
Fastest computers used for:
- Climate simulation
- Space research
- AI training
Important CPU Families
Intel CPUs
- 4004 – first single-chip CPU
- 8088 – used in first IBM PC
- 80286 / 386 / 486 – faster generations
- Pentium → Pentium II → modern CPUs
UltraSPARC II
Used in powerful UNIX servers.
picoJava II
A processor designed specifically for Java Virtual Machines.
Used in:
- Smart cards
- Embedded Java devices
Final Summary (For Revision)
Computer organization has many levels:
- Digital Logic
- Microarchitecture
- ISA
- System Software
- Assembly
- High-Level Languages
- User Level
Each level hides complexity and makes computing easier.
Understanding these concepts is essential for:
- Computer architecture
- Operating systems
- Programming
- Hardware design