Boolean Expressions 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

www.Vidyarthiplus.

com

Boolean Variables & Truth Tables


Boolean algebra differs in a major way from ordinary algebra in that boolean
constants and variables are allowed to have only two possible values, 0 or 1.
See Section 1.4 to see how to define 0 and 1 values.

Boolean 0 and 1 do not represent actual numbers but instead represent the state
of a voltage variable, or what is called its logic level.

Some common representation of 0 and 1 is shown in the following diagram.

Logic 0 Logic 1
False True
Off On
Low High
No Yes
Open Switch Close Switch

In boolean algebra, there are three basic logic operations:


OR, AND and NOT.
These logic gates are digital circuits constructed from diodes, transistors, and
resistors connected in such a way that the circuit output is the result of a basic
logic operation (OR, AND, NOT) performed on the inputs.

Truth Table
A truth table is a means for describing how a logic circuit's output depends on
the logic levels present at the circuit's inputs.

In the following two-inputs logic circuit, the table lists all possible
combinations of logic levels present at inputs A and B along with the
corresponding output level X.

www.Vidyarthiplus.com
www.Vidyarthiplus.com

When either input A OR B is 1, the output X is 1. Therefore the "?" in the box
is an OR gate.

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Expression Description Equivalent Circuit Law or Rule

A in parallel with closed =


A+1=1 Annulment
CLOSED

A+0=A A in parallel with open = A Identity

A.1=A A in series with closed = A Identity

A in series with open =


A.0=0 Annulment
OPEN

A+A=A A in parallel with A = A Indempotent

A.A=A A in series with A = A Indempotent

NOT NOT A (double


NOT A = A Double Negation
negative) = A

A in parallel with not A =


A+A=1 Complement
CLOSED

A in series with not A =


A.A=0 Complement
OPEN

A+B = A in parallel with B = B in


Commutative
B+A parallel with A

A in series with B = B in
A.B = B.A Commutative
series with A

invert and replace OR with de Morgan's


A+B = A.B
AND Theorem
invert and replace AND with de Morgan's
A.B = A+B
OR Theorem

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Description of the Laws and Theorems


• Annulment Law - A term AND´ed with a "0" equals Zero and a term OR´ed with
a "1" will equal One.

• Identity Law - A term OR´ed with a "0" or AND´ed with a "1" will always equal
that term for example, A+0 = 0, A.1 = 1

• Indempotent Law - An input AND´ed with itself or OR´ed with itself is equal to
that input for example, A.A = A, A+A = A

• Complement Law - A term AND´ed with its complement equals "0" and a term
OR´ed with its complement equals "1" for example A. A = 0, A+A = 1

• Commutative Law - The order of application of two separate terms is not
important for example, A.B = B.A, A+B = B+A

• Double Negation Law - A term that is inverted twice is equal to the original term.

• de Morgan´s Theorem - There are two "de Morgan´s" rules or theorems,

• (1) Two separate terms NOR´ed together is the same as the two terms inverted
(Complement) and AND´ed for example, A+B = A. B.

• (2) Two separate terms NAND´ed together is the same as the two terms inverted
(Complement) and OR´ed for example, A.B = A +B.

Boolean Algebra Functions


Using the information above, simple 2-input AND, OR and NOT Gates can be
represented by 16 possible functions as shown in the following table.

Function Description Expression


1. NULL 0
2. IDENTITY 1
3. Input A A
4. Input B B
5. NOT A A
6. NOT B B
7. A AND B (AND) A.B
8. A AND NOT B A.B

www.Vidyarthiplus.com
www.Vidyarthiplus.com

9. NOT A AND B A.B


10. NOT A AND NOT B (NAND) A.B
11. A OR B (OR) A+B
12. A OR NOT B A+B
13. NOT A OR B A+B
14. NOT OR (NOR) A+B
15. Exclusive-OR A.B + A.B
16. Exclusive-NOR A.B + A.B

DeMorgan's theorems are extremely useful in simplifying expressions in which


a product or sum of variables is inverted. The two theorems are:

(x+y)' = x' * y'


(x*y)' = x' + y'
Theorem (16) says that when the OR sum of two variables is inverted, this is
the same as inverting each variable individually and then ANDing these
inverted variables.

Theorem (17) says that when the AND product of two variables is inverted, this
is the same as inverting each variable individually and then ORing them.

Example

