0% found this document useful (0 votes)
6 views59 pages

L4 Boolean

The document provides an overview of logic gates, including their functions and truth tables, as well as Boolean algebra principles essential for analyzing logic circuits. It covers various gates such as AND, OR, NAND, NOR, and exclusive gates, along with Boolean operations, laws, and DeMorgan's theorems. Additionally, it discusses the standard forms of Boolean expressions and their conversion to truth tables for efficient circuit implementation.
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)
6 views59 pages

L4 Boolean

The document provides an overview of logic gates, including their functions and truth tables, as well as Boolean algebra principles essential for analyzing logic circuits. It covers various gates such as AND, OR, NAND, NOR, and exclusive gates, along with Boolean operations, laws, and DeMorgan's theorems. Additionally, it discusses the standard forms of Boolean expressions and their conversion to truth tables for efficient circuit implementation.
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/ 59

RCM 112

L4-Boolean algebra
LOGIC GATES
• logic gate: a logic element that performs a logical operation
on one or more bits to produce an output bit
• logic circuit: a switching circuit made up of logic gates that
produces one or more output bits
• The Inverter
• The AND Gate
• The OR Gate
• The NAND Gate
• The NOR Gate
• The Exclusive-OR and Exclusive-NOR Gates
THE INVERTER
• The inverter (NOT circuit) performs the
operation called inversion complementation.
• The inverter changes one logic level to the
opposite level.
• In terms of bits, it changes a 1 to a 0 and a 0
to a 1.
• Its Logic circuit symbol and truth table are
THE AND GATE

• The AND gate is one of the basic gates that can be


combined to form any logic function.
• An AND gate can have two or more inputs and
performs what is known as logical multiplication.
• For a 2-input AND gate, output X
– is HIGH only when inputs A and B are HIGH;
– is LOW when either A or B is LOW, or when both A and B
are LOW.
• AND Gate Truth Table With two inputs
THE OR GATE

• The OR gate is another of the basic gates from which


all logic functions are constructed.
• An OR gate can have two or more inputs and
performs what is known as logical addition.
• For a 2-input OR gate, output X is HIGH when either
input A or input B is HIGH, or when both A and B are
HIGH;
• X is LOW only when both A and B are LOW.
• OR Gate Truth Table
THE NAND GATE

• The NAND gate is a popular logic element because it


can be used as a universal gate: that is,
– NAND gates can be used in combination to perform the AND
and inverter operations.
• A NAND gate produces a LOW output only when all the
inputs are HIGH.
• When any of the inputs is LOW, the output will be
HIGH.
THE NOR GATE

• The NOR gate, like the NAND gate, is a useful logic


element because it can also be used as a universal gate;
that is,
– NOR gates can be used in combination to perform the OR, and
inverter operations.
• A NOR gate produces a LOW output when any of its
inputs is HIGH.
• Only when all of its inputs are LOW is the output HIGH.
THE EXCLUSIVE-OR GATES
• Exclusive-OR gates are formed by a combination of other
gates already discussed.
• The XOR gate has only two inputs.
• The output of an exclusive-OR gate is HIGH only when the two
inputs are at opposite logic levels.
– For an exclusive-OR gate. output X is HIGH when input A is LOW and
input B is HIGH, or when input A is HIGH and input B is LOW: X is LOW
when A and B are both HIGH or both LOW.
The Exclusive-NOR Gate

• Standard symbols for an exclusive-NOR (XNOR) gate


• an XNOR has only two inputs.
• When the two input logic levels are opposite. the
output of the exclusive-NOR gate is LOW.
– Output X is LOW when input A is LOW and input B is
HIGH, or when A is HIGH and B is LOW; X is HIGH when A
and B are both HIGH or both LOW.

• An exclusive-OR gate can be used as a two-bit adder.


BOOLEAN OPERATIONS AND EXPRESSIONS

• Boolean algebra is the mathematics of digital systems.


