Microprocessor and Computer Architecture

⌘K
  1. Home
  2. Docs
  3. Microprocessor and Comput...
  4. Microoperation
  5. Logic Microoperations

Logic Microoperations

Here is the definition of Logic Microoperations

Logic Microoperation specify binary operation for string of bits stored in registers.

• These operation considered each bits of the registers separately and treat them as variables(binary Variables).

logic micro operations 1 1645937242

The Clear logic micro-operation is used to clear the register or set the bits of the register to 0. To use this micro-operation, we need to feed 0 to the register. In the above truth table, F0 represents the truth table of Clear logic micro-operation.

For example:  F <- 0 means the value of the register F is set to 0 or is cleared. The previous value of register F will be removed.

Boolean expression:

The Boolean expression for the Clear logic micro-operation is F0 = 0

The AND logic micro-operation performs the logical AND between the bits of the data stored in the two registers. The symbol to represent the logical AND is ∧ . 

Case 1: Both x and y values are true.

In the first case, if the values of both two registers are true then the result of AND operation is 1; else, it is 0. F1 represents the truth table of AND logic micro-operation in the above truth table.

For example: F <- A ∧ B means the registers A and B value will undergo AND micro-operation, and the output will be stored in register F.

Boolean expression:

The Boolean expression for the AND logic micro-operation will be F1 = x.y

Case 2: x is true, and y is false.

The logical AND operation we discussed above gives output 1 when both x and y are true. There is also another AND operation which includes x but not y. Also known as inhibition, here for performing the AND operation, the first value is taken from the x variable or register. The second value is taken as the complement of the y variable or register. If the value of the x register is true and of the y register is false, then the result of AND operation is 1; else, it is 0.

F2 represents the truth table of inhibition AND logic micro-operation in the above truth table.

For example:  F <- A ∧ B’ means the value of the registers A and complement B will undergo AND micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for the AND logic micro-operation will be F2 = x.y’

Case 3: x is false, and y is true.

The third case of logical AND operation includes y but not x. Also known as inhibition, here for performing the AND operation, the first value is taken as the complement of the x variable or register, and the second value is taken from the y variable or register. If the value of the x register is false and of the y register is true, then the result of AND operation is 1; else, it is 0.

F4 represents the truth table of inhibition AND logic micro-operation in the above truth table.

For example: F <- A’ ∧ B means the value of the complement register A and as it is B will undergo AND micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for the AND logic micro-operation will be F4 = x’.y

The Transfer A logic micro-operation transfers the contents of register A (first register) to the output register. 

• F3 represents the truth table of Transfer A logic micro-operation in the above truth table. Since there is a transfer of data from the first register to the output register in this micro-operation, its truth table is the same as the taken values of the x variable (0, 0, 1, 1). 

For example: F <- A means the value of register A is moved to register F. The previous value of register F will be removed.

Boolean expression:

The boolean expression for the Transfer A logic micro-operation is F3 = x

The Transfer B logic micro-operation transfers the contents of register B (second register) to the output register. 

• F5 represents the truth table of Transfer B logic micro-operation in the above truth table. Since there is a transfer of data from the second register to the output register in this micro-operation, its truth table is the same as the taken values of the y variable (0, 1, 0, 1). 

For example:  F <- B means the value of register B is moved to register F. The previous value of register F will be removed.

Boolean expression:

The boolean expression for the Transfer B logic micro-operation is F5 = y

Also known as XOR, this logic micro-operation performs the logical XOR between the data bits stored in the two registers. The logical XOR means either x should be true or y but not both. The symbol to represent the Exclusive OR is ⊕.

• F6 represents the truth table of Exclusive OR logic micro-operation in the above truth table. The output will be 1 when either x =1 and y = 0 or x = 0 and y = 1.

For example: F <- A ⊕ B means the registers A and B value will undergo XOR micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for the Exclusive OR logic micro-operation will be F6 = x.y’ + x’.y

The OR logic micro-operation performs the logical OR between the data bits stored in the two registers. The symbol to represent the logical OR is ∨.

Case 1: Either x or y or both x and y values are true.

In the first case, if either the value of x register is true and y register is false, or the value of x register is false, and y register is true, or both the values of x and y registers are true, then the result of OR operation is 1 else it is 0. F7 represents the truth table of OR logic micro-operation in the above truth table.

For example: F <- A ∨ B means the registers A and B value will undergo OR micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for the OR logic micro-operation will be F7 = x + y

Case 2: If y, then x else not.

In the second case, the output for 1 follows the condition that

  • If the value of the y register is true, then the value of the x register must be true. If this condition is satisfied, then the output is 1. 
  • If the value of the y register is false, then we don’t need to look for the value of the x register, and the output is 1. 
  • Else the output is 0.  

To perform this logic micro-operation, we need to perform the logical OR of the values of the x register and the complement value of the y register. 

In the above truth table, F11 represents the truth table of this logic micro-operation.

For exampleF <- A ∨ B’ means the value of the registers A and complement B will undergo OR micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for this OR logic micro-operation will be F11 = x + y’

Case 3: If x, then y else not.

