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

03 Boolean Algebra and Logic Circuits

- Boolean algebra is a mathematical system used to represent objects that can have two values (true/false or 1/0) - The basic logical operations are AND, OR, and NOT - Boolean expressions combine variables and logical operators and can be represented using truth tables - Truth tables show the output for every combination of input values and are used to analyze and prove properties of Boolean expressions

Uploaded by

Dann Laurte
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

03 Boolean Algebra and Logic Circuits

- Boolean algebra is a mathematical system used to represent objects that can have two values (true/false or 1/0) - The basic logical operations are AND, OR, and NOT - Boolean expressions combine variables and logical operators and can be represented using truth tables - Truth tables show the output for every combination of input values and are used to analyze and prove properties of Boolean expressions

Uploaded by

Dann Laurte
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 90

BOOLEAN

ALGEBRA AND
LOGIC CIRCUITS

SCHOOL OF COMPUTING RIEL A. GOMEZ


BOOLEAN ALGEBRA

• Boolean algebra is a mathematical system developed by


George Boole in 1854 that is used for the manipulation of
objects or variables that can have one of two values.

– In symbolic logic, these values are true and false.

– In digital or computer systems, these values are on and


off, high and low, or 1 and 0.

• In the study of digital systems, the values that are


commonly used are 1 and 0. A logic 1 is usually used to
denote true while 0 denotes false.

Boolean Algebra and Logic Circuits


BOOLEAN ALGEBRA

• The variables in Boolean algebra are called binary


variables. And like variables in "ordinary" algebra, there
are operators that can be performed on binary variables.
These operators are the logical operators.

• The three basic logical operations are called:

1. AND operation
2. OR operation
3. NOT operation

• The variables, operators, and the constants (1 and 0) can


be combined to form Boolean or binary expressions.

Boolean Algebra and Logic Circuits


THE LOGICAL OPERATORS
• The AND operator (Boolean product) is represented by a dot or by
the absence of an operator.

Z=X·Y

or "Z is equal to X AND Y"

Z = XY

The logical operation AND is interpreted to mean that:

Z = 1 if and only if X = 1 and Y = 1.

Z = 0 if X = 0 or if Y = 0, or if both X = 0 and Y = 0.

Boolean Algebra and Logic Circuits


THE LOGICAL OPERATORS

• The OR operator (Boolean sum) is represented by a plus


symbol.

Z=X+Y "Z is equal to X OR Y"

• The logical operation OR is interpreted to mean that

Z = 1 if X = 1 OR if Y = 1, or if both X = 1 and Y = 1.

Z = 0 if and only if X = 0 and Y = 0.

Boolean Algebra and Logic Circuits


THE LOGICAL OPERATORS

• The NOT operation is represented by a bar over the variable


(overbar) or a ' (prime mark) after the variable.


ZZ ==XX

or "Z is equal to NOT X"

Z ==X'X′

• The logical operation NOT is interpreted to mean that Z is what X


is not. In other words, if X = 1, then Z = 0; but if X = 0, then Z = 1.

• The NOT operation is also referred to as the complement


operation, since it changes a 1 to 0 and a 0 to 1.

Boolean Algebra and Logic Circuits


THE LOGICAL OPERATORS

• A Boolean operator can be


completely described using a The Truth Table for the
table that lists the inputs, all AND Operation
possible values of these inputs,
and the resulting values of the AND
operation for all possible
combination of these inputs. inputs output
X Y XY
• This table is called a truth table.
0 0 0
• A truth table shows the 0 1 0
relationship, in tabular form,
between the input values and 1 0 0
the result of a specific Boolean
operator or function on the 1 1 1
input variables.

Boolean Algebra and Logic Circuits


THE LOGICAL OPERATORS

• The truth tables for the OR and NOT operations.

OR NOT
inputs output input output
X Y X+Y X ഥ
X
0 0 0 0 1
0 1 1 1 0
1 0 1
1 1 1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• As mentioned earlier, binary variables, operators, and constants


can be combined to form Boolean or binary expressions/functions.

• Example of a Boolean expression or function:

ZZ = ഥC
= AA ++BC
B