• A basic knowledge of Boolean algebra is indispensable/too
important to the study and analysis of logic circuits.
• After completing this section, you should be able to
- Define variable
- Define literal
- Identify a sum term
- Evaluate a sum term
- Identify a product term
- Evaluate a product term
- Explain Boolean addition
- Explain Boolean multiplication
12/04/2025 14
BOOLEAN OPERATIONS AND EXPRESSIONS
• A variable is a symbol (usually an italic uppercase
letter) used to represent a logical quantity.
– Any single variable can have a I or a 0 value.
• The complement is the inverse of a variable and is
indicate­d by a bar over a variable (overbar)
• A literal is a variable or the complement of a
variable.
• Boolean Addition (The OR gate is a Boolean adder.)
– Boolean addition is equivalent to the OR operation and the
basic rules are illustrated with their relation to the OR gate
as follows.

12/04/2025 15
BOOLEAN OPERATIONS AND EXPRESSIONS
• In Boolean algebra, a sum term is a sum of literals.
• In logic circuits, a sum term is produced by an OR
op­eration with no AND operations involved.
– Example A + B, A + , A + B + ,
and A + B + C + .
• A sum term is equal to 1 when one or more of the
literals in the term are 1.
• A sum term is equal to 0 only if each of the literals
is O.
– Example -Determine the values of A and B that make
the sum term + B equal to O.
12/04/2025 16
• Boolean Multiplication (The AND gate is a Boolean multiplier.)
– Boolean multiplication is equivalent to the AND operation and the
basic rules are illustrated with their relation to the AND gate as follows:

• In Boolean algebra, a product term is the product of literals.


• In logic circuits, a product term is produced by an AND operation
wi­th no OR operations involved.
– Examples AB, A, ABC, and AC.
• A product term is equal to 1 only if each of the literals in the term
is 1.
• A product term is equal to 0 when one or more of the literals are
O.

12/04/2025 17
LAWS AND RULES OF BOOLEAN ALGEBRA

• As in other areas of mathematics, there are certain


well-developed rules and laws that must be followed
in order to properly apply Boolean algebra.
• After completing this section, you should be able to
- Apply the commutative laws of addition and multiplication
- Apply the associative laws of addition and multiplication
- Apply the distributive law
- Apply twelve basic rules of Boolean algebra.
• The basic laws of Boolean algebra are
– the commutative laws for addition and multiplication
– the associative laws for addition and multiplication and
– the distributive law-are the same as in ordinary algebra
12/04/2025 18
Commutative Laws
• The commutative law of addition for two
variables is written as: A+B = B+A
A
B
A+B  B
A
B+A

• The commutative law of multiplication for


two variables is written as: AB = BA
A
B
AB  B
A
B+A
Associative Laws

• for three variables: A + (B + C) = (A + B) + C

• This law states that when ORing more than


two variables, the result is the same
regardless of the grouping of the variables.
• The associative law of multiplication is written
as follows for three variables: A(BC) = (AB)C

12/04/2025 20
Distributive Law

• The distributive law for three variables


A(B + C) = AB+ AC
• The distributive law also expresses the process
of factoring out the common
– example, AB + AC = A(B + C).

12/04/2025 21
Rules of Boolean Algebra

12/04/2025 22
DEMORGAN'S THEOREMS

• DeMorgan's theorems provide mathematical


verification of the
– equivalency of the NAND and negative-OR gates and
– the equivalency of the NOR and negative-AND gates.
• After completing this section, you should be
able to
– State DeMorgan's theorems.
– Relate DeMorgan's theorems to the equivalency of
the NAND and negative-OR gates and to the
equivalency of the NOR and negative-AND gates.
– Apply DeMorgan's theorems to the simplification of
Boolean expressions
12/04/2025 23
DEMORGAN'S THEOREM
• DeMorgan's first law
– The complement of a product of variables is equal
to the sum of the complements of the variables

12/04/2025 24
DEMORGAN'S THEOREM
• DeMorgan’s Second laws
– The complement of a sum of variables is equal to
the product of the complements of the variables.

12/04/2025 25
Application of DeMorgan's theorems

