COA Chapter 3
COA Chapter 3
• For any function of the computer, the register transfer language can be
used to describe the (sequence of) microoperations
• Register transfer language
– A symbolic language
– A convenient tool for describing the internal organization of digital
computers
– Can also be used to facilitate the design process of digital systems.
REGISTER TRANSFER
• Copying the contents of one register to another is a register
transfer
P: R2 R1
Which means “if P = 1, then load the contents of
register R1 into register R2”,
i.e., if (P = 1) then (R2 R1)
TRIGGERING OF FLIP-FLOPS
Level-triggering is the transfer of data from input to output of
a flip-flop anytime the clock pulse is in proper voltage level.
L
time
Level triggering
SIMULTANEOUS OPERATIONS
• If two or more operations are to occur simultaneously, they are separated with
commas
P: R3 R5, R1 R2
• Here, if the control function P = 1, load the contents of R5 into R3, and at the same
time (clock), load the contents of register R2 into register R1
rj (15-8) ←ri (L). This means bit b8 to b15 in rj are transferred from lower byte of ri
CONNECTING REGISTRS
• In a digital system with many registers, it is impractical to have data and control
lines to directly allow each register to be loaded with the contents of every possible
other registers.
• To completely connect n registers n(n-1) lines but This is not a realistic approach
to use in a large digital system
• Instead, take a different approach: Have one centralized set of circuits for data
transfer – called the common bus system.
• Bus is a path (a group of wires- one for each bit of a register ) over which
information is transferred, from any of several sources to any of several
destinations at a time.
• Have control signals to select which register is the source, and which is the
destination
• One way of constructing a common bus system is with multiplexers.
Bus lines
Multiplexer
• It is a combinational circuit that selects binary information
from one of the input lines and directs it to a single output
line
• Usually there are 2n input lines and n selection lines. The
bit combinations of the section lines determine which input
line is selected.
• For example for 2-to-1 multiplexer
– if selection S is zero then I0 has the path to output (it will be
selected )
– if S is one then I1 has the path to output – will be selected
2-to-1 multiplexer
M
Read
Memory
AR unit
Write
• To write a value from a register to a location in memory looks like this in register
transfer language:
M[MAR] R1
• This causes the following to occur
– The contents of the MAR get sent to the memory address lines
– A Write control line (= 1) gets sent to the memory unit
– The values in register R1 get sent over the bus to the data input lines of the memory
– The values get loaded into the specified address in the memory
SUMMARY OF REGISTER TRANSFER MICROOPERATIONS
ARITHMETIC MICROOPERATIONS
• The basic arithmetic microoperations are
– Addition
– Subtraction
– Increment
– Decrement
• Special Symbols
– Special symbols will be adopted for the logic microoperations
OR(/), AND(), and complement(a bar on top), to distinguish
them from the corresponding symbols used to express Boolean
functions P Q : R1 R 2 R3, R 4 R5 R6
• the sign + is used as OR when used between Boolean variables
Logic OR and would
Arithmetic ADD mean add when it
Logic Microoperations
CIRCULAR SHIFT
• In a circular shift the serial input is the bit that is shifted out of the other end of the
register.
• An arithmetic shift a microoperation that shifts a signed binary number to the left
or right.
• An arithmetic left shift multiplies a signed number by two
• An arithmetic right shift divides a signed number by two
• The main distinction of an arithmetic shift is that it must keep the sign of the
number the same as it performs the multiplication or division because the sign of
the number remains the same when multiplied or divided by 2.
• A right arithmetic shift operation:
sign
bit
• A left arithmetic shift operation:
0
sign
bit
Arithmetic Shift Right
• Arithmetic right-shift: Rn-1 remains unchanged;
• Rn-2 receives Rn-1, Rn-3 receives Rn-2, so on.
• For a negative number, 1 is shifted from the sign bit to the
right. A negative number is represented by the 2’s
complement. The sign bit remained unchanged.
Arithmetic Shift Right
• Arithmetic Shift Right :
– Example 1
0100 (4) before the shift
0010 (2) after the shift
– Example 2
1010 (-6) before the shift
1101 (-3) after the shift
• Arithmetic Shift Left :
– Example 1
0010 (2)
0100 (4)
– Example 2
1110 (-2)
1100 (-4)