Von Neumann Architecture: From Memory to Action
Von Neumann architecture is a stored-program organization in which program instructions and data occupy the same addressable memory. A processor reads instructions from that memory and carries out the operations they specify. This explains how one computer can run different programs: loading different instructions changes its behaviour without requiring different wiring. The architecture describes the basic organization of computation, rather than every detail of a modern processor.
Instructions and data share memory
Memory contains locations identified by numerical addresses. An address tells the processor where to look; the contents are the bits stored at that location. Keep these ideas separate: reading location 80 retrieves its contents, which need not be the number 80.
Instructions are encoded as bits, just as numbers and other data are. An instruction typically specifies an operation and information needed to carry it out. For example, an instruction may request a value from another memory location or direct the processor to store a result.
The use of a bit pattern determines whether it is treated as an instruction or as data. Fetching it as the next instruction leads to decoding; reading it as an operand supplies a value for an operation. Shared memory does not mean every program may freely access every location: an actual system can impose protection rules.
The repeating instruction cycle
The fetch-decode-execute cycle is the repeating sequence through which the processor obtains an instruction, interprets it and performs its operation. A program counter keeps track of where instruction fetching should continue.
Stage | What happens | What to distinguish |
|---|---|---|
Fetch | Read the next instruction from memory using the program counter. | Fetching an instruction is different from reading its data operand. |
Decode | Interpret the instruction's operation and operand information. | Identifying a requested value is different from calculating the result. |
Execute | Perform the operation, including any required data access or change of control flow. | An operation may update memory, processor state or the next instruction address. |
For a sequence of instructions, the program counter advances to the following instruction. The distance it advances depends on instruction length and how memory is addressed; it is not universally one address. A branch instruction can instead select a different next address, allowing decisions and repetition.
After execution, the cycle repeats. Input provides information that a program can use, and output communicates results. Not every instruction produces visible output: many instructions simply move values, calculate intermediate results or determine what happens next.
Why shared transfers matter
Instructions must reach the processor, and many instructions also require data transfers. With a shared memory path, these demands compete for transfer capacity. This limitation is commonly called the von Neumann bottleneck.
For a simplified model in which every transfer takes the same time, the total time spent transferring is
Count instruction fetches and data reads or writes separately. Fetching an instruction that requests a memory operand does not automatically fetch that operand too.
What to remember
- Instructions and data share addressable memory.
- Fetch obtains an instruction; decode interprets it; execute performs it.
- The program counter tracks instruction flow, which branches can change.
- Instruction fetches and data accesses both contribute to memory traffic.
Example: Adding two stored measurements
Example: An educational simulator uses Von Neumann Architecture to add two whole-number sensor measurements. A memory trace records the memory locations accessed as a program runs. Use the following trace to distinguish instruction fetching from data access.
Each instruction occupies one memory location. The program counter starts at 20 and advances by one during each fetch. The accumulator is a processor register that holds the current working value; it initially contains 0.
Address | Initial contents |
|---|---|
20 | LOAD 70 |
21 | ADD 71 |
22 | STORE 72 |
70 | 18 |
71 | 7 |
72 | 0 |
LOAD copies a memory value into the accumulator. ADD adds a memory value to the accumulator. STORE copies the accumulator into memory without changing the accumulator. Stop after STORE finishes; no halt instruction is included.
Every instruction fetch, data read and data write takes 40 ns. There is no overlap, and all other processing time is negligible.
a) After LOAD 70 finishes, what are the program counter and accumulator values?
First fetch the instruction from address 20. Since each instruction occupies one location, advance the program counter:
The program counter now contains 21. Decode LOAD 70, then execute it by reading location 70. The value read is 18, so copy 18 into the accumulator. The operand address is 70, but the operand value is 18.
Answer: The program counter is 21 and the accumulator contains 18.
b) After ADD 71 and STORE 72 finish, what are the accumulator, location 72 and program counter values?
Fetch ADD 71 from address 21, advancing the program counter to ________. Its data read retrieves ________ from location 71. Add that value to the accumulator:
Next fetch STORE 72 from address 22, advancing the program counter to 23. Execute the instruction by writing 25 into location 72. A store copies the working value into memory; it does not clear the accumulator.
Answer: The accumulator contains 25, location 72 contains 25 and the program counter is 23.
c) How many memory transfers occur, and how long does this program take under the stated timing assumptions?
Each of the three instructions requires one fetch, giving ________ instruction-fetch transfers. LOAD and ADD each require one data read, and STORE requires one data write. These are ________ further transfers.
The calculation includes both instruction traffic and data traffic. Their times add because transfers do not overlap, and no other processing time contributes under this simplified model.
Answer: There are 6 memory transfers, and execution takes 240 ns.
A ticket kiosk accepts a destination, calculates a fare, displays the price and retains transaction records after shutdown. Match each computer-system role to its description.
Applies program instructions to information to calculate or change a value
Supplies information to the computer from a person or its surroundings
Retains saved information when electrical power is removed
Presents information from the computer to a person or another system
Output
Input
Persistent storage
Processing
An educational simulator demonstrates Von Neumann Architecture. Each instruction occupies one memory location, and the program counter starts at 40. Fetch advances it by one; none of these instructions branches. The accumulator is a processor register holding a working value and initially contains 0.
Instruction address | Instruction | Meaning |
|---|---|---|
40 | LOAD 90 | Copy the contents of location 90 into the accumulator. |
41 | ADD 91 | Add the contents of location 91 to the accumulator. |
42 | STORE 92 | Copy the accumulator into location 92 without changing the accumulator. |
Initially, location 90 contains 26, location 91 contains 11 and location 92 contains 0. Complete the table with exact integers, recording the state after each instruction has finished executing.
| Instruction executed | Program counter | Accumulator | Contents of location 92 |
| LOAD 90 | |||
| ADD 91 | |||
| STORE 92 |