12/04/2025 26
BOOLEAN ANALYSIS OF LOGIC CIRCUITS

• A logic circuit can be described by a Boolean


equation.
• To derive the Boolean expression for a given
logic circuit, begin at the left-most inputs and
work toward the final output, writing the
expression for each gate.

12/04/2025 27
CONSTRUCTING A TRUTH TABLE FOR A LOGIC CIRCUIT
• A logic circuit can be described by a truth
table.

12/04/2025 28
SIMPLIFICATION USING BOOLEAN ALGEBRA

• ­Many times in the application of Boolean


algebra, you have to reduce a particular
expression to its simplest form or change its
form to a more convenient one to implement
the expression most efficiently.
• The approach taken in this section is to use
the basic laws, rules, and theorems of Boolean
algebra to manipulate and simplify an
expression

12/04/2025 29
SIMPLIFICATION USING BOOLEAN ALGEBRA
• A simplified Boolean expression uses the
fewest gates as much as possible to
implement a given expression.
– i.e Simplification means fewer gates for the same
function

12/04/2025 30
SIMPLIFICATION USING BOOLEAN ALGEBRA

12/04/2025 31
SIMPLIFICATION USING BOOLEAN ALGEBRA

12/04/2025 32
STANDARD FORMS OF BOOLEAN EXPRESSIONS

• All Boolean expressions, regardless of their


form, can be converted into either of two
standard forms:
– the sum-of-products form or
– the product-of-sums form.
• Standardization makes the evaluation,
simplification, and implementation of Boolean
expressions much more systematic and easier.
Objectives
• After completing this section, you should be able to
- Identify a sum-of-products expression
- Determine the domain of a Boolean expression
- Convert any sum-of-products expression to a standard form
- Evaluate a standard sum-of-products expression in terms of
binary values
- Identify a product-of- sums expression
- Convert any product-of-sums expression to a standard form
- Evaluate a standard product-of-sums expression in terms of
binary values
- Convert from one standard form to the other
THE SUM-OF-PRODUCTS (SOP) FORM

• When two or more product terms are summed by


Boolean addition, the resulting expression is a sum-of-
products (SOP).

• Example

• An SOP expression can contain a single-variable term,

• In an SOP expression, a single overbar cannot extend


over more than one variable; however, more than one
variable in a term can have an overbar.
• Domain of a Boolean Expression
– The domain of a general Boolean expression is the
set of variables contained in the expression in
either complemented or un-complemented form.
• An SOP expression can be implemented with
one OR and two or more ANDs
• e.g
– AB + BCD + AC.
Conversion of a General Expression to SOP Form

• Convert each of the following Boolean


expressions to SOP form:
(a) AB + B(CD + EF) (b) (A + B)(B + C + D)
(c ) (d) +(A+)(B++A)
• Soln
(a) AB + B(CD + EF) = AB + BCD + BEF
• (b) (A + B)(B + C + D) = AB + AC + AD + BB +
BC + BD
The Standard SOP Form

• A standard SOP expression is one in which all the variables in the domain appear
in each product term in the expression.

• Any nonstandard SOP expression (referred to simply as SOP) can be converted to


the standard form using Boolean algebra.

 Converting Product Terms to Standard SOP


• Step 1. Multiply each nonstandard product term by a term made up
of the sum of a missing variable and its complement. i.e A +
This results in two product terms.

• Step 2. Repeat Step I until all resulting product terms contain all
variables in the domain in either complemented or un-
complemented form.

• In converting a product term to standard form, the number of product terms is


doubled for each missing variable,
The Standard SOP Form
• Example -Convert the following Boolean
expression into standard SOP form:
Binary Representation of a Standard Product term
• An SOP expression is equal to 1 only if one or
more of the product terms in the expression is
equal to 1.
• Determine the binary values for which the
following standard SOP expression is equal to
1 ABCD + A
The Product-of-Sums (POS) Form

• When two or more sum terms are multiplied, the


resulting expression is a product-of-sums (POS).
Example

• A POS expression can contain a single-variable


term, as in +D)

