CAO Unit 1-I
CAO Unit 1-I
⚫• Register Transfer
Control Unit
ALU
Functional units of computer
⚫The computer consists of four main
parts. These are as follows:
(i) Central processing unit.
(ii) Memory
(iii) Input Devices
(iv) Output devices
CPU
⚫Central Processing Unit
The CPU is the place where computations are performed. It is the brain
and heart of a computer.
⚫ CPU interprets instruction and process data contained in computer
program.
⚫ CPU has two component
1. ALU ( Arithmetic & Logic Unit)
2. CU ( Control Unit )
The arithmetic logic unit (ALU) of the CPU performs the typical arithmetic
operations such as addition, subtraction, multiplication, and division.
Computers use the binary number system, to represent numbers. The
binary number system has only two digits 0 and 1.
Control Unit control all the operation in computer. It is the controller of the
system.
⚫ It also control all the devices connected to CPU.
⚫ It also control the flow of data from i/p devices to memory and memory
to o/p devices.
Memory
⚫Memory: Memory is the location where
data and programs are stored while being
processed by the CPU. Memory is the main
storage unit in a computer. Memory consists
of primary (main) memory and secondary
memory. The data stored in main memory
(RAM) is volatile and is erased as soon as
the power supply is cut off. Therefore,
secondary memory is used to store data. In
secondary memory (diskettes) data is stored
permanently.
Input Devices
⚫Input Devices: Input is the process of entering and
translating incoming data into machine readable form.
⚫Any hardware item which attached to the main unit
of a computer that houses the CPU is referred to as
peripheral
device.
⚫An input device is a peripheral device through which
data are entered and transformed into machine
readable form. Input devices are mainly used to
communicate information between humans and
computer. Example: Keyboard, Mouse.
Output devices
⚫Output Devices: An output device is a
peripheral device that allows a computer
to communicate information to humans
or another machine by accepting data
from the computer and transforming
them into a usable form. The output
devices gives the desired result to the
user. Example: Monitor, Printer etc.
BUS
BUS
⚫A group of wires connecting two or
more devices and providing a path to
perform communication is called bus.
⚫A bus that connect major computer
component such as ( CPU , Memory ,
I/O)
is called system bus
Bus
⚫A bus is a set of physical connections
(cables, printed circuits, etc.) which can be
shared by multiple hardware components in
order to communicate with one another.
● ADDRESS BUS
● DATA BUS
● CONTROL BUS
Data Bus
• The Data Bus carries the data which is transferred
throughout the system.
Data Bus
• It is bi-directional.
• Register Transfer
Language
• Register Transfer
15 0
PC
Numbering of bits
A 16 bit register is partitioned into two parts, bit 0 through 7 are
assigned the symbol L(for low byte) and 8-15 are assigned the symbol
H( for high byte)
15 87 0
Upper byte PC(H) PC(L) Lower byte
Partitioned into two parts
4-2 Register Transfer cont.
⚫ Information transfer from one register to another is
described by a replacement operator: R2 ← R1
⚫ This statement denotes a transfer of the content of register
R1 into register R2
⚫ The transfer happens in one clock cycle
⚫ The content of the R1 (source) does not change
⚫ The content of the R2 (destination) will be lost and replaced
by the new data transferred from R1
⚫ We are assuming that the circuits are available from the
outputs of the source register to the inputs of the destination
register, and that the destination register has a parallel load
capability
4-2 Register Transfer cont.
R1
Timing t t+1
diagram
Clock
Synchronized
Load
with the clock
Transfer occurs here
4-2 Register Transfer cont.
⚫ Unconditional
R1 ← R2
⚫ Conditional
P: R1 ← R2
⚫ Simultaneous
R1 ← R2 , R3 ← R2
SIMULTANEOUS OPERATIONS
⚫ Iftwo or more operations are to occur simultaneously, they
are separated with commas
P: R3 ← R5 ,, MAR ← IR
Bus lines
D3 D2 D1 D0 C3 C2 C1 C0 B3 B2 B1 B0 A3 A2 A1 A0
D3 C3 B3 A3 D2 C2 B2 A2 D1 C1 B1 A1 D0 C0 B0 A0
3 2 1 0 3 2 1 0 3 2 1 0
3 2 1 0 S0
S0 S0 S0
MUX3 MUX2 MUX1 MUX0 S1
S1 S1 S1
Three-State Buffer
4-3 Bus and Memory Transfers: Three-
State Bus Buffers cont.
C=1
Buffer
A B A B
C=0
Open Circuit
A B A B
TRANSFER FROM BUS TO A DESTINATION REGISTER
Bus lines
Load
Reg. R0 Reg. R1 Reg. R2 Reg. R3
D0 D1 D2 D 3
z E (enable)
Select 2x4
w
Decoder
S0 0
Select 1
S1 2
Enable 3
4-3 Bus and Memory Transfers: Three-
State Bus Buffers cont.
S1 0
Select
S0 1
Bus line for bit 0
2×4 A0
Decoder 2
Enable E
3
B0
C0
RAM
R1 R1
100 66