Escolar Documentos
Profissional Documentos
Cultura Documentos
Logic Microoperations
Introduction
Logic microoperations specify binary operations for strings of bits stored in registers. Special symbols will be adopted for the logic microoperations OR, AND and complement. R A B, R A B, R A There are 16 different logic operations that can be performed with two binary variables.
F0 F1 F2 F3 F4 F5 F6 F7
F0 FA B FA B FA FA B FB FA+B FAB
Clear And
F8 F9 F10
F (A B) F (A + B) F B F A B F A F A B F (A B) F all 1s
Transfer A
F11 F12
Complement A
Transfer B X-OR OR
xy 00 01 10 11
Introduction(cont.)
The hardware implementation of logic microoperations requires that logic gates be inserted for each bit or pair of bits in the registers to perform the required logic function.
Applications
The selective-set operation sets to 1 the bits in register A where there are corresponding 1s in register B.
1010 A before 1100 B (logic operand) 1110 A after OR microoperation
Applications(cont.)
The selective-clear operation clears to 0 the bits in A only where there are corresponding 1s in B.
1010 A before 1100 B (logic operand) 0010 A after microoperation (A AND B)
The mask operation is similar to the selective-clear operation except that the bits of A are cleared only where there are corresponding 0s in B.
1010 A before 1100 B (logic operand) 1000 A after AND microoperation
Applications(cont.)
The insert operation inserts a new value into a group of bits.
0110 1010 A before 0000 1111 B (mask) 0000 1010 A after masking (AND microoperation) 0000 1010 A before 1001 0000 B (insert) 1001 1010 A after insertion (OR microoperation)
The clear operation compares the words in A and B and produces an all 0s result if the two numbers are equal.
1010 A before 1010 B (logic operand) 0000 A after (XOR microoperation)
10