• In a POS expression, a single overbar cannot extend


over more than one variable;
– however, more than one variable in a term can have an
overbar.
• Implementation of a POS Expression
– Implementing a POS expression simply requires
ANDing the outputs of two or more OR gates.
• Example (A + B)(B + C + D)(A + C).
The Standard POS Form

• A standard POS expression is one in which all


the variables in the domain appear in each sum
term in the expression.

not standard

standard
• Converting a Sum Term to Standard POS

Step 1. Add to each nonstandard product term a term made up


of the product of the missing variable and its complement. i.e A.=0
This results in two sum terms.
As you know, you can add 0 to anything without
changing its value.

Step 2. Apply rule 12 A + BC = (A + B)(A + C)

Step 3. Repeat Step 1 until all resulting sum terms contain all
variables in the domain in either complemented or un-
complemented form.

12/04/2025 44
• Example

• Convert the expression (A + )(B + C) to standard


POS form.
Binary Representation of a Standard Sum
Term
• A POS expression is equal to 0 only if one or
more of the sum terms in the expression is
equal to O.
BOOLEAN EXPRESSIONS AND TRUTH TABLES

• All standard Boolean expressions can be easily


converted into truth table format using binary
values for each term in the expression.

• The truth table is a common way of presenting, in


a concise format, the logical operation of a circuit.

• Also, standard SOP or POS expressions can be


determined from a truth table.
Converting SOP Expressions to Truth Table Format

• A truth table is simply a list of the possible combinations


of input variable values and the corresponding output
values (1 or 0).
• The first step in constructing a truth table is to list all
possible combinations of binary values of the variables
in the expression.
• Next, convert the SOP expression to standard form if it is
not already.
• Finally, place a 1 in the output column (X) for each
binary value that makes the standard SOP expression a 1
and place a 0 for all the remaining binary values.
Converting SOP Expressions to Truth Table Format

• Example ;Develop a truth table for the standard SOP


expression C + A + ABC.
• There are three variables in the domain, so there are
eight possible combinations of binary values of the
variables
• The binary values that make the product terms in the
expressions equal to 1 are
– C: 001; A: 100; and ABC: 111.
– For each of these binary values, place a 1 in the output
column
– For each of the remaining binary combinations, place a 0
in the output column.
• .
Converting POS Expressions to Truth Table Format

• NB :a POS expression is equal to 0 only if at least one


of the sum terms is equal to O.
• To construct a truth table from a POS expression, list
all the possible combinations of binary values of the
variables just as was done for the SOP expression.
• Next, convert the POS expression to standard form if
it is not already.
• Finally, place a 0 in the output column (X) for each
binary value that makes the expression a 0 and place
a 1 for all the remaining binary values.
Converting POS Expressions to Truth Table Format…

• Determine the truth table for the following


standard POS expression:
• The binary values that make the sum terms in
expression equal to 0 are
– A+B+C: 000; A++C: 010;
– A++: 011; + B+ :101; and ++C:110
• For each of these binary values, place a 0 in the
output column as shown in the table.
• For each of the remaining binary combinations,
place a 1 in the output column.
• .
Determining Standard Expressions from a Truth Table

• To determine the standard SOP expression


represented by a truth table,
 list the binary values of the input variables for
which the output is 1.
Convert each binary value to the
corresponding product term by replacing each
1 with the corresponding variable and each 0
with the corresponding variable complement.
 Example 1010 AC
Determining Standard Expressions from a
Truth Table…
• To determine the standard POS expression
represented by a truth table,
 list the binary values for which the output is O.
 Convert each binary value to the corresponding sum
term by replacing each 1 with the corresponding
variable complement and each 0 with the
corresponding variable.
 Example 1001+B+C+
Determining Standard Expressions from a
Truth Table…
• From the truth table below determine the
standard SOP expression and the equivalent
standard POS expression.
Determining Standard Expressions from a
Truth Table…
• solution
Try
• For each of the truth table derive a standard
SOP and POS expression.

12/04/2025 58
• END
• Have a good day

You might also like