Chapter2: Boolean Algebra and Logic
Gates
Lecture4- Other Logic Operations
Engr. Arshad Nazir, Asst Prof
Dept of Electrical Engineering
Fall 2023 SEECS 1
Fall 2023 2
Objectives
• Study other Logic Operations
• Different Function Gates
• Extension to Multiple Inputs
Fall 2023 3
Other Logic Operations
• Given two Boolean variables:
➢ When binary operators AND and OR are placed between two variables,
they form two Boolean functions x . y and x + y
➢ there are 22x2 = 16 combinations of the two variables as there are 22n
possible functions for n binary variables (we will see the details of these 16
functions in next slides)
➢ each combination of the variables can result in one of two values, 0 or 1,
therefore there are 24=16 functions (combinations of 0’s and 1’s for the
four combinations, 00,01,10,11)
• These 16 functions listed can be subdivided into three categories:
➢ Two functions that produce a constant 0 or1.
➢ Four functions with unary operations: complement and transfer.
➢ Ten functions with binary operators that define eight different operations:
AND, OR, NAND, NOR, exclusive-OR, equivalence, inhibition, and
implication. Fall 2023 4
Function Combinations
• F1 represents the AND Operation
• F7 represents the OR Operation
• There are 14 other functions
Fall 2023 5
16 Two-Variable Functions
Fall 2023 6
Function Gate Implementations
Fall 2023 7
Function Gate Implementations
• It is easier to implement a Boolean function with these types of gates (as
seen on last slide)
• Inverter (Complement), Buffer (transfer), AND, OR, NAND, NOR, X-OR,
and XNOR (equivalence) are used as standard gates in digital design
• NAND and NOR are extensively used logic gates and are more popular
than AND and OR gates because these gates are easily constructed with
transistor circuits and digital circuits are easily implemented with them.
• Implication and inhibition are not commutative or associative and thus
are impractical to use as standard logic gates.
Fall 2023 8
Multiple Inputs
• All the previously defined gates, with the exception of the inverter and
the buffer, can have multiple inputs.
➢ A gate can have multiple inputs provided it is a binary operation that
is commutative (x + y = y + x and xy = yx) and associative (x + (y + z) =
(x + y) + z and x(yz) = (xy)z)
➢ NAND and NOR functions are commutative but not associative.
For example, for NOR
X Y=Y X commutative
(X Y) Z ≠ X (Y Z) not associative
xz′+yz′≠x′y+x′z
➢ To overcome this difficulty we define multiple NOR (or NAND) gate as
a complemented OR (or AND) gate e.g., as (x+y+z)′ or (xyz)′
Fall 2023 9
Multiple Inputs (Non-associative
NOR operation)
Fall 2023 10
Multiple Inputs NOR and NAND
gates
Fall 2023 11
Multiple Inputs XOR gate
• 3-input XOR gate is normally implemented by cascading 2-input gates
(multiple inputs XOR is uncommon from hardware point)
Fall 2023 12
The End
Fall 2023 13