Chapter 4
Chapter 4
1
REGISTER TRANSFER
2
REGISTERS
Is a group of Flip-flops with each Flip-flop
capable of storing one bit of info
An n-bit register has a group of n flip-flops and
is capable of storing any binary information of n
bits.
A register consists of a group of Flip-flops and
gates that effect their transition.
The Flip-flops hold binary information and the
gates control when and how new information is
transferred into the register.
3
REGISTER TRANSFER
Computer registers are designated by capital letters to denote the
function of the register. For example
MAR: the register that holds an address for the memory unit
PC : for program counter,
IR: for instruction register and
R1, R2…. for processor register.
4
REGISTERS
5
REGISTERS
loading the register : The transfer of new information
into a register
If all the bits of the register are loaded simultaneously
with a common clock pulse transition. The loading is
done in parallel.
Parallel Loading is used if all the input bits are
transferred into the register simultaneously, with the
common clock pulse.
In most digital systems, a master clock generator
supplies clock pulses to all parts of the system
the input values in the register are loaded when a clock
pulse arrives. This implies that, whenever a clock pulse
arrives, it would load the register with new values, thus
overwriting the previously stored register data. 6
REGISTER TRANSFER
• If the transfer is to occur only under a predetermined control
condition, designate it by
If (P = 1) then (R2 ← R1)
Or,
P: R2← R1,
• Where P is a control function that can be either 0 or 1
7
REGISTER TRANSFER
It is assumed that all transfers occur during a clock edge transition
All microoperations written on a single line are to be executed at the
same time
T: R2 ← R1, R1 ← R2
8
BUS AND MEMORY TRANSFERS
11
BUS AND MEMORY TRANSFERS
The transfer of information from a memory word to
the outside environment is called a read operation.
The transfer of new information to be stored into the
memory is called a write operation.
Designate a memory word by the letter M symbol.
It is necessary to specify the address of M when
writing memory transfer operations
Designate the address register by AR and the data
register by DR
• The read operation can be stated as: Read: DR ← M[AR]
• The write operation can be stated as: Write: M[AR] ← R1
12
ARITHMETIC MICROOPERATION
13
ARITHMETIC MICROOPERATION
The basic arithmetic microoperations are addition,
subtraction, increment, decrement, and shift
14
ARITHMETIC MICROOPERATION
To implement the add microoperation with hardware, we
need the registers that hold the data and the digital
component that performs the addition
A full-adder adds two bits and a previous carry
A binary adder is a digital circuit that generates the
arithmetic sum of two binary numbers of any length
15
ARITHMETIC MICROOPERATION
16
LOGIC MICROOPERATIONS
17
LOGIC MICROOPERATIONS
Symbols used for logical microoperations:
• OR: ∨
• AND: ∧
• XOR: ⊕
The + sign has two different meanings: logical OR and
summation
When + is in a microoperation, then summation
When + is in a control function, then OR
• Example:
P + Q: R1 ← R2 + R3, R4 ← R5 ∨ R6
18
LOGIC MICROOPERATIONS
There are 16 different logic operations that can be
performed with two binary variables
19
SHIFT MICROOPERATIONS
Shift microoperations are used for serial transfer of data
They are also used in conjunction with arithmetic, logic,
and other data-processing operations
There are three types of shifts: logical, circular, and
arithmetic
A logical shift is one that transfers 0 through the serial
input .
• The symbols shl and shr are for logical shift-left and
shift-right microoperations by one position.
For example: R1 ← shl R1
R2 ← shr R2
are two microoperations that specify a 1-bit shift to the left
of the content of register R1 and a 1-bit shift to the right of
the content of register R2. 20
SHIFT MICROOPERATIONS
The circular shift (aka rotate or rotate operation) circulates
the bits of the register around the two ends without loss of
information.
• The symbols cil and cir are for circular shift left and right
21
SHIFT REGISTERS
22
SHIFT REGISTERSWe want to store 1111 with this below
The behavior of the register what will be the processes?
serial shift register
is given in the listing In A B C Out
on the lower right DQ DQ DQ DQ
24
SHIFT MICROOPERATIONS
• The arithmetic shift shifts a signed binary number to the left or
right
• To the left is multiplying by 2, to the right is dividing by 2
• A sign reversal occurs if the bit in Rn-1 changes in value after the shift
• This happens if the multiplication causes an overflow
• An overflow flip-flop Vs can be used to detect the overflow
Vs = Rn-1 ⊕ Rn-2
• If Vs = 0, there is no overflow, but if Vs = 1, there is an overflow and
a sign reversal after the shift.
25
SHIFT MICROOPERATIONS
26
SHIFT MICROOPERATIONS
27
Any question
????
Thank you!!!
28