Presentation is loading. Please wait.

Presentation is loading. Please wait.

REGISTER TRANSFER LANGUAGE

Similar presentations


Presentation on theme: "REGISTER TRANSFER LANGUAGE"— Presentation transcript:

1 REGISTER TRANSFER LANGUAGE
MICROOPERATIONS

2 • Logic Microoperations • Shift Microoperations
TODAY OUTLINES • Logic Microoperations • Shift Microoperations

3 LOGIC MICROOPERATIONS

4 LOGIC MICROOPERATIONS
Specify binary operations on the strings of bits in registers Logic microoperations are bit-wise operations, i.e., they work on the individual bits of data useful for bit manipulations on binary data useful for making logical decisions based on the bit value The symbols for the four basic logic operations are: OR (), AND (), XOR (), Complement/NOT

5 LOGIC MICROOPERATIONS
v OR (SETS Bits) ^ AND (CLEARS Bits)  XOR (Complement Bits, 2 Sources) NOT (Complement Bits, 1 Source) Example: R3 R4 v R6 Example: R2 DR ^ R1 Example: PC PC  DR Example: R6 R1

6 LOGIC MICROOPERATIONS
Example: Let R1 = and R2 = After the operations, R0 becomes:

7 HARDWARE IMPLEMENTATION OF LOGIC MICROOPERATIONS
B i 1 4 X 1 F i MUX 2 3 Select S 1 S Function table F = A  B AND F = AB OR F = A  B XOR F = A’ Complement S1 S0 Output -operation

8 APPLICATIONS OF LOGIC MICROOPERATIONS
Logic microoperations can be used to manipulate individual bits or a portions of a word in a register Logic microoperations can change bit values, clear a group of bits, or insert new bit values into a register.

9 AND microoperation Used for clearing one or more bits in a register to 0. Boolean equations: X • 0 = 0 When ANDed with 0, binary variable X produces 0. X • 1 = X When ANDed with 1, binary variable X remains unchanged.

10 AND microoperation X • 0 = 0 X • 1 = X Example:
R1 (data) R2 (mask) R1  R1 ^ R2 AND operation: Selectively clear bits of a register Masking out the bits X • 1 = X R1 : High-order byte = Clear Low-order byte = Unchanged

11 OR microoperation Used to set one or more bits in a register.
Boolean equations: X + 1 = 1 When ORed with 1, binary variable X produces a 1. X + 0 = X When ORed with 0, binary variable X remains unchanged.

12 OR microoperation X + 1 = 1 X + 0 = X Example:
R1 (data) R2 (mask) R1  R1 v R2 OR operation: Selectively set bits of a register R1: High-order byte = Set to 1’s Low-order byte = Unchanged

13 XOR microoperation Used to complement one or more bits in a register.
Boolean equations: X  1 = X When XORed with 1, binary variable X complemented. X  0 = X When XORed with 0, binary variable X remains unchanged.

14 XOR microoperation X  1 = X X  0 = X Example:
R1 (data) R2 (mask) R1  R1  R2 XOR operation: Selectively complement bits of a register R1: High-order byte = Complemented Low-order byte = Unchanged

15 SHIFT MICROOPERATIONS

16 SHIFT MICROOPERATIONS
Shift microoperations are used for: Lateral movement of data. Serial transfer of data. Manipulating the contents of registers in arithmetic, logical, and control operations. Left shift : toward the MSB Right shift : toward the LSB MSB 7 6 5 4 3 2 1 LSB

17 SHIFT MICROOPERATIONS
There are three types of shifts Logical shift Circular shift Arithmetic shift What differentiates them is the information that goes into the serial input/incoming bit A right shift operation A left shift operation LSB Serial input Serial input MSB

18 SHIFT MICROOPERATIONS
A right shift operation A left shift operation LSB Serial input MSB Serial input

19 SHIFT MICROOPERATIONS
In RTL, string of letters are used to specify bit shift operations: Shift left : sl Shift right : sr

20 Shift Microoperations
LOGICAL SHIFT Assume the serial input/incoming bit to the shift is a 0. A right shift operation: A left shift operation: Example of Shifts: Type Symbolic Source R2 After Shift: Designation Destination R1 Shift Left R sl R Shift Right R sr R

21 SHIFT MICROOPERATIONS
Example 1: Let R2 = After the Shift operation, R1 becomes: Note: These shifts "zero fill". Sometimes a separate flip-flop is used to provide the data shifted in, or to “catch” the data shifted out.


Download ppt "REGISTER TRANSFER LANGUAGE"

Similar presentations


Ads by Google