• In the rules of precedence of Boolean operations, the NOT


operator has highest priority, followed by AND, then OR.
Parentheses can alter the order of precedence.

• In the given example, complement B first, then perform the AND


𝐵ത and C. Then OR this result with A.
of B

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS
• For example, if A = 0, B = 0, and C = 0, then:

Z=A+B ഥC
= 0 + 0ത 0
= 0 + 10
=0+0
=0
• As another example, if A = 0, B = 0, and C = 1, then:

Z=A+B ഥC

= 0 + 01
= 0 + 11
=0+1
=1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• A truth table may also be


used to represent the Inputs Output
expression: A B C Z
0 0 0 0
Z =Z A
= +A BC
+BഥC
0 0 1 1
0 1 0 0
• A truth table allows the 0 1 1 0
expression to be 1 0 0 1
completely described by 1 0 1 1
the giving the
corresponding output for 1 1 0 1
all possible combination 1 1 1 1
of input values.

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• Take note that the number of rows in


a truth table is 2n, where n is the Inputs Output
number of variables in the function. A B C Z

In the previous example, there are 0 0 0 0


three variables (A, B, and C), so there 1 0 0 1
are 23 = 8 rows.
2 0 1 0
• The binary combinations for the truth 3 0 1 1
table are obtained from the binary 4 1 0 0
numbers by counting from 0 through
2n - 1. 5 1 0 1
6 1 1 0
• In the previous example, the binary
combinations are from 0 to 7. 7 1 1 1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

Inputs Output
A B C ഥ
B ഥC
B ZZ = ഥC
= A ++BC
B
• To make the evaluation 0 0 0 1 0 0
of the Boolean function 0 0 1 1 1 1
easier, the truth table 0 1 0 0 0 0
may contain extra 0 1 1 0 0 0
columns to hold
1 0 0 1 0 1
evaluations of subparts
of the expression. 1 0 1 1 1 1
1 1 0 0 0 1
1 1 1 0 0 1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS
• Exercise: Derive the truth table for the expression

Z = (A+B)AC
Inputs Output
A B C A+B AC AC Z = (A+B)AC
0 0 0 0 0 1 0
0 0 1 0 0 1 0
0 1 0 1 0 1 1
0 1 1 1 0 1 1
1 0 0 1 0 1 1
1 0 1 1 1 0 0
1 1 0 1 0 1 1
1 1 1 1 1 0 0

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• Exercises: Derive the truth table


for the following Boolean
expressions.

Z = ABC + ABC + ABC


Z = (A + B)(A + C)(A + C)
Z = (BC + AD)(AB + CD)
Boolean Algebra and Logic Circuits
BOOLEAN EXPRESSIONS

• A truth table is a unique representation of a Boolean


expression. There can only be one truth table for a
particular expression.

• However, two or more expressions may have the same


truth table. And if two expressions have identical truth
tables, the functions are equivalent (and vice-versa).

• Truth tables can be used to prove equality theorems.

• For example, show that the function F1 = A + BC and the


function F2 = (A + B)(A + C) are equivalent.

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• Truth table for F1 = A + BC:

Inputs Output
A B C BC A + BC
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 1 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• Truth table for F2 = (A + B)(A + C):

Inputs Output
A B C A+B A+C (A+B)(A+C)
0 0 0 0 0 0
0 0 1 0 1 0 Since F1 and F2 have
identical truth tables
0 1 0 1 0 0 (the output is the
0 1 1 1 1 1 same for each
1
combination of input
1 0 0 1 1 values), then F1 = F2.
1 0 1 1 1 1
1 1 0 1 1 1
1 1 1 1 1 1

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

• Sample practical application of Boolean expressions:

A washing machine has three sensors to check for:

1. washing machine lid open


2. washing tub filled to minimum level and
3. weight of clothes

If the lid of the washing machine is open or the water is below the minimum level
or the washing machine has been overloaded the appropriate sensor generates a
certain voltage (which represents an output of 1).

If any problem is indicated by any of the sensors, a circuit sends a signal (a logic 0)
to the washing machine to prevent it from turning on.

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