In the second case, the output for 1 follows the condition that

  • If the value of the x register is true, then the y register’s value must be true. If this condition is satisfied, then the output is 1. 
  • If the value of the x register is 0, then we don’t need to look for the value of the y register, and the output is 1. 
  • Else the output is 0.  

To perform this logic micro-operation, we need to perform the logical OR of the complemented value of the x register and the value of the y register. 

In the above truth table, F13 represents the truth table of this logic micro-operation.

For example: F <- A’ ∨ B means the complemented register A and B value will undergo OR micro-operation, and the output will be stored in register F.

Boolean expression:

The Boolean expression for this OR logic micro-operation will be F13 = x’ + y

The NOR logic micro-operation is simply the opposite of OR logic micro-operation. As the name suggests, it is Not OR. The output of OR micro-operation is 1 when the value of either x register or y register or both x and y registers are true. In contrast, in NOR, the output is 0 when the value of either x register or y register or both x and y registers are true, and it is 1 when both x and y registers are false. In the above truth table, F8 represents the truth table of NOR logic micro-operation.

• For example: F <- (A ∨ B)’ means the registers A and B value will undergo NOR micro-operation, and the output will be stored in register F.

Boolean expression:

The Boolean expression for the Transfer A logic micro-operation is F8 = (x + y)’

If we perform the Exclusive NOR micro-operation, the output will be 1 when the values of both the x and y registers will be the same. They can be true or false, but they have to be the same.

F9 represents the truth table of Exclusive NOR logic micro-operation in the above truth table. The output will be 1 when either x = 0 and y = 0 or x = 1 and y = 1.

For example: F <- (A ⊕ B)’ means the registers A and B value will undergo Exclusive NOR micro-operation, and the output will be stored in register F.

Boolean expression:

The Boolean expression for the Exclusive NOR logic micro-operation will be F9 = x.y + x’.y’

The Complement B logic micro-operation transfers the complemented contents of register B (second register) to the output register. First, the content of the register is complemented and then moved to the desired register.

In the above truth table, F10 represents the truth table of Complement B logic micro-operation. Since there is a transfer of complemented data from the second register to the output register in this micro-operation, its truth table is just the opposite of the taken values of the y variable (1, 0, 1, 0). 

For example: F <- B’ means the complemented value of register B is moved to register F. The previous value of register F will be removed.

Boolean expression:

The Boolean expression for the Complement B logic micro-operation is F10 = y’

The Complement A logic micro-operation transfers the complemented contents of register A (first register) to the output register. First, the content of the register is complemented and then moved to the desired register.

F12 represents the truth table of Complement A logic micro-operation in the above truth table. Since there is a transfer of complemented data from the first register to the output register in this micro-operation, its truth table is just the opposite of the taken values of the y variable (1, 1, 0, 0). 

For example: F <- A’ means the complemented value of register A is moved to register F. The previous value of register F will be removed.

Boolean expression:

The boolean expression for the Complement A logic micro-operation is F12 = x’

The NAND logic micro-operation is simply the opposite of AND logic micro-operation. As the name suggests, it is Not AND. The output of AND micro-operation is 1 when the value of both the x register and y register is true. In contrast, in NAND, the output is 0 when the value of both x register and y register is true, and it is 1 when either x is false, or y is false, or both are false. 

In the above truth table, F14 represents the truth table of NAND logic micro-operation.

For example: F <- (A ∧ B)’ means the registers A and B value will undergo NAND micro-operation, and the output will be stored in register F.

Boolean expression:

The boolean expression for the NAND logic micro-operation is F14 = (x.y)’

The set to all 1’s logic micro-operations is used to set all the register bits to 1. To use this micro-operation, we just need to feed 1 to the register. In the above truth table, F15 represents the truth table of Set to all 1’s logic micro-operation.

• For example: F <- 1 means the value of the register F is set to 1. The previous value of register F will be removed.

Boolean expression:

The Boolean expression for the Clear logic micro-operation is F15 = 1

Screenshot 2024 04 03 191916
  • 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.
  • Although there are 16 logic microoperations, most computers use only four- AND, OR, XOR
    (exclusive-OR), and complement from which all others can be derived.
  • Block diagram shows one stage of a circuit that generates the four basic logic microoperations.
  • It consists of four gates and a multiplexer. Each of the four logic operations is generated through a
    gate that performs the required logic.
  • The outputs of the gates are applied to the data inputs of the multiplexer. The two selection inputs S1 and S0
    choose one of the data inputs of the multiplexer and direct its value to the output.

Application: Setting specific bits in a register or memory location to 1 while leaving other bits unchanged.

Example: In a computer system, selectively setting certain control bits in a register to enable specific functionalities while keeping other control bits unchanged.

Application: Complementing (flipping) selected bits in a register or memory location while leaving other bits unchanged.

Example: In error correction and detection circuits, selectively complementing certain parity bits to correct errors in transmitted data.

Application: Clearing (setting to 0) specific bits in a register or memory location while leaving other bits unchanged.

Example: In a processor’s status register, selectively clearing specific flag bits after certain operations to update the status information while preserving other flags.

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *