Boolen Algebra, K - Map Final

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 61

Logic Gates

A logic Gate is a device that act as a building


block for a digital circuits

1
Logic Gates

• A gate is an electronic device that produces a result


based on two or more input values.
– In reality, gates consist of one to six transistors, but digital
designers think of them as a single unit.
– Integrated circuits contain collections of gates suited to a
particular purpose.

2
Logic Gates

• The three simplest gates are the AND, OR, and NOT
gates.

• They correspond directly to their respective Boolean


operations, as you can see by their truth tables.
3
Logic Gates

• Another very useful gate is the exclusive OR


(XOR) gate.
• The output of the XOR operation is true only when
the values of the inputs differ.

Note the special symbol 


for the XOR operation.

4
Logic Gates

• NAND and NOR


are two very
important gates.
Their symbols and
truth tables are
shown at the right.

5
Logic Gates

• NAND and NOR


are known as
universal gates
because they are
inexpensive to
manufacture and
any Boolean
function can be
constructed using
only NAND or only
NOR gates.

6
Digital Components

• The main thing to remember is that combinations of


gates implement Boolean functions.
• The circuit below implements the Boolean function:

We simplify our Boolean expressions so


that we can create simpler circuits.
7
Boolean Algebra, Digital Logic

8
Objectives

• Understand the relationship between Boolean logic


and digital computer circuits.
• Learn how to design simple logic circuits.
• Understand how digital circuits work together to
form complex computer systems.

9
Boolean Algebra

• Boolean algebra is a mathematical system for


the manipulation of variables that can have
one of two values.
– In formal logic, these values are “true” and “false.”
– In digital systems, these values are “on” and “off,”
1 and 0, or “high” and “low.”
• Boolean expressions are created by
performing operations on Boolean variables.
– Common Boolean operators include AND, OR,
and NOT.

10
Boolean Algebra

• A Boolean operator can be


completely described using a
truth table.
• The truth table for the Boolean
operators AND and OR are
shown at the right.
• The AND operator is also known
as a Boolean product. The OR
operator is the Boolean sum.

11
Boolean Algebra

• The truth table for the


Boolean NOT operator is
shown at the right.
• The NOT operation is
most often designated by
an overbar.

12
Boolean Algebra

• A Boolean function has:


• At least one Boolean variable,
• At least one Boolean operator, and
• At least one input from the set {0,1}.
• It produces an output that is also a member of
the set {0,1}.

Now you know why the binary numbering


system is so handy in digital systems.

13
Boolean Algebra

• The truth table for the


Boolean function:

is shown at the right.


• To make evaluation of the
Boolean function easier,
the truth table contains
extra (shaded) columns to
hold evaluations of
subparts of the function.

14
Boolean Algebra

• As with common
arithmetic, Boolean
operations have rules of
precedence.
• The NOT operator has
highest priority, followed
by AND and then OR.
• This is how we chose the
(shaded) function
subparts in our table.

15
Boolean Algebra

• Digital computers contain circuits that implement


Boolean functions.
• We can simplify the circuits using Boolean
function simplification.
– Simpler circuits are cheaper to build, consume less
power, and run faster than complex circuits.
• With this in mind, we always want to reduce our
Boolean functions to their simplest form.
• There are a number of Boolean identities that help
us to do this.

16
Boolean Algebra

• Most Boolean identities have an AND (product)


form as well as an OR (sum) form. Table shows
the first identity:

Identity Name AND Form OR Form

Identity Law 1X=X 0+X=X

Idempotent Law XX=X X+X =X

Inverse Law
X X’ = 0 X + X’ = 1

17
Boolean Algebra

• The second group of Boolean identities are:

Identity Name AND Form OR Form

Commutative Law XY=YX X+Y=Y+X

Associative Law (X Y) Z = X (Y Z) (X + Y) + Z = X + ( Y + Z)

Distributive Law X + Y Z = ( X + Y) (X + Z) X (Y + Z) = X Y + X Z

18
Boolean Algebra

• Our last group of Boolean identities are perhaps the


most useful.
• If you have studied set theory or formal logic, these
laws are also familiar to you.

19
Boolean Algebra

• We can use Boolean identities to simplify the


function:
as follows:

20
Boolean Algebra

• DeMorgan’s law can be extended to any number of


variables.
• Replace each variable by its complement and
change all ANDs to ORs and all ORs to ANDs.
• Thus, we find the the complement of:

is:

21
Conclusion

• Computers uses implementations of Boolean logic.


• Boolean functions are completely described by truth
tables.
• Logic gates are small circuits that implement Boolean
operators.
• The proper implementation of Boolean function
reduced the cost, complexity and power consumption.
• The operators use in Boolean algebra are AND, OR,
and NOT.

22
Q 3. Simplify the following
1. X+X’Y
2. X(X’+Y)
3. X’Y’Z+X’YZ+XY’
4. XY+X’Z+YZ
Q 4. Find the complement of following
1. F= x’yz’+x’y’z
2. F= x(y’z’+yz)

23
Minterms and Maxtermas,
K- MAP
Lecture-4

