Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Logic Microoperations: Engr. Kamran

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Lecture 9:

Logic Microoperations

Engr. Kamran

CS222 Computer Organization 1


Arithmetic Microoperations

MICROOPERATIONS

• Computer system microoperations are of four types:

- Register transfer microoperations


- Arithmetic microoperations
- Logic microoperations
- Shift microoperations

CS222 Computer Organization 2


Logic Microoperations

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 and treat them as binary variables
» e.g. R1 R2  R3

– useful for bit manipulation and for making logical decisions based on
the bit values

• There are, in principle, 16 different logic functions that can


be defined over two binary input variables.
– Determined using all possible truth table values obtained with 2 binary
variables
A B F0 F1 F2 … F13 F14 F15
0 0 0 0 0 … 1 1 1
0 1 0 0 0 … 1 1 1
1 0 0 0 1 … 0 1 1
1 1 0 1 0 … 1 0 1

CS222 Computer Organization 3


Logic Microoperations

LIST OF LOGIC MICROOPERATIONS


• List of Logic Microoperations
- 16 different logic operations obtained with 2 binary vars.

• Truth tables for 16 functions of 2 variables and the


corresponding 16 logic micro-operations
x 0 0 11 Boolean Logic Micro-
Name
y 0 1 01 Function Operations
0 0 00 F0 = 0 F 0 Clear
0 0 01 F1 = xy FAB AND
0 0 10 F2 = xy' F  A  B’
0 0 11 F3 = x FA Transfer A
0 1 00 F4 = x'y F  A’ B
0 1 01 F5 = y FB Transfer B
0 1 10 F6 = x  y F  A B Exclusive-OR
0 1 11 F7 = x + y F  A B OR
1 0 00 F8 = (x + y)' F  A  B)’ NOR
1 0 01 F9 = (x  y)' F  (A  B)’ Exclusive-NOR
1 0 10 F10 = y' F  B’ Complement B
1 0 11 F11 = x + y' F  A  B’
1 1 00 F12 = x' F  A’ Complement A
1 1 01 F13 = x' + y F  A’ B
1 1 10 F14 = (xy)' F  (A  B)’ NAND
1 1 11 F15 = 1 F  all 1's Set to all 1's

CS222 Computer Organization 4


LOGIC MICROOPERATIONS

• 16 different logic operations with 2 binary variables, however,


most systems only implement four basic logic operations:
– AND (), OR (), XOR (), Complement/NOT

• The logic operations others can be created from combination of


the four basic operations stated above

CS222 Computer Organization 5


Logic Microoperations

HARDWARE IMPLEMENTATION OF LOGIC MICROOPERATIONS

Ai
0
Bi

1
4X1 Ei
MUX
2

3 Select
S1
S0

• Diagram must be repeated n times for n bits registers

Function table
S1 S0 Output Microoperation
0 0 E = A B AND
0 1 E=AB OR
1 0 E = A B XOR
1 1 E = A’ Complement

CS222 Computer Organization 6


SPECIAL SYMBOLS

• Distinguish the symbol + when used for asthmatic plus


and logic or?

• P + Q: R1 R2 + R3

• How to represent OR Microoperation between registers?


• R1 R2 V R3

CS222 Computer Organization 7

You might also like