Computer Architecture

In this section we will look at computer architecture, in particular, the Von Neumann model and the fetch-execute cycle.

THE VON NEUMANN COMPUTER ARCHITECTURE

When we talk about computer architecture we are referring to the way computers are designed. Although computers may look differently, act differently on the surface and have totally different functions, they all operate from the same basic design. One of the main fouders of this way of building computers was called John Von Neumann.

Von Neumann was a Hungarian-American mathematician who worked for several universities in the United States as well as working on top secret assignments for the US government such as the Manhattan Project which resulted in the development of the first nuclear bomb during World War II. However, Von Neumann is perhaps best known, at least in computer-circles for his pioneering research moving computers forward towards the ones you use today.

edsac1940

Back in the 1940s, computers were huge machines which compared to today were capable of only very limited operations. One of the principle problems with computers as making them do different things. Much like a calculator today, computers in the 1940s were designed to complete one operation. For example, you could build a computer to work out th esquare root of something, but if you then wanted it to be able to act as a word processor, you woud have to completely rewire it which could take weeks. These computers were called fixed-program computers because the things they did were hard wired in to them and could only be changed by physically changing the way they were built. Von Neumann theorised that the future had to be computers in which their operations were stored in memory, rather than being hard wired. If this could be built, then several different programs could be stored in a computer's memory allowing it to change what it did without the user having to rewire it. For example, closing Word on your computer and opening PowerPoint.

Von Neumann's model looked like this:

vnarch

The control unit would control what was sent to be calculated and what had already been calculated and would transfer them to and from the memory. The arithmetic logic unit was the bit that would figure things out. The memory at the top would not only hold the data that was being calculated, but also the details of how the computer should work and what it should do (the program). The input would allow a user to control what the computer did and the output would display the results.

Most modern computers now work like this. The memory is the hard disk and the RAM, the control unit and arithmetic logic unit are now housed in a single CPU and the inputs and outputs are devices such as keyboards and monitors.

 

THE FETCH EXECUTE CYCLE

The fectch-execute cycle describes the way CPUs deal with data, and while it can seem complex at first, understanding the different stages is key to understanding one of the most fundamental parts of how a computer works.

The CPU or Central Processing Unit is the brain of a computer. It's the part that does all of the binary calculations which control exactly what happens on your computer when you press a button, open a program or access a web page. These calculations are broken down in to what are called instructions. These instructions tell the CPU how to deal with each byte of information it receives. For example, if you were to add 5 and 5, the CPU would have to be sent the first byte containing the number 5, the second one and then the instructions on what it had to do with them (add). However, data runs through the CPU so fast that handling it without errors requires a very well organised sequence of events.

The sequence starts with the PROGRAM COUNTER receiving the address of the first instruction from the RAM. The address is the location of the data in the memory. The program counter is the part of the CPU which keeps count of which instruction is currently being worked on. The address is loaded on to the MEMORY ADDRESS REGISTER so that the program counter can start looking for the next address while the CPU is working on the current process. The instruction goes along to the MEMORY DATA REGISTER and INSTRUCTION REGISTER where it is held until the CONTROL UNIT is ready to decode it. Decoding just means that the CPU tells all of the different parts what to do with the instruction. The instruction is then passed to the Arithmetic Logic Unit where it is decoded and passed back to the RAM to be output to the user (for example, printed or displayed etc).

The process looks like this:

fetchexecute


1) Explain how the Von Neumann model relates to modern computers

2) Describe the process of the fetch-execute cycle