A recipe book and a cook are separate things. The book holds the instructions and the cook carries them out one after another. The stored-program computer follows the same idea, and the design that describes it is named after the mathematician John von Neumann.
The Stored-Program Concept
In early machines the program was set by changing wires or switches. The stored-program concept places both the instructions and the data in the same memory. The processor reads an instruction from memory, carries it out and then reads the next one. Changing the program only means placing different values in memory.
Definition: Von Neumann architecture. A computer design in which a single memory holds both program instructions and data, and a central processing unit fetches and executes the instructions in sequence.
Components
The design has five parts The input unit brings data and programs in. The memory unit stores instructions and data. The arithmetic and logic unit (ALU) performs calculations and comparisons. The control unit (CU) reads each instruction and directs the other parts. The output unit presents the results. The ALU and control unit together form the central processing unit (CPU).
Working and Limitation
The CPU repeats a cycle: it fetches an instruction from memory, decodes it and executes it. Because instructions and data share one memory and one path to the CPU, they cannot both be transferred at the same moment. This limit on the speed of transfer is known as the Von Neumann bottleneck. Cache memory and parallel designs, studied in Unit IV, reduce its effect.
Memory is organised as a sequence of numbered locations called addresses. The CPU supplies an address to read or write one location, and the same mechanism serves both instructions and data. A register called the program counter holds the address of the next instruction. It is increased after each fetch so that instructions are taken in order, unless a jump instruction changes it.
Table 1.2: Functions of the main units
| Unit | Function |
|---|---|
| Input unit | Accepts data and instructions from the user |
| Memory unit | Holds the program and its data |
| ALU | Performs arithmetic and logical operations |
| Control unit | Fetches, decodes and directs execution of instructions |
| Output unit | Delivers results to the user |
Example 1.2: Tracing a stored program
Problem: Memory holds three instructions in order: LOAD 5, ADD 7, STORE the result. Describe what the units do.
Solution:
- The control unit fetches LOAD 5 from memory and places 5 in a register.
- It fetches ADD 7 and instructs the ALU to compute 5 + 7.
- The ALU produces 12.
- It fetches the store instruction and the value 12 is written back to memory.
Result: The final stored value is 12. All three instructions and the data came from the same memory.
Common mistakes
- Saying the ALU decides which instruction is executed next. That is the work of the control unit.
- Believing that the program is separate from memory in this design.
- Mixing up the CPU with the whole computer.
Key takeaways
- Instructions and data share one memory.
- The CPU consists of the ALU and the control unit.
- Instructions are fetched, decoded and executed in sequence.
- The shared path creates the Von Neumann bottleneck.
Practice questions
- What is the stored-program concept?
- Name the five functional parts of the Von Neumann architecture.
- What is the Von Neumann bottleneck?
Answers to the practice questions
- Keeping both instructions and data in the same memory so that the CPU can fetch and execute them in sequence.
- Input unit, memory unit, ALU, control unit and output unit.
- The limit on speed caused by instructions and data sharing a single path between memory and CPU.
Sources
- Official BCA syllabus Computer Architecture, course code 25BCA401DS02, Unit I
