Professional Documents
Culture Documents
2 - Register Transfer and Microoperations - 1
2 - Register Transfer and Microoperations - 1
Register A Register B
Digital Logic
Circuits
Register C
Register Transfer Language
• Simple notation to describe operation on registers
• Operation executed on data stored on registers are called
microoperation
– R3 R1+R2 (add the content of R1,R2 and store then on R3)
– R2 R1 ( transfer content of R1 to R2)
• The transfer may require a condition
– If (P=1) then R1 R2 which can expressed as P: R1 R2
– Another examples
– If (P=1 and T=0) then R1 R2 which can be written PT’:R1 R2
– If (P=1 and T=0)or if (P=1 and S=1) then R1R1
– Which can be expressed as PT’+PS: R1 R2
• The condition(s) interpreted as a control to the load (LD) pin.
• The transfer occur when both LD and C/K active and happens
at the rising edge
Building a Computer
Needs:
• processing
• storage
• communication
Multiplexer-Based Transfer for TWO 4-bit
registers
4-line
common
S1 bus
S0
S1 S0 Regi st er sel ect ed 4*1 4*1 4*1 4*1
M UX 3 M UX 2 M UX 1 M UX 0
0 0 A
0 1 B 3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0
1 0 C
1 1 D
3 2 1 0 3 2 1 0 3 2 1 0 3 2 1 0
Used for highest bit from each Used for lowest bit
register
Question
• For register R0 to R63 in a 16 bit system:
– What is the MUX size we use?
– How many MUX we need?
– How many select bit?
Three-State Bus Buffers
• Buffer
– A device designed to be inserted between other devices
to match impedance, to prevent mixed interactions, and
to supply additional drive or relay capability
Tri-state buffer gate
• Tri-state buffer gate : Fig. 4-4
– When control input =1 : The output is enabled(output Y =
input A)
– When control input =0 : The output is disabled(output Y =
high-impedance)
Normal
input A
If C=1, Output Y = A
If C=0, Output = High-impedance
Control
input C
The construction of a bus system with
tri-state buffer
A0
B0
C0
D0
Select input S 1 0
S 0
2*4 1
decoder
Enable input E 2
3
How Bus is used in micro operation
Memory Transfer
• 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
Memory Read and Write
• AR: address register
• DR: data register
Read: DR M[AR]
Write: M[AR] R1
Arithmetic Microoperations
• • Arithmetic addition:
• R3 R1 + R2 (Here + is not logical OR. It
denotes addition)
Arithmetic Microoperations
• Arithmetic subtraction:
R3 R1 R 2 1
• where R 2 is the 1’s complement of R2.
• Adding 1 to the one’s complement is
equivalent to taking the 2’s complement of R2
and adding it to R1.
BINARY ADDER
• Binary adder is constructed with full-adder
circuits connected in cascade.
BINARY ADDER-SUBTRACTOR
• The addition and subtraction operations cane be combined
into one common circuit by including an exclusive-OR gate
with each full-adder.
XOR
M b
0 0 0
0 1 1
1 0 1
1 1 0
BINARY ADDER-SUBTRACTOR
• • M = 0: Note that B XOR 0 = B. This is exactly
the same as the binary adder with carry in C0
= 0.
B3 B2 B1 B0 1
x y x y x y x y Always added
to 1
H A H A H A H A
C S C S C S C S
C4 S3 S2 S1 S0
Arithmetic Circuit
• Perform arithmetic operations on registers A
and B
• The operation is specified(selected) by the
control bits S1 S0 Cin