Let:

Variable A represent the output of the sensor for the washing machine lid.
(0 = lid is close, 1 = lid is open)
Variable B represent the output of the sensor for the water level.
(0 = water is above minimum, 1 = water is below minimum)
Variable C represent weight of the clothes.
(0 = weight is below maximum, 1 = weight is over the maximum)

The Boolean expression to represent this circuit would be:

Z = (A + B + C)

If Z = 0, the washing machine will not turn on while if Z = 1, the machine will be
allowed to operate.

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSIONS

Inputs Output
A B C A+B+C (A+B+C)
0 0 0 0 1
Truth table for the washing 0 0 1 1 0
machine function: 0 1 0 1 0
0 1 1 1 0
Z = (A + B + C) 1 0 0 1 0
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0

Boolean Algebra and Logic Circuits


BASIC LOGIC GATES

• Logic gates are used to implement the logical operations.

• They are electronic circuits that operate on one or more


input signals to produce an output signal depending on the
logical operation the gate was designed for.

• AND gate performs the AND operation, OR gate performs


the OR operation, and the NOT gate (or inverter) performs
the NOT operation.

• Logic gates are usually implemented using transistors.

Boolean Algebra and Logic Circuits


BASIC LOGIC GATES

Electronic Circuit
for AND Gate

Boolean Algebra and Logic Circuits


BASIC LOGIC GATES

• Symbolic representation of the AND, OR, and NOT gates:

X X
Z = XY Z=X+Y
Y Y
AND Gate OR Gate

X Z=X

NOT Gate

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

• A logic circuit or computer switching circuit is


used to process digital information such as
computer instructions and data.

• A Boolean function can be transformed from an


algebraic expression into a logic circuit composed
of logic gates connected in a particular structure.

• In other words, logic circuits are constructed by


connecting several logic gates wherein the outputs
of certain gates are applied to the inputs of other
gates.
Boolean Algebra and Logic Circuits
LOGIC CIRCUITS

• Example:

Diagram of the logic


circuit that can add
two 1-bit binary
numbers (Full-Adder)

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

• Example: Diagram of the logic circuit for the washing machine example.

Z = (A + B + C)

Sensor for
Washing Machine
Lid

A To Washing
Sensor for
Water Level
B Z Machine Control
C Circuitry

Sensor for
Weight of Clothes

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

• Logic gates are implemented using transistor-


transistor logic (TTL) integrated chips (IC).

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

• There are two types of logic circuits:

1. Combinational Logic Circuit


– outputs at any time are determined by the present
combination of inputs without regard to previous
values of the input
– basically composed of logic gates

Input Logic Gates Output

Boolean Algebra and Logic Circuits


LOGIC CIRCUITS

2. Sequential Logic Circuit


– outputs are a function of both the present
combination of inputs and its past values
– employs memory elements to remember
past values

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

• Example: Logic circuit diagram for the expression

Z = A + BC

A
Z

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS
• Obtaining the Truth Table from the logic circuit:

1. Assign variables to the input and output.


2. Assign temporary variables to the output of each logic gate
whose inputs have all been labelled. Use subscripted T,
starting from T1.
3. Repeat previous step until all logic gates have been assigned
output variables.
4. Derive the Boolean expression for each of the temporary
variables according to gate operation.
5. Set up truth table with temporary variables, in increasing
subscript sequence, between the input and output columns.
6. Fill-up temporary variable columns in increasing subscript
sequence. This is made possible due to the sequence followed
in assigning the temporary variables.
7. Get values for each output variable.

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

• Example:

A
Z

B T1

Expressions:
T2
C
T1 = B
T2 = CT1
Z = A + T2

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

Inputs Temp. Variables Output


A B C T1 T2 Z
0 0 0 1 0 0
0 0 1 1 1 1 Expressions:
0 1 0 0 0 0
0 1 1 0 0 0 T1 = B
1 0 0 1 0 1 T2 = CT1
1 0 1 1 1 1
Z = A + T2
1 1 0 0 0 1
1 1 1 0 0 1

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

• Example:
T1 T4
A T5
Z
B T2
Expressions:

