Logic Gates

ANDORalternative:NOTNANDNORXORXNOR

Logic Circuits

fan-in

Number of inputs of a gate

Universal Gates

AND, OR, NOT gates are sufficient for building any boolean function.

This is called a complete set of logic.

Other gates may still be used due to

  • usefulness (XOR: parity bit generation)
  • economical
  • self-sufficient (NAND/NOR gates)

NAND as a universal gate

![](../../../schoolwork/cs2100/Logic/media/Pasted image 20241002021112.png)

NOR as a universal gate

![](../../../schoolwork/cs2100/Logic/media/Pasted image 20241002021139.png)

Implementing SOP and POS

SOP expressions

Sum-of-product expression implementation

Can be implemented using:

  1. 2 level AND-OR circuit (first level: AND, second level: OR)
  2. 2 level NAND circuit

ABCDEFAND-OR circuitABCDEFNAND circuitnote the negation here

POS expressions

Product-of-sums expression implementation

Can be implemented using:

  1. 2 level OR-AND circuit (first level: OR, second level: AND)
  2. 2 level NOR circuit

ABCDEGOR-AND circuitABCDEGNOR circuitnote the negation here

Programming Logic Array

Programming logic array

Programmable integrated circuit implements sum-of-products circuits (to allow multiple outputs)

AND gatesOR gatesInputsProduct termsOutputsStage 1:AND gates get theproduct termsStage 2:OR gates to getthe outputs