0% found this document useful (0 votes)
42 views

Basic Gates and Boolean Algebra

Uploaded by

amrit saud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Basic Gates and Boolean Algebra

Uploaded by

amrit saud
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 32

What are Gates?

• The building blocks that creates digital circuits are


logic gates.
• Each gate has its own logic symbol which allows
complex functions to be represented by a logic diagram
• The function of each gate can be represented by a truth
table or using Boolean notation
LOGIC GATES
• Types of gates
– NOT
– AND
– OR
– NAND
– NOR
– EX-OR
– EX-NOR
– BUFFER GATE
NOT Gate
• A NOT gate accepts one input value
and produces one output value
• By definition, if the input value for a NOT gate is 0, the
output value is 1, and if the input value is 1, the output is
0
• A NOT gate is sometimes referred to as an inverter
because it inverts the input value
AND Gate
• An AND gate accepts two input signals
• If the two input values for an AND gate are
both 1, the output is 1; otherwise, the
output is 0
OR Gate
• If the two input values are both 0, the
output value is 0; otherwise, the output is 1
NAND and NOR Gates
• The NAND and NOR gates are essentially the
opposite of the AND and OR gates, respectively.
• They are also called universal gates.
XOR Gate
• XOR, or exclusive OR, gate
– An XOR gate produces 0 if its two inputs are
the same, and a 1 otherwise
XNOR Gate
• XNOR, or exclusive NOR, gate
– An XNOR gate produces 0 if its two inputs
are the different, and a 1 otherwise
Boolean Algebra
• Mathematical system, formulate logic
with symbols.
• Mathematics of digital system.
• Algebraic Manipulation
Boolean Function
• Expression using binary operators.
• Bracket, NOT, AND, OR
• Eg; F =x.y’.z
Boolean algebra simplifications using
logic gates
Theorems
Theorems
Commutative Law
It that the interchanging of the order of operands in a Boolean equation
does not change its result. For example:

OR operator → A + B = B + A
AND operator → A . B = B . A

Associative Law
It states that the AND operation are done on two or more than two
variables.
For example:

A .(B.C) = (A.B).C A+(B+C) = (A+B)+C

Distributive Law
It states that the multiplication of two variables and adding the result with a
variable will result in the same value as multiplication of addition of the
variable
with individual variables. For example:
Theorems
De Morgan's Theorem

(A+B)’ = A’.B’ (A+B+C)’ = A’.B’.C’

(A.B)’ = A’+B’ (A.B.C)’ = A’+B’+C’

Duality Principle:
To find the dual of any expression:
- change the operator
- 0 > 1, 1>0
Eg: a+a’= 1 dual : a.a’=0

How to find complement?


- find dual
- complement each variable.
Eg: F= x+y 1.dual = x.y 2. F’= x’.y’
Gate Implementation
Q=A.B+B.C.(B+C)
Simplification of Boolean Functions
Simplify the following Boolean functions to a minimum number of literals.

• x+x’.y = (x+x’).(x+y) = 1.(x+y) = (x+y)

• x(x’+y) = x.x’ + xy = 0+xy = xy

• x’y’z + x’yz +xy’ = x’z(y+y’) + xy’ = x’z+xy’

• xy + x’z +yz = xy+yz +x’z +x.x’ = y(x+z)+x’(x+z) = (x+z)(y+x’)

• (x+y)(x’+z)(y+z)
= (x+y)(x’+z)(y+z+x.x’) [x.x’ = 0]
= (x+y)(x’+z)(y+z+x) (y+z+x’) [distributive property]
= (x+y)(x’+z)(x+y+z) (x’+y+z)
Let; (x+y)=A and (x’+z)=B
= A.B.(A+z).(B+y)
= A.(A+z).B.(B+y) = A.A+A.z.BB+By = A+A.z.B+By = A(1+z).B(1+y)
= A.B
= (x+y).(x’+z)
Find the complement of F = x+y’z.
Also prove F.F’= 0 and F+F’= 1.

Implement F = xy+x’y’+yz’
• using AND,OR and NOT gates
• using NOT and OR only
• using NOT and AND only
Q= A’B’+A’C+B’C’
Q= A’C+B’C’

Redundant Theorem:

1. 3 variables
2. Each variable repeated twice
3. One variable must be complemented

• Take complemented variable and


remaining is redundant.

F = AB+BC’+AC = BC’+AC
F =(A+B).(A’+C).(B+C) = A+B).(A’+C)
Find the complement of F = x+y’z.
Also prove F.F’= 0 and F+F’= 1.
F’ = (x+y’z)’ = x’.(y’.z)’ = x’.(y+z’) = x’y+x’z’

To prove: F.F’=0
LHS. (X+y’z). (x’y+x’z’ )

To prove: F+F’=1
LHS. X+y’z+x’y+x’z’
= x+x’y+y’z+x’z’
= X+y+y’z+x’z’
= x+x’z’+y+y’z
= A+ 1
=1
F+F’ = [(F+F’)’]’ = [(F’.F)]’ = [0]’ = 1
Canonical and Standard Forms
Boolean functions expressed as a sum of minterms or
product of maxterms are said to be in canonical.
Minterms and Maxterms
Sum-of-Minterms and Product-of- Maxterms
Product and Sum terms
Sum-of-Products (SOP) and Product-of-Sums (POS)

