0% found this document useful (0 votes)
11 views34 pages

03 BooleanAlgebra&LogicGates 1

The document provides an overview of Boolean Algebra and its applications in digital logic design, covering topics such as Boolean functions, truth tables, DeMorgan's Theorem, and logic gates. It explains the fundamental operations (AND, OR, NOT), the significance of minterms and maxterms, and methods for simplifying Boolean expressions. Additionally, it discusses the importance of Boolean algebra in designing digital circuits that operate using binary signals.

Uploaded by

SyedaDF Ikram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views34 pages

03 BooleanAlgebra&LogicGates 1

The document provides an overview of Boolean Algebra and its applications in digital logic design, covering topics such as Boolean functions, truth tables, DeMorgan's Theorem, and logic gates. It explains the fundamental operations (AND, OR, NOT), the significance of minterms and maxterms, and methods for simplifying Boolean expressions. Additionally, it discusses the importance of Boolean algebra in designing digital circuits that operate using binary signals.

Uploaded by

SyedaDF Ikram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

Boolean Algebra and

Logic Gates

CSC 1074
Digital Logic Design
Presentation Outline
 Boolean Algebra

 Boolean Functions and Truth Tables

 DeMorgan's Theorem

 Algebraic manipulation and expression simplification

 Logic gates and logic diagrams

 Minterms and Maxterms

 Sum-Of-Products and Product-Of-Sums