24
Standard Forms related to

Boolean Function
We need to consider formal techniques for the
simplification of Boolean functions.
– Minterms and Maxterms
– Sum-of-Minterms and Product-of- Maxterms
– Sum-of-Products (SOP) and Product-of-Sums (POS)

2022.11.24 Boolean Algebra


Definitions
• Literal: A variable or its complement
• Product term: literals connected by •
• Sum term: literals connected by +
• Minterm: a product term in which all the variables
appear exactly once, either complemented or
uncomplemented
• Maxterm: a sum term in which all the variables
appear exactly once, either complemented or
uncomplemented

2022.11.24 Boolean Algebra


Minterm
• Represents exactly one combination in the truth table.
• Example: Assume 3 variables (A,B,C).
• Then one of the minterm corresponding to three
variable is = A’BC
for A =1 and A’ is =0, B is 1, B’=0 and C=1 and
c’=0.

2022.11.24 Boolean Algebra


Maxterm
• Represents exactly one combination in the truth table.
• Example: Assume 3 variables (A,B,C),

• maxterm is denoted by M = A+B’+C’


which is equal to 011

2022.11.24 Boolean Algebra


Truth Table notation for Minterms
and Maxterms
• Minterms and x y z Minterm Maxterm
Maxterms are easy 0 0 0 x’y’z’ = m0 x+y+z = M0
to denote using a 0 0 1 x’y’z = m1 x+y+z’ = M1
truth table. 0 1 0 x’yz’ = m2 x+y’+z = M2
• Example: 0 1 1 x’yz = m3 x+y’+z’= M3
Assume 3 variables1 0 0 xy’z’ = m4 x’+y+z = M4
x,y,z 1 0 1 xy’z = m5 x’+y+z’ = M5
(order is fixed) 1 1 0 xyz’ = m6 x’+y’+z = M6
1 1 1 xyz = m7 x’+y’+z’ = M7

2022.11.24 Boolean Algebra


Canonical Forms (Unique)
• Any Boolean function F( ) can be expressed as
a unique sum of minterms and a unique
product of maxterms (under a fixed variable
ordering).
• In other words, every function F() has two
canonical forms:
– Canonical Sum-Of-Products (sum of minterms)
– Canonical Product-Of-Sums (product of
maxterms)

2022.11.24 Boolean Algebra


