Chapter 4
Chapter 4
By ahmed s.
1
Register Transfer Language
Microoperation
• Is the operations executed on data stored in registers (shift, clear, load, count).
Internal Hard Ware Organization(best defined by specifying)
1. The set of registers it contains and their functions
2. The sequence of microoperations.
3. The sequence control of microoperations.
Register Transfer Language (RTL)
• The symbolic notation used to describe the microoperation transfer among
registers.
• The use of symbols instead of a narrative explanation provides an organized and
concise manner
• So that, a RTL is a convenient tool for describing the internal organization of
digital computers in concise and precise manner 2
REGISTER TRANSFER
• Registers :
Designated by Capital Letter(sometimes followed by numerals)
to denote the function of the register. See fig 4-1
For example:
MAR(Memory Address Register) => to hold memory address
PC(Program Counter) => to hold the address of next instruction
IR(Instruction Register) => to hold instruction code
DR(Data Register) => to hold memory data
AC(Accumulator) => general purpose processing register
R1(Processor Register) => Processing register
3
Contd…
The individual F/Fs in an n-bit register is numbered in sequence from 0(rightmost position)
through n-1.
The numbering of bits in a 16-bit register is marked on top of the box.
A 16-bit register partitioned into two parts : bit 0-7(symbol “L” Low byte), bit 8-15(symbol “H”
High byte).
5
CONTROL FUNCTIONS
If two or more operations are to occur simultaneously, they are separated
with commas
P: R3 ← R5, MAR ← IR
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 IR into register MAR.
8
Bus and Memory Transfers
A typical digital computer has many registers, and paths must be provided to
transfer information from one register to another.
The number of wires will be excessive if separate lines are used b/n each
register in the system.
A more efficient scheme for transferring information b/n registers in a
multiple‐register configuration is a common bus system.
Bus is a path(of a group of wires) over which information is transferred, from any of
several sources to any of several destinations.
Control signals determine which register is selected by the bus
during each particular register transfer.
One way of constructing a common bus system is with multiplexers.
The multiplexers select the source register whose binary information is then placed
on the Bus 9
contd…
The construction of a Bus system for four registers is shown in fig. 4-3
10
Cont’d…
Each register has 4-bits, so that the bus system has 4-common lines.
The bus consists of four 4x1 multiplexers each having four data inputs, and two selection inputs lines, S1 and
S0.
Each register are of 4‐bit register, so we need 4‐MUXs to carry the 4‐bits of register on 4‐line
common bus(one line carry only one bit at a time).
Multiplexers are to select one of four registers and transfer its content to the
4‐line common bus
The two selection lines S1 and S0 are connected to the selection inputs of all four multiplexers.
The selection lines choose the four bits of one register and transfer them into the 4‐lines
common bus.
When S1So = 00,the 0 data inputs of all four multiplexers are selected and
applied to the outputs that form the bus.
This causes the bus lines to receive the content of register A
Similarly, register B is selected if S1S0 = 01, and so on.
Table 4‐2 shows the register that is selected by the bus for each of the four possible binary 11
Cont’d…
The bits in the same significant position in each register are connected to the
corresponding number of MUX. S0 S1 Register Selected
For example: since register A 0 0 A
is selected by S1S0=00, 0 1 B
A0 is connected to input 0 of
1 0 C
MUX 0, 1 1 D
A1 is connected to input 0
of MUX 1
A2 is connected to input 0 of MUX 2 Table 4-2 Function table for bus fig4-3
A3 is connected to input 0 of MUX 3
Similarly, register B is selected by S1S0=01,
B0 is connected to input 1 of MUX 0 ,B1 is connected to input 1 of MUX 1,
12
B2 is connected to input 1 of MUX 2, B3 is connected to input 1 of MUX 3 and so on.
Cont’d…
In general, a bus system which multiplex k registers of n‐bits each to produce an
n‐line common bus.
The number of multiplexers needed to construct the bus is equal to n,
the number of bits in each register.
The size of each multiplexer must be k x 1 since it muItipIexes k data lines.
For example:‐ A digital computer has a common bus system for 8 registers of 16 bits
each.
a)What size of MUXs are needed?
b)How many MUXs are there in the Bus?
c)How many selection inputs are there in each MUX?
Solution:‐
a)Since there are 8 registers, we need size of 8x1 MUXs
b)Since each register are with 16‐bits , there are 16 MUXs in the Bus.
c)Since each MUXs are with 8x1, 3 selection lines inputs in each MUXs. 13
Cont’d…
The transfer of information from a bus into one of many destination registers can be
accomplished by connecting the bus lines to the inputs of all destination
registers and activating the load control of the particular destination register selected.
The symbolic statement for a bus transfer may mention the bus or
its presence may be implied in the statement.
When the bus is includes in the statement, the register transfer is symbolized as
follows: BUS ← R1, R2 ← BUS
The content of register R1 is placed on the bus, and the content of the BUS is
loaded into register R2 by activating its load control input.
If the bus is known to exist in the system, it may be convenient just to show the direct
transfer.
R2 ← R1 14
THREE STATE BUS BUFFERS
A Bus system can be constructed with three‐state gates instead of MUXs.
A three‐state gate is a digital circuit that exhibits three states.
These states are 0, 1, High‐impedance(Open circuit)
Buffer is:
A device designed to be inserted between other devices to match impedance,
to prevent mixed interactions, and to supply additional drive or relay capability.
Buffer types are classified as inverting or noninverting
Tri‐state buffer gate: Figure 4-4 Graphic symbol for three-sate buffer.
When control input =1 :
The output is enabled(output Y = input A)
When control input =0 :
The output is disabled(output Y = high‐impedance) 15
Cont’d …
The construction of a bus system with three‐state buffer is demonstrated in
fig 4-5.
A0
The outputs of four buffer are connected B0
Bus line for bit 0
Enable input E
dec o der
2
18
ARITHMETIC MICROOPERATIONS
A microopration is an elementary operation performed with the data stored in
a registers.
The microoprations most often encountered in digital computer are classified ino four categ
ories:
Register transfer microoperations(transfer of binary information).
Arithmetic microoperations( Arithmetic operation on numeric data).
Logic microoperations (logical operation on non‐numeric data).
Shift microoperations (shift operation on data stored in register).
Register transfer microoperations was introduces in pervious sections.
In this section we introduce a set of Arithmetic microoperations.
The basic Arithmetic microoperations are:
Addition
Subtraction
Increment 19
Cont’d…
The arithmetic microoperation defined by the statement, R3 ←R1 + R2, specifies an
add microoperation.
It state the Contents of R1 plus R2 transferred to R3.
The other basic arithmetic microoperations are listed in table 4-3.
Table 4-3. Summary of Typical Arithmetic Micro-Operations
22
LIST OF LOGIC MICROOPERATIONS
• There are, in principle, 16 different logic operations that can be defined over two binary input
variables(X and Y)
• Truth Table for 16 logic functions for 2 variables is shown as below : Tab. 4-4
• In the table, each of the 16 columns F0 through F15 represents a truth table of one possible
Boolean function for the two variables X and Y.
• The 16 Boolean functions of two variables x and y are expressed in algebraic form in the first
column of table 4-4.
• The corresponding 16 logic micro-operations are derived from these function by replacing 23
Cont’d…
• The corresponding 16 logic micro-operations are listed as below
• During a shift-right operation the serial input transfers a bit into the leftmost position.
SI
We will adopt the symbols shl and shr for logical shift-left and shift- right
microoperations respectively.
Examples: R1 shr R1 , R2 shl R2
Specify a 1-bit shift to the right of the content of register R1 and a 1-bit shift to the left
of the content of register R2.
The register symbol must be the same on both sides of the arrow.
The bit transferred to the end position through the serial input is assumed to be 026 during
CIRCULAR SHIFT
• The circular shift (also known as a rotate operation) circulates the bits of the
register around the two ends without loss of information.
• This is accomplished by connecting the serial output of the shift register to its
serial input.
• In a circular shift the serial input is the bit that is shifted out of the other end of
the register.
• A right circular shift operation: A left circular shift operation:
30