3 - Boolean Algebra and Logic Gates
3 - Boolean Algebra and Logic Gates
3
AND
• AND operation is represented by a dot or by the absence of an
operator
• Example: or
• and are binary variables and can be equal to either 1 or 0, nothing
else
• “ AND is equal to ”
• if and only if and ; otherwise
4
OR
• OR operation is represented by a plus
• Example:
• “ OR is equal to ”
• if or or if both and
• If both and , then
5
NOT
• NOT operation is represented by a prime or an overbar
• Example: or
• “NOT is equal to ”
• If , then , but if , then
• The NOT operation is also referred to as the complement operation,
since it changes a 1 to a 0 and a 0 to a 1
6
Truth Table
• Definition of logical operations may be listed in a compact form
called truth tables
• A truth table is a table of all possible combinations of the variables,
showing the relation between values the variables can take and the
result of the operation
7
Logic Gates
• Logic gates are electronic circuits that operate on one or more input
signals to produce an output signal
• Logic circuits respond to two separate voltage levels that represent
binary variable equal to logic 0 or logic 1
8
Logic Gates
9
Logic Gates
10
Basic Theorems
Basic Theorems
• Operations with 0 and 1:
,
,
• Idempotent laws:
,
• Involution law:
• Laws of complementarity:
,
12
Basic Theorems
• Commutative laws:
,
• Associative laws:
,
13
Basic Theorems
• Distributive laws:
,
• Absorption law:
,
• Combining law:
,
14
Basic Theorems
• Consensus law:
• DeMorgan’s laws:
,
Examples:
• Simplify the following Boolean functions to a minimum number of
literals
16
Examples:
17
Examples:
18
Examples:
5. (
19
Examples
• Find the complement of the functions
20
NAND Gate
X Y Z
0 0 1
0 1 1
1 0 1
1 1 0
NOR Gate
X Y Z
0 0 1
0 1 0
1 0 0
1 1 0
Standard Representations of Logic
Functions
Truth Tables
• A truth table lists the output of the circuit for every possible
combination of the input
Truth Tables
• Two expressions are equal if they have the same value for every possible
combination of the variables
• Using the truth table (number of entries in the truth table is equal to , where
is the number of variables in the expression), we can show that
25
Definitions
• Literal: A variable or the complement of a variable.
Ex:
30
Canonical Forms: Sum of Minterms
• A Boolean function can be expressed by
• A truth table
• Sum of the minterms corresponding to truth table rows (input combinations)
for which the
31
Canonical Forms: Sum of Minterms
•
•
32
Canonical Forms: Product of Maxterms
• A Boolean function can be expressed by
• A truth table
• Product of the maxterms corresponding to truth table rows (input
combinations) for which the
33
Canonical Forms: Product of Maxterms
34
Examples:
• Express the function as a sum of
minterms
35
Examples:
Express the Boolean function as a product of maxterms
Therefore,
More conveniently,
36
Conversion between Canonical Forms
• The complement of a function expressed as the sum of minterms
equals the sum of minterms missing from the original function
Equivalently,
38