Boolean Algebra
 Introduced by George Boole in 1854
 Two-valued Boolean algebra is also called switching algebra
 A set of two values: B = {0, 1}
 Three basic operations: AND, OR, and NOT
 The AND operator is denoted by a dot (·)
 or is read: AND

 The OR operator is denoted by a plus (+)


 is read: OR

 The NOT operator is denoted by (') or an overbar (¯).


 or is the complement of
Postulates of Boolean Algebra
1. Closure: the result of any Boolean operation is in B = {0, 1}

2. Identity element with respect to + is 0:

Identity element with respect to · is 1:

3. Commutative with respect to +:

Commutative with respect to ·:

4. · is distributive over +:

+ is distributive over ·:

5. For every in B, there exists in B (called complement of ) such


that: and
AND, OR, and NOT Operators
 The following tables define , , and
 is the AND operator
 is the OR operator
 is the NOT operator

x y x·y x y x+y x x'


0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Boolean Functions
 Boolean functions are described by expressions that consist of:
 Boolean variables, such as: , , etc.
 Boolean constants: 0 and 1
 Boolean operators: AND (·), OR (+), NOT (')
 Parentheses, which can be nested
 Example:
 The dot operator is implicit and need not be written
 Operator precedence: to avoid ambiguity in expressions
 Expressions within parentheses should be evaluated first
 The NOT (') operator should be evaluated second
 The AND (·) operator should be evaluated third
 The OR (+) operator should be evaluated last
Truth Table
 A truth table can represent a Boolean function
 List all possible combinations of 0's and 1's assigned to variables
 If n variables then 2n rows
 Example: Truth table for
f = xy'+
x y z y' xy' x' x'z
x'z
0 0 0 1 0 1 0 0
0 0 1 1 0 1 1 1
0 1 0 0 0 1 0 0
0 1 1 0 0 1 1 1
1 0 0 1 1 0 0 1
1 0 1 1 1 0 0 1
1 1 0 0 0 0 0 0
1 1 1 0 0 0 0 0
DeMorgan's Theorem
Can be verified
Using a Truth Table

x y x' y' x+y (x+y)' x'y' x y (x x'+ y'


y)'
0 0 1 1 0 1 1 0 1 1
0 1 1 0 1 0 0 0 1 1
1 0 0 1 1 0 0 0 1 1
1 1 0 0 1 0 0 1 0 0
Identical Identical

 Generalized DeMorgan's Theorem:


Complementing Boolean Functions
 What is the complement of ?

 Use DeMorgan's Theorem:

 Complement each variable and constant

 Interchange AND and OR operators

 So, what is the complement of ?

Answer: )

 Example 2: Complement

 Answer:
Algebraic Manipulation of Expressions
 The objective is to acquire skills in manipulating Boolean
expressions, to transform them into simpler form.

 Example 1: prove (absorption theorem)

 Proof:
Distributive · over +

 Example 2: prove (simplification theorem)

 Proof: Distributive + over ·


Consensus Theorem
 Prove that: (consensus theorem)
 Proof:

Distributive · over +
Associative commutative +

Distributive · over +
Summary of Boolean Algebra
Property Dual Property
Identity
Complement
Null
Idempotence
Involution (
Commutative
Associative (
Distributive
Absorption
Simplification
De Morgan (
Duality Principle
 The dual of a Boolean expression can be obtained by:
 Interchanging AND (·) and OR (+) operators
 Interchanging 0's and 1's

 Example: the dual of is


 The complement operator does not change

 The properties of Boolean algebra appear in dual pairs


 If a property is proven to be true then its dual is also true

Property Dual Property


Identity
Complement
Distributive
Expression Simplification
 Using Boolean algebra to simplify expressions
 Expression should contain the smallest number of literals
 A literal is a variable that may or may not be complemented
 Example: simplify
 Solution: (15 literals)
(15 literals)
(13 literals)
(7 literals)
(7 literals)
(6 literals)
(5 literals only)
Importance of Boolean Algebra
 Our objective is to learn how to design digital circuits

 These circuits use signals with two possible values

 Logic 0 is a low voltage signal (around 0 volts)

 Logic 1 is a high voltage signal (e.g. 5 or 3.3 volts)

 The physical value of a signal is the actual voltage it carries,


while its logic value is either 0 (low) or 1 (high)

 Having only two logic values (0 and 1) simplifies the


implementation of the digital circuit
Next . . .
 Boolean Algebra

 Boolean Functions and Truth Tables

 DeMorgan's Theorem

 Algebraic manipulation and expression simplification

 Logic gates and logic diagrams

 Minterms and Maxterms

 Sum-Of-Products and Product-Of-Sums


Logic Gates and Symbols
𝑥 𝑥· 𝑦 𝑥 𝑥+ 𝑦 𝑥 𝑥′
𝑦 𝑦
AND gate OR gate NOT gate (inverter)
𝑥
𝑥 𝑦 𝑥′
𝑦
AND: Switches in series OR: Switches in parallel NOT: Switch is normally
logic 0 is open switch logic 0 is open switch closed when x is 0

 In the earliest computers, relays were used as mechanical


switches controlled by electricity (coils)
 Today, tiny transistors are used as electronic switches that
implement the logic gates (CMOS technology)
Truth Table and Logic Diagram
 Given the following logic function:
 Draw the corresponding truth table and logic diagram

Truth Table Logic Diagram


x y z y'+ z f = x(y'+ 𝑥 ′
𝑓 =𝑥 ( 𝑦 + 𝑧 )
z)
0 0 0 1 0 𝑦
0 0 1 1 0 𝑧
0 1 0 0 0 Truth Table and Logic Diagram
0 1 1 1 0 describe the same function .
1 0 0 1 1 Truth table is unique, but logic
1 0 1 1 1 expression and logic diagram
are not. This gives flexibility in
1 1 0 0 0
implementing logic functions.
1 1 1 1 1
Combinational Circuit
 A combinational circuit is a block of logic gates having:

inputs:

outputs:
 Each output is a function of the input variables

 Each output is determined from present combination of inputs

 Combination circuit performs operation specified by logic gates

inputs
Combinational outputs


Circuit
Example of a Simple Combinational
Circuit
𝑥
𝑦 𝑓
𝑧
𝑔

 The above circuit has:


 Three inputs: , , and
 Two outputs: and

 What are the logic expressions of and ?


 Answer:
From Truth Tables to Gate Implementation
 Given the truth table of a Boolean function , how do we
implement the truth table using logic gates?

Truth Table
x y f
z
0 0 0 What is the logic expression of ?
0
0 0 0
What is the gate implementation of ?
1
0 1 1
0 To answer these questions, we need
0 1 1
1 to define Minterms and Maxterms
1 0 0
Minterms and Maxterms
 Minterms are AND terms with every variable present in either
true or complement form
 Maxterms are OR terms with every variable present in either
true or complement form
Minterms and Maxterms for 2 variables and
x y index Minterm Maxterm
0 0 0
0 1 1
1 0 2
1 1 3

 For n variables, there are 2n Minterms and Maxterms


Minterms and Maxterms for 3 Variables
x y z index Minterm Maxterm
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7

Maxterm is the complement of Minterm


and
Purpose of the Index
 Minterms and Maxterms are designated with an index

 The index for the Minterm or Maxterm, expressed as a


binary number, is used to determine whether the variable
is shown in the true or complemented form
 For Minterms:
 ‘1’ means the variable is Not Complemented

 ‘0’ means the variable is Complemented

 For Maxterms:
 ‘0’ means the variable is Not Complemented

 ‘1’ means the variable is Complemented


Sum-Of-Minterms (SOM) Canonical Form
Truth Table
x y z f Minterm
0 0 0 0
Sum of Minterm entries
0 0 1 0 that evaluate to ‘1’
0 1 0 1
Focus on the ‘1’ entries
0 1 1 1
1 0 0 0
𝑓 =𝑚2 +𝑚3 +𝑚 5+𝑚7
1 0 1 1

𝑓 =∑ ( 2 , 3 , 5 ,7 )
1 1 0 0
1 1 1 1

′ ′ ′ ′
𝑓 =𝑥 𝑦 𝑧 +𝑥 𝑦𝑧+𝑥 𝑦 𝑧 +𝑥𝑦𝑧
Examples of Sum-Of-Minterms
Product-Of-Maxterms (POM) Canonical
Form
Truth Table
x y z f Maxterm
0 0 0 0
Product of Maxterm entries
0 0 1 0 that evaluate to ‘0’
0 1 0 1
Focus on the ‘0’ entries
0 1 1 1
1 0 0 0
𝑓 =𝑀 0 · 𝑀 1 · 𝑀 4 · 𝑀 6
1 0 1 1

𝑓 =∏ ( 0 ,1 , 4 , 6 )
1 1 0 0
1 1 1 1

′ ′ ′ ′
𝑓 =(𝑥+𝑦+𝑧 )(𝑥+ 𝑦+𝑧 )(𝑥 + 𝑦+𝑧)(𝑥 + 𝑦 +𝑧)
Examples of Product-Of-Maxterms
Conversions between Canonical Forms
 The same Boolean function can be expressed in two ways:
 Sum-of-Minterms
 Product-of-Maxterms

Truth Table
x y f Minterms Maxterms
z
0 0 1
0 To convert from one canonical
0 0 0 form to another, interchange
1
the symbols  and  and list
0 1 1
0 those numbers missing from
0 1 1 the original form.
1
1 0 0
0
Function Complement
Truth Table Given a Boolean function
x y z f f'
0 0 0 1 0 Then, the complement of function
0 0 1 0 1
0 1 0 1 0
0 1 1 1 0
1 0 0 0 1
The complement of a function expressed by a
1 0 1 1 0
Sum of Minterms is the Product of Maxterms
1 1 0 0 1
with the same indices. Interchange the symbols
1 1 1 1 0
 and , but keep the same list of indices.
Summary of Minterms and Maxterms
 There are 2n Minterms and Maxterms for Boolean functions with
n variables, indexed from 0 to 2n – 1
 Minterms correspond to the 1-entries of the function
 Maxterms correspond to the 0-entries of the function
 Any Boolean function can be expressed as a Sum-of-Minterms
and as a Product-of-Maxterms
 For a Boolean function, given the list of Minterm indices one can
determine the list of Maxterms indices (and vice versa)
 The complement of a Sum-of-Minterms is a Product-of-Maxterms
with the same indices (and vice versa)
Sum-of-Products and Products-of-Sums
 Canonical forms contain a larger number of literals
 Because the Minterms (and Maxterms) must contain, by definition, all
the variables either complemented or not
 Another way to express Boolean functions is in standard form
 Two standard forms: Sum-of-Products and Product-of -Sums
 Sum of Products (SOP)
 Boolean expression is the ORing (sum) of AND terms (products)
 Examples:

 Products of Sums (POS)


 Boolean expression is the ANDing (product) of OR terms (sums)
 Examples:
Two-Level Gate Implementation
𝑓 1=𝑥𝑦 ′+𝑥𝑧 𝑓 2= 𝑦+𝑥 𝑦′ 𝑧
𝑥 𝑦
𝑦′ 𝑓2
𝑓1 𝑥
𝑥 𝑦′
𝑧 AND-OR 𝑧 3-input AND gate
implementations

′ ′ ′ ′
𝑓 3=( 𝑥 + 𝑧 )( 𝑥 + 𝑦 ) 𝑓 4=𝑥 ( 𝑥 + 𝑦 + 𝑧 )
𝑥 𝑥
𝑧 𝑓4
𝑓3 𝑥′
𝑥′ 𝑦′
𝑦′ OR-AND 𝑧 3-input OR gate
implementations
Two-Level vs. Three-Level Implementation
 (6 literals) is a sum-of-products
 may also be written as: (5 literals)
 However, is a non-standard form
 is not a sum-of-products nor a product-of-sums

2-level implementation 3-level implementation

𝑎
𝑏 𝑎
𝑏
𝑐
𝑑 h 𝑐 h
𝑑
𝑐 𝑒
𝑒 3-input OR gate

You might also like