Von Neumann Architecture and the Birth of Computers
In 1945, John von Neumann proposed a new computer design that would shape the architecture of nearly all modern computers. This design became known as the Von Neumann Architecture.
It consists of three main components:
- CPU (Central Processing Unit): Executes instructions, performs arithmetic and logic as well as read/write operations to both memory and I/O. CPU state is represented by its registers.
- RAM (Random Access Memory): Temporarily stores both instructions and data. Each byte in memory has an address, most addresses have Read/Write operability. RAM is limited in size and scrambled during booting, so unfit for persistence. Some addresses, such as the boot rom, map to chips that are readonly and persistent.
- I/O peripherals: For example SSD, keyboard, graphics card, usb, ethernet. Each peripheral has one or more ports and read/write operations are performed serially, this is referred to as an I/O stream.
Core Concepts
- Stored Program Concept: Programs and data are both stored in memory as binary numbers.
- Sequential Execution: The CPU reads instructions one at a time from memory using the program counter.
- Fetch–Decode–Execute Cycle: The core operation of the CPU.
Instruction Cycle (Simplified)
byte[] memory = new byte[...];
int pc = 0;
while (running) {
int instruction = memory[pc];
pc += 1;
decode_and_execute(instruction);
} Analogy
Think of it like a kitchen:
- Recipe Book (Storage): Has all the recipes (programs).
- Counter Space (RAM): Where you actually prepare the dish — ingredients go in and out quickly.
- Chef (CPU): Reads the recipe step by step and performs the actions.