Control Unit, Memory Unit, and Arithmetic Logic Unit. The CPU or Central Processing Unit, is the central part of a computer.

Authors Avatar
Author: James Leong Mook Seng

Education Officer

Control Unit, Memory Unit, and Arithmetic Logic Unit

The CPU or Central Processing Unit, is the central part of a computer. Because the CPU performs many different functions, there is a need to divide it up into its components. There are 3 components namely Arithmetic & Logic Unit (ALU), the Control Unit and the Immediate Access Store (known as the IAS or primary memory)

==> Arithmetic Logic Unit (ALU)

The ALU is where things are actually done in the processor.

It can perform arithmetic calculations on data. For example, it can add two numbers together (in binary)

2. It perform logic decisions to be made on data (If the value is negative then ..., the part of the processor that makes the decision is the ALU). These are computations that involve the use of AND, OR, NOT, >,<,>=,<=,<>, =

3. The third task of the ALU is to act as the gateway between the processor and the other parts of the computer system. All input and output to and from the processor goes into the ALU and waits there while the control unit decides what to do with it.

==> Control Unit.

All computers follow instructions that are given to it in a program. These instructions are in a particular order in the program, and following them, and carrying them out, will mean that the computer has accomplished whatever task it was meant to do. Something, in the computer, has to manage the instructions and make sure that all the other parts of the processor do what they should be doing. This is the job of the control unit.

The control unit has four jobs

. It has to decide which instruction to carry out next and then go and get it.

2. It has to decipher the instruction, in other words it has to work out what needs to be done to carry the instruction out.

3. It has to tell other parts of the processor what they should do so that the instruction will be carried out.

4 The control unit is to be able to find the information stored there when it is to be used. It knows where the next instruction in memory is because there is a register called the Program Counter that holds the memory address of the next instruction.

==> Memory Unit

The IAS is the place in the CPU where programs and the data that is needed by programs are held, ready to be fetched then decoded and executed by the CPU. The CPU will also use this place to store the results of any processing it does. It is made up of individual memory locations, each capable of storing a byte of data. The parts of the operating system, which the computer is using at the time, also need to be stored in memory.

Performance of Computer System

The materials used in a processor will affect the reliability, speed and performance of that processor. Importantly, the speed of the slowest component might slow right down an otherwise fast computer system.

Processors perform differently because of their clock speed. Every computer has a 'clock' which generates 'pulses' that are used to control how the different components of a computer system work together. A 800 MHZ computer means that the system clock is generating approximately 800 million pulses every second. The faster the clock, the more fetch-decode-execute cycles the CPU can perform in a second, and the faster programs will run.

The size of the address and data buses will affect the performance of the computer. A bus is simply a 'highway' used to move binary data around a computer. Big data and address buses mean that data can be moved quickly compared to smaller buses.

Types of Primary Memory

There are a number of different types of memory in the processor:

. Read Only Memory (ROM)

ROM is memory that cannot be altered. This means that even switching the computer off will not effect the contents of the ROM. There is very little that needs to be stored in ROM so it tends to be very small. This type of memory holds a special program that starts running when the computer is turned on. It holds a part of a program called the BIOS. This program does 2 things

* It checks that the computer hardware is present and correctly working

* It runs a routine that looks for another special program called the boostrap program. Its job is to locate the OS on the hard drive and then load it into RAM and run it. Starting up a computer from a power-off situation to where the OS has been loaded up known as 'booting up' the computer.

The BIOS itself includes user defined parameters and hence is not stored in ROM entirely. In fact the BIOS tends to be stored in a special type of RAM which is refreshed using battery power when the system is switched off. You are advised not to use this as an example of storage in ROM.

A typical question will ask for an example of what is stored in ROM and RAM. The safest answers are the bootstrap being stored in ROM and user software and data being stored in RAM.

2. RAM (Random Access Memory)

RAM stores the programs that are being used by the computer (including the operating system) and the data that is being used with those programs. When the computer is switched off all this data is lost. RAM is said to be volatile memory because it is so easily changed, whereas ROM is non-volatile because it cannot change. A computer with 128 MB of RAM has approximately 128 million memory locations in which to store applications and data. The more RAM a computer have, the more applications can be opened at the same time and the more data files can be opened as well.

Why the operating system is not stored in the ROM as the bootstrap program?

Other types of memory

==> Registers

These are part of the design of the CPU. They are memory circuits and are very very fast as they are constantly accessed by the CPU. Examples of registers are the Accumulator, the status register and the Program Counter.

==> Cache

It is provided in computer systems to speed up processing and like all memory it is measured in bytes. Programs are made up of instructions. These are fetched from memory using the fetch-decode-execute cycle. The data that instructions need is also fetched from memory and some data might need to be fetched over and over again.

For example, a constant that is held in memory and is used lots of time in lots of calculations. Fetching data from IAS takes time. Fetching the same data time after time is a waste of time. Processing can be speeded up by storing constantly needed data in some very fast-access memory. This will reduce the 'fetch' time. This fast-access memory is called 'cache'. It is much faster than RAM but slower than registers. It is also very expensive.

How to compare different types of memory

Memory can be classified in a whole variety of ways:

. Primary memory and secondary memory(more commonly referred to as 'secondary storage')

One way to deal with memory is to split it up into two ways: primary memory and secondary memory. Primary memory is the memory that stores data and programs temporarily. Secondary storage devices are connected to the CPU as peripherals such as floppy disk or a hard disk which store data and programs permanently. Primary memory is also known as 'immediate access storage' or IAS

2. READ devices and READ/WRITE memory devices.
Join now!


Registers, cache, RAM, floppy disks, hard drives and CD-R/W are READ/WRITE devices. That means that data in these devices can be read but also new data can be written to them. ROM, DVDs and some CDROMS are READ ONLY. Data is burnt(written to once) onto these devices and cannot be changed. They are sometimes called WORM devices(Write Once Read Many times)

3. Volatile memory and non-volatile memory.

Another way to split memory types is to divide them between volatile and non-volatile memory. RAM is volatile. That means that when the power is turned off, its ...

This is a preview of the whole essay