CENG300
Chapter 2 – Combinational Systems
Part 2 – Logic Gates
1
Recap about previous lecture
• We discussed:
• What are digital systems
• How we can specify the number of inputs and outputs
• How to build a Truth Table
• What is the don’t care
2
Logic Gates
• What are these gates?
• They are electronic components used to build digital systems
• There are 7 types of logic gates: AND, OR, NOT, NAND, NOR, XOR, XNOR
• Each gate has its schematic symbol and an algebraic representation
3
Logic Gates
It is called the complement.
The complement of 1 is 0. The complement of 0 is 1.
The complement of the complement is the number itself.
(0’)’ = 0 0’=1 1’=0
a b (a+b)’
0 0 1
0 1 0
1 0 0
1 1 0
4
Logic Gates a XOR b or a exclusive or b
a b a⊕b Gives 0 if inputs are the same otherwise gives 1.
0 0 0 If more than 2 inputs, we take them 2 by 2.
0 1 1
a ⊕ b = ab’+a’b to prove that, build the truth table
1 0 1
1 1 0 a b ab’ a’b ab’+a’b
XOR Gate
0 0 0 0 0
0 1 0 1 1
1 0 1 0 1
a b (a ⊕ b)’
1 1 0 0 0
0 0 1
0 1 0 Same truth table same functionality
1 0 0
XNOR Gate
1 1 1
We can also prove that (a ⊕ b)’ =a’b’ + ab
5
Logic Gates
a b (ab)’ We can prove that (ab)’ = a’+ b’
0 0 1 a b a’ b' a‘ + b’
0 1 1 0 0 1 1 1
1 0 1 0 1 1 0 1
1 1 0 1 0 0 1 1
1 1 0 0 0
The circle before the OR gate is considered as a NOT
6
Switching/Boolean Algebra & Schematic
representations
• Switching or Boolean algebra is a method to represent digital systems
in an algebraic way
• Schematic representation is a way to represent a digital system in a
schematic/drawing way
• Example: F(A,B,C) = ABC this is the algebraic representation of a
digital system that has three inputs named A, B, C and one output F
where F is the AND of the three inputs
F
F
F
7
Exercise 1
• Draw the logic circuit related to the following Boolean expression:
• G(A,B,C,D) = (A’B + C’D)B
8
Exercise 2
• Find the Boolean expression of the following logic circuit