DB section has been updated to add some SQL code.
Describe the concept of the fetch-execute cycle.
The Von Neumann architecture was originally described in a paper by John von Neumann in 1945 . It described a computer that had 4 main parts:
CA – Central Arithmetic Logic Unit
CC – Central Control Unit
Memory
Input and Output Channels
Von Neumann proposed that instructions should be stored in binary within memory. This is referred to as the Stored Program Concept. There are other architectures that treat data and instructions separately such as the Harvard architecture. The Von Neumann architecture can be represented by the following diagram.
Von Neumann Architecture
The parts of the diagram can be broken down as follows:
Input Devices
These are devices that put new information into the computer, such as mice, keyboards etc. More on these later.
Output Devices
These are devices that get information from the computer, such as monitors and printers etc.
Backing Storage
These are devices that are used to store permanent copies of our files and data, such as Hard Disk Drives and USB Flash Drives.
Memory
Memory can be broken down into two types, RAM and ROM.
Processor or CPU (Central Processing Unit)
This is the processor, this is the part of the computer that actually performs the tasks required by the system.
The processor is a complex piece of equipment and can be broken down into some of its more basic parts.
Parts of the processor
The Control Unit is responsible for the timing of the processor and the execution of instructions. It ensures that they are completed in the correct order
The Arithmetic and Logic Unit (ALU) performs the arithmetical operations and Boolean logical comparisons (such as AND,OR etc.)
Registers are small temporary stores of information inside the processor. They are used for things such as storing results from calculations at most they will store a few bytes.
However the processor has other critical parts, these parts are shown below:
The ALU’s primary role is Arithmetic such as addition, multiplication etc.
It will also deal with Logic operations such as evaluating AND, OR and NOT conditions.
Registers are small temporary stores of information, these are built into the CPU and can be accessed almost immediately. Modern Processors can have registers up to 64 bits.
A register can only hold 3 types of information:
Data
Instructions
Addresses
If we were adding two numbers such as 5 + 2 together one register would hold the number 5, one would the number 2 and one would hold the answer of 7.
Each bus has a particular role, we have covered the control bus/unit but we have two left:
Address Bus
Data Bus
The address bus has only one role. It simply carries the address of the location in memory that is to be accessed. It is only ever points TO memory. It does not hold any data and never transmits any data back to the CPU.
The data bus is used to carry data to and from the processor. Generally - the bigger the word length the more efficient the processor i.e. the more work it can do in every operation. The data bus is bi-directional, it can carry data FROM and TO the CPU/memory.
As a rough rule of thumb, the larger the memory size the slower the access speed.