CAO 3 Unit 1
CAO 3 Unit 1
REGISTER TRANSFER
Register
Computer Register are designated by capital letters.
●
For example,
●
PC – Program Counter
○
IR – Instruction Register
○
R1 – Processor Register
○
R1 7 6 5 4 3 2 1 0
Register R Showing individual bits
Register Transfer
R2 R1
R1 1 1 0 1
R2 1 1 0 1
Register Transfer with Control Function
Register Transfer Language
●
The Symbolic notation used to describe the micro operation transfer among registers is called a
register transfer language.
●
The term “register transfer” implies the availability of hardware logic circuits that can perform a
stated micro operation and transfer the result of the operation to the same or another register.
Bus Transfer
●
A bus structure consists of a set of common lines, one for each bit of a register , through which
binary information is transferred one at a time.
●
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.
Bus Transfer
Construction of a bus system for four registers
Bus Transfer
●
The four registers are named as Register A , Register B, Register C and Register D.
●
The bus consists of 4×1 multiplexers with 4 inputs and 1 output and 4 registers with bits numbered 0 to 3.
The two selector lines s1 and S2 are connected to the 4 multiplexers.
●
Based on selector line the output of the 4*1 MUX is decided. Here we used 4*1 multiplexer so we used 2
selector lines.
●
If 8*1 MUX is used then 8 = 2^3 so three selector lines are required and so on.
●
Each bit of the register is connected to the one MUX .
Bus Transfer
●
As we can see that when S1S0=00, register A is
●
Since the 0 data inputs of all the multiplexers re
●
Similarly for other combinations of S1S0 other regi
Bus Transfer
●
When the bus is included in the statement, the register transfer in symbolic as follows:
●
BUS <– C
●
R1 <- BUS direct transfer R1 <- C
●
The content of register C is placed on the bus, and the content of the bus is loaded into register R1 by
activating its load control i/p.
Memory Transfer
●
The transfer of information from a memory unit to the user end is called a Read operation.
●
The transfer of new information to be stored in the memory is called a Write operation.
●
A memory word is designated by the letter M.
●
We must specify the address of memory word while writing the memory transfer operations.
●
The address register is designated by AR and the data register by DR.
●
Thus, a read operation can be stated as:
●
Read : DR ← M [AR]
●
The Read statement causes a transfer of information into the data register (DR) from the memory word
(M) selected by the address register (AR).
Memory Transfer
●
And the corresponding write operation can be stated as:
●
Write: M[AR] ← R1
●
The Write statement causes a transfer of information from register R1 into the memory word (M)
selected by address register (AR).
Micro operations
●
The operation executed on data stored in registers are called micro operations.
●
A micro operation is an elementary operation performed on the information stored in one or more
registers.
●
The result of the operation may replace the previous binary information of a register or may be
transferred to another register.
●
Example: shift, count, clear and load.
●
ARITHMETIC MICRO OPERATION
Arithmetic Micro operations
●
Arithmetic micro operation perform arithmetic operations on numeric data stored in registers.
●
The basic Arithmetic Micro-operations are classified in the following categories:
●
Addition
●
Subtraction
●
Increment
●
Decrement
●
1’s Complement
●
2’s complement
Arithmetic Micro operation
Addition – In addition micro-operation, the value in register R1 is added to the value in the register
●
●
Subtraction – In subtraction micro-operation, the contents of register R2 are subtracted from contents of
the register R1, and then the result is transferred into R3.
●
There is another way of doing the subtraction. In this, 2’s complement of R2 is added to R1, which is
equivalent to R1 – R2, and then the result is transferred into register R3.
●
Arithmetic Micro operation
●
Increment – In Increment micro-operation, the value inside the R1 register is increased
by 1.
●
Decrement – In Decrement micro-operation, the value inside the R1 register is
decreased by 1.
Arithmetic Micro operation
●
1’s Complement – In this micro-operation, the complement of the value inside the register R1 is
taken.
●
2’s Complement – In this micro-operation, the complement of the value inside the register R2 is
taken and then 1 is added to the value and then the final result is transferred into the register R2.
This process is also called Negation. It is equivalent to -R2.
Binary Adder
●
A Binary Adder is a digital circuit that implements the arithmetic sum of two binary numbers
supported with any length is known as a binary adder. It is generated using full-adder circuits
connected in sequence. The output carries from one full-adder linked to the input carry of the next
full-adder.
●
LOGICAL MICRO OPERATION
Logical Micro Operation
Logic Micro operations are Binary Operations performed on corresponding bits of two bits string.
●
Ex :
●
P: R1 <- R1 ⊕ R2
●
Content of R1 1010
●
Content of R2 1100
●
after P=1 is Content is 0110
Special symbols used for logic operations :
●
●
∧ = AND
●
V= OR
●
⊕ = XOR
●
Logic Micro Operation
Logic Micro Operation
Logic Micro Operation
Logic Micro operation
S1 S0 Output Operation
0 0 E=A∧B AND
0 1 E=AVB OR
1 0 E=A⊕B XOR
1 1 E=Ā Complement
●
SHIFT MICRO OPERATION
Shift Micro operation
●
Shift micro operations are used for serial transfer of data and are used in conjunction with
arithmetic and logic operations.
●
The register contents can be shifted to the left or the right.
●
There are three types of shift operations
–Logical shifts transfer 0 through the serial i/p, with all the bits involves in the shifting.
–Arithmetic shifts multiples (or divides) a signed number by 2
–Circular shift circulates the bits of the register around the two ends with no loss of information.
Types of Shift
●
Logical shift – A logical shift is one that transfers 0 through the serial input .
●
We use the symbols ‘<<’ for the logical left shift and ‘>>’ for logical right shift.
●
Logical Left Shift : Every time we shift a number towards the left by 1 bit . In this shift, one position
moves each bit to the left one by one. The Empty least significant bit (LSB) is filled with zero (i.e, the serial
input), and the most significant bit (MSB) is rejected.
sh l
Types of shift
●
Logical Right Shift - In this shift, each bit moves to the right one by one and the least significant
bit(LSB) is rejected and the empty MSB is filled with zero. The right shift operator is denoted by the
double right arrow key (>>) .Every time we shift a number towards the right by 1 bit.
sh r
Types of shift
Circular Shift - The circular shift circulates the bits in the sequence of the register around both ends
●
cir sh l
Types of shift
●
Circular Right Shift - In this micro shift operation each bit in the register is shifted to the right one
by one. After shifting, the MSB becomes empty, so the value of the LSB is filled in there.
cir sh r
Types of shift
●
Arithmetic Shift : The arithmetic shift micro-operation moves the signed binary number either to the left or
to the right position.
●
Following are the two ways to perform the arithmetic shift.
●
1. Arithmetic Left Shift : In this shift, each bit is moved to the left one by one. The empty least
significant bit (LSB) is filled with zero and the most significant bit (MSB) is rejected. Same as the Left
Logical Shift.
a sh l
Types of shift
●
Arithmetic Right Shift : In this shift, each bit is moved to the right one by one and the
least significant(LSB) bit is rejected and the empty most significant bit(MSB) is filled with
the value of the previous MSB.
a sh r
●
ARITHMETIC LOGIC SHIFT UNIT
Arithmetic logic shift unit
●
Arithmetic Logic Shift Unit (ALSU) is a member of the Arithmetic Logic Unit (ALU) in a computer system.
●
It is a digital circuit that performs logical, arithmetic, and shift operations.
●
The arithmetic, logic, and shift circuits are combined to one ALU with common selection variables.
Arithmetic logic shift unit circuit
Arithmetic logic shift unit
●
The above table shows 14 operations of ALU(Arithmetic Logical Unit).
●
The first eight are arithmetic operations( where S3S2=0).
●
The next four operations are logical and are selected with S3S2=01.
●
The final two operations are shift operations, selected with S3S2=10 and 11.