X = [(A'+C) * (B+D')]'
= (A'+C)' + (B+D')' [by theorem (17)]
= (A''*C') + (B'+D'') [by theorem (16)]
= AC' + B'D

Three Variables DeMorgan's Theorem


(x+y+z)' = x' * y' * z'
(xyz)' = x' + y' + z'

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Implications of DeMorgan's Theorem


For : (x+y)' = x' * y'

For : (x*y)' = x' + y'

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Alternate Logic Gate Representations


The left side of the illustration shows the standard symbol for each logic gate,
and the right side shows the alternate symbol. The alternate symbol for each
gate is obtained from the standard symbol by doing the following:

1. Invert each input and output of the standard symbol. This is done by adding
bubbles (small circles) on input and output lines that do not have bubbles, and
by removing bubbles that are already there.

2. Change the operation symbol from AND to OR, or from OR to AND. (In the
special case of the INVERTER, the operation symbol is not changed.)

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Several points should be stressed regarding the logic symbol equivalences:

1. The equivalences are valid for gates with any number of inputs.

2. None of the standard symbols have bubbles on their inputs, and all the
alternate symbols do.

3. The standard and alternate symbols for each gate represent the same physical
circuit: there is no difference in the circuits represented by the two symbols.

4. NAND and NOR gates are inverting gates, and so both the standard and
alternate symbols for each will have a bubble on either the input or the output.
AND and OR gates are noninverting gates, and so the alternate symbols for
each will have bubbles on both inputs and output.

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Boolean Expression Simplification

Here are some examples of Boolean algebra simplifications. Each line gives a form of the
expression, and the rule or rules used to derive it from the previous one. Generally, there
are several ways to reach the result. Here is the list of simplification rules.

• Simplify: C + BC:
Expression Rule(s) Used
C + BC Original Expression

C + (B + C) DeMorgan's Law.
(C + C) + B Commutative, Associative Laws.
T+B Complement Law.
T Identity Law.
• Simplify: AB(A + B)(B + B):
Expression Rule(s) Used
AB(A + B)(B
Original Expression
+ B)

AB(A + B) Complement law, Identity law.


(A + B)(A +
DeMorgan's Law
B)
Distributive law. This step uses the fact that or distributes over and.
A + BB It can look a bit strange since addition does not distribute over
multiplication.
A Complement, Identity.
• Simplify: (A + C)(AD + AD) + AC + C:
Expression Rule(s) Used
(A + C)(AD + AD) + AC + C Original Expression

(A + C)A(D + D) + AC + C Distributive.
(A + C)A + AC + C Complement, Identity.
A((A + C) + C) + C Commutative, Distributive.
A(A + C) + C Associative, Idempotent.
AA + AC + C Distributive.
A + (A + T)C Idempotent, Identity, Distributive.
A+C Identity, twice.
• You can also use distribution of or over and starting from A(A+C)+C to reach the
same result by another route.
• Simplify: A(A + B) + (B + AA)(A + B):

Expression Rule(s) Used


A(A + B) + (B + AA)
Original Expression
(A + B)

www.Vidyarthiplus.com
www.Vidyarthiplus.com

AA + AB + (B + A)A
Idempotent (AA to A), then Distributive, used twice.
+ (B + A)B
AB + (B + A)A + (B Complement, then Identity. (Strictly speaking, we also used
+ A)B the Commutative Law for each of these applications.)
AB + BA + AA + BB
Distributive, two places.
+ AB
Idempotent (for the A's), then Complement and Identity to
AB + BA + A + AB
remove BB.
AB + AB + AT + AB Commutative, Identity; setting up for the next step.
AB + A(B + T + B) Distributive.
AB + A Identity, twice (depending how you count it).
A + AB Commutative.
(A + A)(A + B) Distributive.
A+B Complement, Identity.

Karnaugh Maps - Rules of Simplification

What Does a Karnaugh Map Look Like?

A Karnaugh Map is a grid-like representation of a truth table. It is


really just another way of presenting a truth table, but the mode of
presentation gives more insight. A Karnaugh map has zero and one entries at
different positions. Each position in a grid corresponds to a truth table
entry. Here's an example taken from the voting circuit presented in the
lesson on Minterms. The truth table is shown first. The Karnaugh Map for
this truth table is shown after the truth table.

The Karnaugh map uses the following rules for the simplification of expressions by
grouping together adjacent cells containing ones

www.Vidyarthiplus.com
www.Vidyarthiplus.com

• Groups may not include any cell containing a zero

• Groups may be horizontal or vertical, but not diagonal.

• Groups must contain 1, 2, 4, 8, or in general 2n cells.


That is if n = 1, a group will contain two 1's since 21 = 2.
If n = 2, a group will contain four 1's since 22 = 4.

www.Vidyarthiplus.com
www.Vidyarthiplus.com

• Each group should be as large as possible.

• Each cell containing a one must be in at least one group.

• Groups may overlap.

• Groups may wrap around the table. The leftmost cell in a row may be
grouped with the rightmost cell and the top cell in a column may be grouped

www.Vidyarthiplus.com
www.Vidyarthiplus.com

with the bottom cell.

• There should be as few groups as possible, as long as this does not contradict
any of the previous rules.

Larger groups in Karnaugh Maps of any size can lead to greater


simplification. Let's consider the group shown shaded below. There are
four terms covered by the shaded area.

www.Vidyarthiplus.com
www.Vidyarthiplus.com

 In the upper left:-

o
• In the upper right;

o
• In the lower left;

o
• In the lower right;

These terms can be combined (assuming they are all ones in the
Karnaugh Map!). The result is
 By combining the first two terms above (the two terms at the top of the
Karnaugh Map):-

o
• By combining the last two terms above (the two terms at the bottom
of the Karnaugh Map):-

o
• Then, these two germs can be combined to give:

www.Vidyarthiplus.com
www.Vidyarthiplus.com

Summmary:

1. No zeros allowed.
2. No diagonals.
3. Only power of 2 number of cells in each group.
4. Groups should be as large as possible.
5. Every one must be in at least one group.
6. Overlapping allowed.
7. Wrap around allowed.
8. Fewest number of groups possible.

www.Vidyarthiplus.com

You might also like