Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ا
ا د
Royal Commission at Yanbu ا ا
University College – Yanbu - ا ا
Department of ACS & AIT
Yanbu Al-Sinaiyah ا
Computers are large digital systems a group of components of digital circuits or blocks,
that are integrated together to achieve a certain task. They are used to process digital
information which consists of 0’s and 1’s.
So let us come up with the basic building blocks for this computer.
CPU is brain of the whole computer system and is responsible for controlling and
coordinating between all devices of computer. Internally CPU consists of the following.
1. Control unit
2. Arithmetic and Logic Unit
3. Registers
4. Internal buses
5. External buses
Control unit that controls and coordinates the operation of other units in the CPU and
perform the following functions:
1. Coordinate the operation and translate the program instructions into micro-
operations to be performed by the different units inside CPU. This is called
decoding of instructions.
2. Provide the control signals for other units of CPU to perform the different micro-
operations required to execute each instruction.
The ALU and registers make up the computer's data path. The data path and control unit
form the Central Processing Unit.
ALU is responsible for performing all mathematical and logical calculations like addition,
subtraction, multiplication, division, AND, OR, XOR, NOT etc.
Modern computers have multiple ALUs to be able to do multiple calculations at the same
time (to increase speed). Fig shows the symbolic view of the ALU and its operation. An
ALU has two inputs as well as selection lines. The selection lines specify the operation
to be performed on the inputs.
1.3 Registers
Registers are fastest storage elements similar to cache and are used to store temporary
data or most frequently used data. Information is stored in named locations (not
2. Input Devices
Devices that can enter data to computers are called input devices. Examples of input
devices include keyboards, Mouse, touch pads, light pens, joy sticks ...etc.
An output is used to output information from the computer and is used to output the data.
Examples of output devices are monitors, printers ...etc.
4. Memory Devices
A device that can store binary data and retrieve it for latter use. device. Memory devices
are used for two purposes
Information is accessed by an address that specifies the exact location of the piece of
information in the RAM.
4.3 Cache
Cache is a very fast type of RAM that is used to store information that is most frequently
or recently used by the computer. Cache memory is used in between CPU and RAM.
Recent computers have 2-levels of cache; the first level is faster but smaller in size
(usually called internal cache) and is inside CPU, and the second level is slower but
larger in size (external cache, normally outside CPU).
Cache
RAM
5. The Program
This program consists of digital instructions. These instructions tell CPU what to do. So
in other words, program guides the CPU to perform work accordingly. The program
consists of bunch of instructions.
Machine language instructions usually are made up of several fields. Each field specifies
different information for the computer. The major two fields are:
1. Op-code
2. Operand
Op-code (Operation code) An instruction field that specifies the particular operation that
is to be performed by the instruction field which stands for operation code and it
specifies the particular operation that is to be performed. Each operation has its unique
opcode and may take the computer several micro-operations to accomplish. MOV, ADD,
SUB are the examples of the Intel 8086 op-codes.
Operands fields which specify where to get the source and destination operands for the
operation specified by the op-code. The source/destination of operands can be the
memory or one of the general-purpose registers.
The set of all op-codes for a particular microprocessor defines instruction set for that
processor.
The CPU breaks down machine instructions into smaller operations that are called
micro-operations. These micro-operations are performed by the control unit inside CPU
to control different tasks of CPU. (i.e. the programmer does not specify them)
6. Buses
Buses are parallel wires and are used to transport the digital signals among different
devices inside computer. A bus typically consists of three basic sub types of buses.
1. Address Bus: Used to transport address signals from CPU to different devices.
2. Data Bus: used to transport data among different devices in computer.
3. Control Bus: used to transport control signals for controlling different devices.
Unlike a point-to-point connection, a bus can logically connect several peripherals over
the same set of wires. Each bus defines its set of connectors to physically plug devices,
cards or cables together.
a. C language
b. Visual Basic .NET
c. Machine Language
d. Java
a. Instruction set
b. Machine set
c. Program
d. Software
Question: Explain the role of control unit in CPU. Describe with the help of figure.