T3
T1 = A
C
T2 = B
T3 = CT2
T4 = T 1 + T 3
T5 = T 4
Z = T3 + T5

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

Inputs Temp. Variables Output


A B C T1 T2 T3 T4 T5 Z
Expressions:
0 0 0 1 1 0 1 0 0
0 0 1 1 1 1 1 0 1
T1 = A
0 1 0 1 0 0 1 0 0
T2 = B
0 1 1 1 0 0 1 0 0 T3 = CT2
1 0 0 0 1 0 0 1 1 T4 = T1 + T3
1 0 1 0 1 1 1 0 1 T5 = T4
1 1 0 0 0 0 0 1 1 Z = T3 + T5
1 1 1 0 0 0 0 1 1

Boolean Algebra and Logic Circuits


COMBINATIONAL LOGIC CIRCUITS

• Exercises: Derive the truth table from the following logic


circuits.

A
B

Z
C

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

• NAND Gate

NAND
inputs output
X
Z X Y Z
Y
0 0 1
0 1 1
Z = XY 1 0 1
1 1 0

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

• NOR Gate

NOR
inputs output
X
Z X Y Z
Y
0 0 1
0 1 0
Z=X+Y 1 0 0
1 1 0

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

• XOR Gate

XOR
inputs output
X
Z X Y Z
Y
0 0 0
0 1 1
Z=XY 1 0 1
1 1 10

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

• Example:

T1
A T2

Expressions:
Z
B T4 T1 = A
T2 = B + T1
T3 = BC
C T3 T 4 = T 2 T3
Z = T1 + T4

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

Inputs Temp. Variables Output


A B C T1 T2 T3 T4 Z
0 0 0 1 1 0 1 0 Expressions:
0 0 1 1 1 0 1 0
0 1 0 1 1 0 1 0
T1 = A
0 1 1 1 1 1 0 0
T2 = B + T 1
T3 = BC
1 0 0 0 0 0 1 0
T4 = T 2 T3
1 0 1 0 0 0 1 0
Z = T 1 + T4
1 1 0 0 1 0 1 0
1 1 1 0 1 1 0 1

Boolean Algebra and Logic Circuits


OTHER LOGIC GATES

• Exercises: Derive the truth table from the following logic


circuits.

A
B

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSION TO LOGIC CIRCUIT

• Derive the logic circuit diagram for Z = A + B + B (A + C)

A B C

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSION TO LOGIC CIRCUIT

• Derive the logic circuit diagram for Z = (A + B)(C + D)

A B C D

Boolean Algebra and Logic Circuits


BOOLEAN EXPRESSION TO LOGIC CIRCUIT

• Exercises: Derive the logic circuit for the following


Boolean expressions.

1. Z = A(CD + B) + BC

2. Z = A(B  D) + C

3. Z = ABC + ABC + AB

4. Z = AB + AB + BC

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• All digital or logical circuits are implemented using


Boolean expressions or functions as the basis.

• If the expressions are in their simplest form, their


corresponding logical circuits will use less
electronic components resulting in simpler circuits
(cheaper, less power consumption, smaller size,
faster, etc.)

• Boolean identities can be used to simplify Boolean


expressions.

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Boolean Identities
Identity Name AND Form OR Form
Identity Law 1X = X 0+X=X
Null Law 0X = 0 1+X=1
Idempotent Law XX = X X+X=X
Inverse Law XX = 0 X+X=1
Commutative Law XY = YX X+Y=Y+X
Associative Law (XY)Z = X(YZ) (X+Y)+Z = X+(Y+Z)
Distributive Law X+YZ = (X+Y)(X+Z) X(Y+Z) = XY+XZ
Absorption Law X(X + Y) = X X + XY = X
De Morgan’s Law XY = X + Y X+Y=XY
Double Complement Law X=X

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Duality Principle

The dual of an expression is obtained by exchanging the AND and


OR operators, and 1s and 0s in it, provided that the precedence of
operations is not changed.

Example:

The dual of A + B is AB.


