Von Neumann architecture

Martin McBride, 2017-01-22
Tags none
Categories none

The earliest computing devices were generally mechanical, and typically only had a single specialised function.

Stored program computers

The idea of a "programmable" machine was not new. Punched cards are usually associated with early mainframe computers from the 1960s, but in fact they were first used to program looms to weave patterns in fabric. The Jacquard loom, developed in 1804, used punched cards to allow the same loom to create a wide variety of different patterns, simply by using different sets of cards.

In the 1930s, Alan Turing devised the Turing Machine. This was a simple device, which reads and writes symbols on a tape according to simple rules. The initial set of symbols on the tape would determine the behaviour of the machine - its program. In theory, any computer algorithm can be simulated by a Turing Machine, just by starting out with the correct set of symbols on the tape.

It was a purely theoretical machine, far too inefficient to be used as an actual computer. But it illustrates the idea of a general purpose device who's behaviour is controlled by a program (the symbols on the tape).

Von Neumann architecture

The ideas of the Turing machine were adapted to create a more practical computer design. The Turing Machine itself was replaced with a CPU (Central Processing Unit), and the tape was replaced with computer memory.

A computer also need input and output devices - a keyboard or punched card reader for input, a printer or monitor for output. Of course a modern computer has all sorts of other input and output devices, including storage devices such as disk drives.

In earlier models, the assumption had been that a computer would need separate memory for storing the program and for storing data. Von Neumann realised that you could use the same memory, simply storing the program in one area and the data is a different area. This simplified the design.

Here is the basic Von Neumann architecture:

Von Neumann

The CPU, memory, and input and output (I/O) devices are connected by 3 buses control, address and date. A bus is just a set of wires which can transfer a binary value. For example, and 8-bit bus consists of 8 wires and can transfer an 8 bit binary value.

The buses

A big problem with the Turing Machine is that you had to move the tape backwards and forwards to read values from different places, which is fine in theory, but in practice it would make the device very slow. That is why it was a theoretical machine - it was never intended to be built and used (Turing machines have been built, but mainly as curiosities).

Modern computer memory is accessed by requesting the data at a particular address, and the value can be read or written straight away. This is called Random Access Memory (RAM) because you can access any address you like, without having to wait for a tape to move to a particular position.

An address is simply a number. For example, if you have 256 bytes of memory, each byte has a unique address, a number between 0 and 255. Most computers these days have far, far more than 256 bytes of memory, of course.

To read the data at byte 53, the CPU sets the 8 wires on the address bus to 00110101 (53), where 1 means a positive voltage, 0 means no voltage. The CPU will also set the wires on the control bus to request a data read. The RAM will respond by reading the data from address 53, and making the data available on the wires of the data bus.

To write the data at byte 53, the CPU sets the address bus to 53, and the data bus to whatever data value it wants to write. The CPU also sets the wires on the control bus to request a data write. The RAM will read the data from the data bus and store it in the required memory location (given by the address bus).

As you can see:

  • The address bus is unidirectional - the CPU always sets the bus to indicate the address being read or written.
  • The control bus is unidirectional - the CPU always sets it to indicate read or write operations.
  • The data bus is bidirectional - either the CPU writes data to memory, or it read data from memory.

Input and output

In the Von Neumann architecture, I/O devices are memory mapped. This means that there are special memory addresses which don't contain normal RAM - instead, when the CPU reads or writes to these addresses, that data may be read from the keyboard, or written to the display, etc.

Just a model

The Von Neumann architecture is just a model of how computer systems work. Many early computers, including 8 bit microprocessor chips from the 1980s, follow the architecture very closely. More modern chips have many features to make them run faster, such as multiple cores, cache memory and instruction pipelining, but they still basically follow the same model.

Copyright (c) Axlesoft Ltd 2020