Example
• Truth table for f1(a,b,c) at right
a b c f1
• The canonical sum-of-products form for f1 is
f1(a,b,c) = m1 + m2 + m4 + m6 00 0 0
= a’b’c + a’bc’ + ab’c’ + abc’ 0 0 1 1
• The canonical product-of-sums form for f1 is 01 0 1
f1(a,b,c) = M0 • M3 • M5 • M7
= (a+b+c)•(a+b’+c’)• 01 1 0
(a’+b+c’)•(a’+b’+c’). 10 0 1
• Observe that: mj = Mj’ 10 1 0
1 1 0 1
2022.11.24 Boolean Algebra
1 1 1 0
Shorthand: ∑ and ∏
• f1(a,b,c) = ∑ m(1,2,4,6), where ∑ indicates that this is a
sum-of-products form, and m(1,2,4,6) indicates that the
minterms to be included are m1, m2, m4, and m6.
• f1(a,b,c) = ∏ M(0,3,5,7), where ∏ indicates that this is a
product-of-sums form, and M(0,3,5,7) indicates that the
maxterms to be included are M0, M3, M5, and M7.
• Since mj = Mj’ for any j, (for 3 variable total number
of value is j (2 power 3=8) or J=0,1,2,3,4,5,6,7
∑ m(1,2,4,6) = ∏ M(0,3,5,7) = f1(a,b,c)

2022.11.24 Boolean Algebra


Conversion Between Canonical Forms

• Replace ∑ with ∏ (or vice versa) and replace those j’s


that appeared in the original form with those that do not.
• Example:
f1(a,b,c) = a’b’c + a’bc’ + ab’c’ + abc’
= m1 + m2 + m 4 + m6
= ∑(1,2,4,6)
= ∏(0,3,5,7)
= (a+b+c)•(a+b’+c’)•(a’+b+c’)•(a’+b’+c’)

2022.11.24 Boolean Algebra


Problems
Q .1 Convert the following Boolean
expression from POS into SPOS.
F (A, B, C)=A(A+C)

2022.11.24 Boolean Algebra


Problem
Q .2 find out the minterms of following
(i). F (A, B)= AB+A’B
(ii). F(A,B,C)= AB+ABC

2022.11.24 Boolean Algebra


Problem
Q .3. Convert following SSOP into SPOS.
F(A,B,C,D)= ABC’D’+A’B’CD+ACBD’

2022.11.24 Boolean Algebra


Problem
Q 4. Convert SOP into SSOP
F(A,B)= A+(AB)

2022.11.24 Boolean Algebra


38
K – Map Simplification
It is the practical method used to minimize
Boolean expression without having the use of
Boolean Theorems and equations.

2022.11.24 Boolean Algebra


Rules for K-Map simplification
1. Group may not be containing zero.
2. We can group 1, 2, 4, 8.
3. Each groups should be as large as possible.
4. Cell containing 1 must be grouped.
5. Groups may overlap.
6. Opposite grouping and corner grouping is
allowed.
7. There should be as few groups as possible.
2022.11.24 Boolean Algebra
x
x
2
Two-Variable Map x
1 0 1
0 1 x
1 2
0 1 0 2

0 m
0
m
1 OR 0 m
0
m
2
2 3 1 3

1 m m 1 m m
2 3 1 3

NOTE: ordering of variables is IMPORTANT for f(x ,x ), x is the row, x


1 2 1 2
is the column.

2022.11.24 Boolean Algebra


yz
Three-Variable Map
x 00 01 11 10

0 1 3 2

0 m m m m
0 1 3 2
4 5 7 6

1 m m m m
4 5 7 6

-Note: variable ordering is (x,y,z); yz specifies column, x specifies row.

-Each cell is adjacent to three other cells (left or right or top or bottom or edge wrap)

2022.11.24 Boolean Algebra


Three-Variable Map (cont.)
minterm

The types of structures that are either minterms or are


generated by repeated application of the minimization
theorem on a three variable map are shown at right.
Groups of 1, 2, 4, 8 are possible.

group of 2 terms

group of 4 terms

2022.11.24 Boolean Algebra


More Examples
yz
X 00 01 11 10

• f1(x, y, z) = ∑ m(2,3,5,7) 0 1 1
1 1 1
 f1(x, y, z) = x’y + xz

• f2(x, y, z) = ∑ m (0,1,2,3,6)
1 1 1 1
f2(x, y, z) = x’+yz’
1

2022.11.24 Boolean Algebra


Four-Variable Maps
CD

00 01 11 10
AB
m m m m
00 0 1 3 2

m m m m
01 4 5 7 6

m m m m
11 12 13 15 14

m m m m
10 8 9 11 10

• Top cells are adjacent to bottom cells. Left-edge cells


are adjacent to right-edge cells.
• Note variable ordering (ABCD).

2022.11.24 Boolean Algebra


Example
• Simplify the following Boolean function (A,B,C,D)
= ∑m(0,1,2,4,5,7,8,9,10,12,13).
• First put the function g( ) into the map, and then
group as many 1s as possible.
ab cd

1 1 1 1 1 1

1 1 1 1 1 1

1 1 1 1

1 1 1 1 1 1

g(A,B,C,D) = c’+b’d’+a’bd

2022.11.24 Boolean Algebra


Problem
Q 1. Minimize form of logic expression.
A’B’C’+A’BC’+A’BC+ABC’ is
(1). A’C’ +BC’+A’B
(2). AC’+B’C+A’B
(3). A’C+B’C+A’B
(4). AC’+B’C+AB’

2022.11.24 Boolean Algebra PJF - 47


Problem
Q.2 The Boolean expression
F= A’B’C’D+A’BCD’+AB’C’D+ABC’D’
can be minimized to
(a). A’BCD’+B’C’D+ABC’D’
(B).

2022.11.24 Boolean Algebra PJF - 48


Problem
a b c f
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
2022.11.24 Boolean Algebra
1 1 1 0
Thanks

2022.11.24 Boolean Algebra PJF - 50


51
Lecture 3

Combinational Circuits

52
Combinational Circuits

• We have designed a circuit that implements the


Boolean function:

• This circuit is an example of a combinational logic


circuit.
• Combinational logic circuits produce a specified
output (almost) at the instant when input values
are applied.

53
Combinational Circuits

• Combinational logic circuits


give us many useful devices.
• One of the simplest is the
half adder, which finds the
sum of two bits.
.

54
Combinational Circuits

• As we see, the sum can be


found using the XOR
operation and the carry
using the AND operation.

55
Combinational Circuits

• We can change our half


adder into to a full adder
by including gates for
processing the carry bit.
• The truth table for a full
adder is shown at the
right.

56
Combinational Circuits

• Here’s our completed full adder.

57
Combinational Circuits

• Just as we combined half adders to make a full


adder, full adders can connected in series.
• The carry bit “ripples” from one adder to the next;
hence, this configuration is called a ripple-carry
adder.

58
Combinational Circuits

• Decoders are another important type of


combinational circuit.
• Among other things, they are useful in selecting a
memory location according a binary value placed
on the address lines of a memory bus.
• Address decoders with n inputs can select any of 2n
locations.
This is a block
diagram for a
decoder.

59
Combinational Circuits

• This is what a 2-to-4 decoder looks like on the


inside.

If x = 0 and y = 1,
which output line
is enabled?

60
Conclusion

• Computer circuits consist of combinational logic


circuits and sequential logic circuits.
• Combinational circuits produce outputs (almost)
immediately when their inputs change.
• Sequential circuits require clocks to control their
changes of state.
• The basic sequential circuit unit is the flip-flop:
The behaviors of the SR, JK, and D flip-flops
are the most important to know.

61

You might also like