No of minterms = no of maxterms = 2n
Definitions
Literal: A variable or its complement
Product term: literals connected by •
Sum term: literals connected by +
Minterm: a product term in which all the variables
appear exactly once, either complemented or
uncomplemented
Maxterm: a sum term in which all the variables
appear exactly once, either complemented or
uncomplemented
Minterm
Represents exactly one combination in the truth
table.
Denoted by mj, where j is the decimal equivalent of
the minterm’s corresponding binary combination
(bj).
A variable in mj is complemented if its value in bj is
0, otherwise is uncomplemented.
Example: Assume 3 variables (A,B,C), and j=3.
Then, bj = 011 and its corresponding minterm is
denoted by mj = A’BC
Maxterm
Represents exactly one combination in the truth
table.
Denoted by Mj, where j is the decimal equivalent of
the maxterm’s corresponding binary combination
(bj).
A variable in Mj is complemented if its value in bj is
1, otherwise is uncomplemented.
Example: Assume 3 variables (A,B,C), and j=3.
Then, bj = 011 and its corresponding maxterm is
denoted by Mj = A+B’+C’
Truth Table notation for Minterms and
Maxterms
Minterms and x y z Minterm Maxterm
Maxterms are easy to
0 0 0 x’y’z’ = m0 x+y+z = M0
denote using a truth
table. 0 0 1 x’y’z = m1 x+y+z’ = M1
Example: 0 1 0 x’yz’ = m2 x+y’+z = M2
Assume 3 variables x,y,z 0 1 1 x’yz = m3 x+y’+z’= M3
(order is fixed)
1 0 0 xy’z’ = m4 x’+y+z = M4

Minterms: x=0; x’ 1 0 1 xy’z = m5 x’+y+z’ = M5


x=1; x 1 1 0 xyz’ = m6 x’+y’+z = M6
And vice versa for maxterm 1 1 1 xyz = m7 x’+y’+z’ = M7
Canonical Forms
Any Boolean function F( ) can be expressed as a unique
sum of minterms and a unique product of maxterms
(under a fixed variable ordering).
In other words, every function F() has two canonical
forms:
Canonical Sum-Of-Products (sum of minterms)
Canonical Product-Of-Sums (product of maxterms)
Canonical Forms (cont.)
Canonical Sum-Of-Products:
The minterms included are those mj such that F( ) = 1
in row j of the truth table for F( ).
Canonical Product-Of-Sums:
The maxterms included are those Mj such that F( ) = 0
in row j of the truth table for F( ).
Example
Truth table for f1(a,b,c) at right
a b c f1
The canonical sum-of-products form for
f1 is 0 0 0 0
f1(a,b,c) = m1 + m2 + m4 + m6 0 0 1 1
= a’b’c + a’bc’ + ab’c’ + abc’
The canonical product-of-sums form for 0 1 0 1
f1 is 0 1 1 0
f1(a,b,c) = M0 • M3 • M5 • M7
= (a+b+c)•(a+b’+c’)• 1 0 0 1
(a’+b+c’)•(a’+b’+c’).
1 0 1 0
Observe that: mj = Mj’
1 1 0 1
Shorthand: ∑ and ∏
f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a
sum-of-products form, and m(1,2,4,6) indicates that
the minterms to be included are m1, m2, m4, and m6.
f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is
a product-of-sums form, and M(0,3,5,7) indicates that
the maxterms to be included are M0, M3, M5, and M7.
Since mj = Mj’ for any j,
∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)
Conversion Between Canonical Forms
Replace ∑ with ∏ (or vice versa) and replace those j’s that
appeared in the original form with those that do not.
Example:
f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m4 + m6
= ∑(1,2,4,6)
= ∏(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)
Conversion to SOP
Expand non-canonical terms by inserting equivalent of 1
in each missing variable x:
(x + x’) = 1
Remove duplicate minterms
f1(a,b,c) = a’b’c + bc’ + ac’
= a’b’c + (a+a’)bc’ + a(b+b’)c’
= a’b’c + abc’ + a’bc’ + abc’ + ab’c’
= a’b’c + abc’ + a’bc + ab’c’
Conversion to POS
Expand noncanonical terms by adding 0 in terms of
missing variables (e.g., xx’ = 0) and using the
distributive law
Remove duplicate maxterms
f1(a,b,c) = (a+b+c)•(b’+c’)•(a’+c’)
= (a+b+c)•(aa’+b’+c’)•(a’+bb’+c’)
= (a+b+c)•(a+b’+c’)•(a’+b’+c’)•
(a’+b+c’)•(a’+b’+c’)
= (a+b+c)•(a+b’+c’)•(a’+b’+c’)•(a’+b+c’)
F(A,B,C)=A+B’C
For SOP conversion;
F=A+B’C
F=A(B+B’)(C+C’)+B’C(A+A’)
F= (AB+AB’)(C+C’)+ AB’C+A’B’C
F= ABC + ABC’ + AB’C + AB’C’ + AB’C+A’B’C
F= ABC + ABC’ + AB’C + AB’C’ +A’B’C
F = ∑ m(….)
F(A,B,C)=A+B’C
For POS conversion;
F=A+B’C
F=(A+B’).(A+C) [ Similar to POS]
F = (A+B’+C.C’).(A+B.B’+C)
F= (A+B’+C).(A+B’+C’).(A+B+C).(A+B’+C)
F= (A+B’+C).(A+B’+C’).(A+B+C)
F = ∏ M(...)

You might also like