The dual of (A + B)C is AB+C.
The dual of A(1 + B) is A + 0B.
The dual of ABC + ABC is (A+B+C)(A+B+C)

If a Boolean expression is valid, its dual is also valid.

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

Take note that the AND Form of each Boolean identity is


the dual of its OR Form.

Example:

For the Identity Law:

1X = X is the dual of 0 + X = X

For the Absorption Law:

X(X + Y) = X is the dual of X + XY = X

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Example: Simplify the following expression:

Z = ABC + ABC + AC

Solution:

Z = AB(C
(C + C) + AC (distributive)

= AB·1
·1 ++ AC
AC (inverse)
(inverse)

= AB + AC (identity)
(identity)

Boolean Algebra and Logical Circuits


BOOLEAN IDENTITIES

• Example: Simplify the following expression:

Z = (A + B)(A + B)

Solution:

Z = AA + AB + BA + BB (distributive)
= A + AB + AB + BB BB (idempotent
(idempotentand andcommutative)
commutative)
= A(1
(1 + B) + AB + BB (distributive)
= A·1
·1 + AB + 0 (null and(nullinverse)
and inverse)
= A + AB (identity) (identity)
= A (1 ++ B)
A(1 B) (distributive)
(distributive)
= A·1
·1 (null) (null)
= A (identity) (identity)

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Example: Simplify the following expression:

Z = (A + B)(A(B + A))

Solution:

Z= (A + B)(AB
(AB + AA) (distributive)
= (A + B)(AB
(AB + 0) (inverse)
= (A + B)(AB) (identity)
(identity)
= AAB + ABB (distributive)
= AB + AB (idempotent)
= AB (idempotent)

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Simplification may not always be straightforward. For example, simplify the


following expression:

Z = AB + AC + BC

Solution:

Z = AB + AC + BC·1·1 (identity)
(identity)
= AB + AC + BC (A + A) (inverse)
(inverse)
= AB + AC + BCA + BCA (distributive)
(distributive)
= AB + AC + ABC + ABC (commutative)
(commutative)
= AB + ABC + AC + ABC (commutative)
(commutative)
= AB (1 + C) + AC (1
(1 ++ B)
B) (distributive)
(distributive)
= AB·1
·1 + AC·1
AC·1 (null)
(null)
= AB + AC (identity)
(identity)

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Exercises: Simplify the following Boolean


expressions:

1. Z = (A + C)(AD + AD) + AC + C

2. Z = ABC + AB + ABC

3. Z = ABC + AC

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

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Adjacent Terms

– Factoring is generally useful in the simplification process if


applied to adjacent terms.

– Adjacent terms are product terms which differ in only one


variable (i.e., one is complemented while the other is not).

– Adjacency Examples:

ABC and ABC adjacent


ABCD and ABCD adjacent
ABC and ABC not adjacent
ABCD and ABCD not adjacent

Boolean Algebra and Logic Circuits


BOOLEAN IDENTITIES

• Example: Simplify the following Boolean expression

Z = ABCD + ABCD + ABCD + ABCD

Solution:

Z = ABCD + ABCD + ABCD + ABCD


= ABCD + ABCD + ABCD + ABCD
= ACD(B + B) + ABD(C + C)
= ACD + ABD

Boolean Algebra and Logic Circuits


COMPLEMENT OF AN EXPRESSION

• Find the complement of the following Boolean expression:

Z = ABC + ABC

Solution:

Z = ABC + ABC

= (ABC)(ABC)
(ABC)(ABC)

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

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

Boolean Algebra and Logic Circuits


COMPLEMENT OF AN EXPRESSION

• Find the complement of the following Boolean expression:

Z = A(BC + BC)

Solution:

Z = A(BC + BC)

= A + (BC + BC)

= A + (BC)(BC)

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

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

Boolean Algebra and Logic Circuits


COMPLEMENT OF AN EXPRESSION

• Exercises: Find the complement of


the following Boolean expressions:

1. Z = AB(D + CD) + B(A + ACD)

2. Z = (A + C) (A + C)(A + B + CD)

Boolean Algebra and Logic Circuits


CANONICAL AND STANDARD FORMS

• Consider the following Boolean expression and its logic circuit:

Z = (AB + AB)C + ABC


A B C

Boolean Algebra and Logic Circuits


CANONICAL AND STANDARD FORMS

• Now, consider the following expression and its logic circuit:

Z = ABC + ABC + ABC


A B C

Boolean Algebra and Logic Circuits


CANONICAL AND STANDARD FORMS

• Comparing the two circuits:


A B C
A B C

Z
Z

Z = (AB + AB)C + ABC Z = ABC + ABC + ABC

The second expression resulted in a simpler circuit. However, a careful analysis of the two
expressions will show that both expressions are logically equivalent (they have the same truth
tables).

And yet the second expression is seen to be a more desirable way of writing the expression in
terms of implementing logic circuits.

This led to the development of canonical and standard forms of writing expressions that
dictate how a Boolean function is expressed algebraically.

Boolean Algebra and Logic Circuits


CANONICAL AND STANDARD FORMS

• The canonical and standard forms contain product terms and sum
terms.

• Example of a product term:


This is a logical product consisting of
ABC an AND operation among three
variables.

• Example of a sum term:


This is a logical sum consisting of an
A+B+C OR operation among three variables.

• In Boolean algebra, the words "product" and "sum" do not imply


arithmetic operations; instead, they specify the logical operations
AND and OR, respectively.

Boolean Algebra and Logic Circuits


MINTERMS

• A minterm is a product term with all variables of the


function present, in complemented or uncomplemented
form.

• If there are only two variables (A and B), the following are
the possible minterms:

AB, AB, AB, and AB

• If there are only three variables (A, B, and C), the following
are the possible minterms:

ABC, ABC, ABC, ABC, ABC, ABC, ABC and ABC

Boolean Algebra and Logic Circuits


MINTERMS

• Take note that a minterm becomes equal to 1 for


certain values of its variables.

For example:

minterm AB = 1 if A = 1 and B = 1.
minterm AB = 1 if A = 1 and B = 0.

minterm ABC = 1 if A = 0, B = 1, and C = 1.


minterm ABC = 1 if A = 0, B = 0, and C = 0.

Boolean Algebra and Logic Circuits


MINTERMS

• Each row of a truth table can be


associated with a minterm. Two-variable truth table with
the corresponding minterms
• The minterm of a particular row has
the property that it is equal to 1 on
the values of the input variables for A B minterm symbol
that row.
0 0 AB m0
• Each minterm is assigned a symbol,
mi, where the subscript i on the 0 1 AB m1
minterm is the number of the row
on which it equals 1 (the row
numbers are obtained by reading
1 0 AB m2
the values of the variables on that m3
row as a binary number). 1 1 AB

Boolean Algebra and Logic Circuits


MINTERMS

Three-variable truth table with


• Each row of a truth table can be the corresponding minterms
associated with a minterm.

• The minterm of a particular row has


A B C minterm symbol
the property that it is equal to 1 on 0 0 0 ABC m0
the values of the input variables for
that row. 0 0 1 ABC m1
0 1 0 ABC m2
• Each minterm is assigned a symbol,
mi, where the subscript i on the 0 1 1 ABC m3
minterm is the number of the row 1 0 0 ABC
on which it equals 1 (the row m4
numbers are obtained by reading 1 0 1 ABC m5
the values of the variables on that
row as a binary number). 1 1 0 ABC m6
1 1 1 ABC m7

Boolean Algebra and Logic Circuits


MINTERMS

• An algebraic expression for the function can be derived from the table by finding
a logical sum of minterms for which the function assumes the binary value 1.

Example:
Inputs Output
A B C Z The expression can now be written in the
sum of minterms (SOM) form:
0 0 0 0
0 0 1 1 m1 ABC Z = m1 + m4 + m5 + m6 + m7
0 1 0 0
Z = ABC + ABC + ABC + ABC + ABC
0 1 1 0
In compact form:
1 0 0 1 m4 ABC
1 0 1 1 m5 ABC Z = m(1, 4, 5, 6, 7)
1 1 0 1 m6 ABC
1 1 1 1 m7 ABC

Boolean Algebra and Logic Circuits


MINTERMS

A B C

The logic circuit for the expression:

Z = ABC + ABC + ABC + ABC + ABC


Z

Boolean Algebra and Logic Circuits


MINTERMS

A B C • Take note that the logic diagram for an


SOM form consists of a group of AND
gates followed by a single OR gate.

– Each product term requires an


AND gate.

– The logical sum is formed with an


OR gate that has the outputs of
Z the AND gates as inputs.

• The AND gates followed by the OR


gate form a circuit configuration
referred to as a two-level
implementation or two-level circuit.

Boolean Algebra
Boolean Algebra and Logic Circuits
STANDARD SUM OF PRODUCTS (SOP) FORM

• Once the SOM is obtained from the truth table,


the next step is to try to simplify the expression to
see whether it is possible to reduce the number of
product terms and the number of literals or
variables in the terms.

• The result is a simplified expression in the standard


sum-of-products (SOP) form.

• Standard forms are similar to canonical forms,


except that not all variables need appear in the
individual product (SOP) terms.
Boolean Algebra and Logic Circuits
STANDARD SUM OF PRODUCTS (SOP) FORM

• As in the SOM, the SOP requires that the expression be a


collection of ANDed variables (or product form) that are Ored
together.

• Examples of expressions in SOP form:

ABC + AB + ABCD

ABC + A

• Example of an expression not in SOP form:

(A + B)(A + B + C) + AB

Boolean Algebra and Logic Circuits


STANDARD SUM OF PRODUCTS (SOP) FORM

• So in the previous example, the SOM expression obtained


from the truth table must now be simplified to get the SOP
form:

Z = ABC + ABC + ABC + ABC + ABC


= ABC + ABC + ABC + ABC + ABC + ABC
= ABC + ABC + ABC + ABC + ABC + ABC
= ABC + ABC + ABC + ABC + ABC + ABC
= BC(A + A) + AC(B + B) + AC(B + B)
= BC + AC + AC
= BC + A(C + C)
= BC + A

Boolean Algebra and Logic Circuits


STANDARD SUM OF PRODUCTS (SOP) FORM

• The logic circuit for the expression:

Z = BC + A

A B C

Boolean Algebra and Logic Circuits


STANDARD SUM OF PRODUCTS (SOP) FORM

• Derive the simplified logic expression and draw the logic circuit
for the following truth tables using the SOP Method.
INPUTS OUTPUT
A B C D Z
0 0 0 0 0
0 0 0 1 0
INPUTS OUTPUT 0 0 1 0 1
A B C Z 0 0 1 1 1
0 0 0 0 0 1 0 0 1
0 0 1 1 0 1 0 1 0
0 1 0 0 0 1 1 0 1
0 1 1 1 0 1 1 1 1
1 0 0 1 1 0 0 0 1
1 0 1 0 1 0 0 1 1
1 1 0 1 1 0 1 0 1
1 1 1 1 1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

Boolean Algebra and Logic Circuits


MAXTERMS

• A maxterm is a sum term with all


variables of the function present, in
complemented or uncomplemented
form.

• If there are only two variables (A and B),


the following are the possible maxterms:

A + B, A + B, A + B, and A + B
Boolean Algebra and Logic Circuits
MAXTERMS

• Take note that a maxterm becomes equal to 0 for


certain values of its variables.

For example:

maxterm A+B = 0 if A = 0 and B = 0.


0
maxterm A+B = 0 if A = 0 and B = 1.
1

maxterm A+B+C = 0 if A = 1, B = 0, and C = 0.


0
maxterm A+B+C = 0 if A = 1, B = 1, and C = 1.
1

Boolean Algebra and Logic Circuits


MAXTERMS

• Each row of a truth table can be


associated with a maxterm. Two-variable truth table with
the corresponding maxterms
• The maxterm of a particular row
has the property that it is equal to 0
on the values of the input variables A B maxterm symbol
for that row.
0 0 A+B M0
• Each maxterm is assigned a symbol,
Mi, where the subscript i on the 0 1 A+B M1
maxterm is the number of the row
on which it equals 0 (the row
numbers are obtained by reading
1 0 A+B M2
the values of the variables on that
row as a binary number). 1 1 A+B M3

Boolean Algebra and Logic Circuits


MAXTERMS

Three-variable truth table with


• Each row of a truth table can be the corresponding maxterms
associated with a maxterm.

• The maxterm of a particular row


A B C maxterm symbol
has the property that it is equal to 0 0 0 0 A+B+C M0
on the values of the input variables
for that row. 0 0 1 A+B+C M1
0 1 0 A+B+C M2
• Each maxterm is assigned a symbol,
Mi, where the subscript i on the 0 1 1 A+B+C M3
maxterm is the number of the row 1 0 0 A+B+C
on which it equals 0 (the row M4
numbers are obtained by reading 1 0 1 A+B+C M5
the values of the variables on that
row as a binary number). 1 1 0 A+B+C M6
1 1 1 A+B+C M7

Boolean Algebra and Logic Circuits


MAXTERMS

• An algebraic expression for the function can be derived from the table by finding a logical
product of maxterms for which the function assumes the binary value 0.

Example:

Inputs Output
A B C Z
0 0 0 0 M0 A+B+C The expression can now be written in the
product of maxterms (POM)
0 0 1 1
Z = M0 M2 M3
0 1 0 0 M2 A+B+C
0 1 1 0 M3 A+B+C Z = (A+B+C)(A+B+C)(A+B+C)
1 0 0 1 Compact form:
1 0 1 1
Z = M(0, 2, 3)
1 1 0 1
1 1 1 1

Boolean Algebra and Logic Circuits


MAXTERMS

A B C

The logic circuit for the expression:

Z = (A+B+C)(A+B+C)(A+B+C)
Z

Boolean Algebra and Logic Circuits


STANDARD PRODUCT OF SUMS (POS) FORM

• Once the POM is obtained from the truth


table, the next step is to try to simplify
the expression to see whether it is
possible to reduce the number of
product terms and the number of literals
or variables in the terms.

• The result is a simplified expression in


the standard product-of-sums (POS)
form.
Boolean Algebra and Logic Circuits
STANDARD PRODUCT OF SUMS (POS) FORM

• Derive the logic expression and draw the logic circuit for the
following truth tables using the product-of-sums method.
INPUTS OUTPUT
A B C D Z
0 0 0 0 0
0 0 0 1 0
INPUTS OUTPUT 0 0 1 0 1
A B C Z 0 0 1 1 1
0 0 0 0 0 1 0 0 1
0 0 1 1 0 1 0 1 0
0 1 0 0 0 1 1 0 1
0 1 1 1 0 1 1 1 1
1 0 0 1 1 0 0 0 1
1 0 1 0 1 0 0 1 1
1 1 0 1 1 0 1 0 1
1 1 1 1 1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0

Boolean Algebra and Logic Circuits


STANDARD PRODUCT OF SUMS (POS) FORM

• Summary:

1. Canonical Forms
– Sum of Minterms (SOM) – each product term will
have all variables present.
– Product of Maxterms (POM) – each sum term will
have all variables present

2. Standard Forms
– Standard Sum of Products (SOP) – some variables
are not present in some or all of the product terms.
– Standard Product of Sums (POS) – some variables
are not present in some or all of the sum terms.

Boolean Algebra and Logic Circuits


STANDARD TO CANONICAL FORM (SOP)

• Expand non-canonical terms by ANDing


it with (v + v) for every missing variable v.

Example: Assuming there are three


variables A, B, and C

Z = ABC + ABC + AB
= ABC + ABC + AB (C + C)
= ABC + ABC + ABC + ABC
Boolean Algebra and Logic Circuits
STANDARD TO CANONICAL FORM (POS)

• Expand noncanonical terms by adding 0 in


terms of missing variables (e.g., vv) and
using the distributive law

Example: Assuming there are three variables


A, B, and C

Z = (A+B+C)(A+B)
= (A+B+C)(A+B+CC)
= (A+B+C)(A+B+C)(A+B+C)
Boolean Algebra and Logic Circuits

You might also like