You are on page 1of 16

The idea of a Boolean Function

EEE 301 Digital Electronics

Rachaen Huq
Dept. of EEE, BRACU

Rachaen Huq 1
What exactly is it?
• What is a function?
• A variable which can hold values depending on
the values of other variables that it depends on.
• y= 2x + 3
• for different values of x, we have a
corresponding y.
• All possible values of y can be visualized using a
straight line in a graph paper.

Rachaen Huq 2
So how a Boolean function is
similar/different?

• A variable which can hold values depending on the


values of other variables. (duhh!)
• y= x + 1
• z= x+ y + y’x’
• for different values of x and y (independent variables)
, we have a corresponding z.
• The function is NOT arithmetic but Logic.
• Main difference: the values that x and y can have ?? ?
• And the values that z may possibly have?
Rachaen Huq 3
• The function can be implemented using….????
• Bigger the size of the expression, more cost.
• Target is to express in the shortest form. (logical
algebra shows that a long and a short expression
may carry the same meaning, to be precise, give
the same output.

• All possible values of x, y , z etc. can be visualized


using…..????
Rachaen Huq 4
Truth tables are representations of Boolean
functions.
• Example: I have got a set of 4 LEDs, I want an LED to
turn ON whenever I have a Off LED in the middle.
a b c F
a b c F 0 0 0 1
0 0 1 1
0 1 0 0
Assuming that b LED is in
0 1 1 0
the middle
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0
Rachaen Huq 5
Truth tables are representations of Boolean
functions.
a b c F
a b c F
0 0 0 1
• This is a Boolean Function.
0 0 1 1
•Can be implemented easily
0 1 0 0
using a few logic gates
•BUT, we need the Boolean 0 1 1 0

EXPRESSION (Shortest 1 0 0 1
possible) of F to implement 1 0 1 1
it. 1 1 0 0
•We need something like 1 1 1 0

F(a,b,c,d) = Bla Bla Bla


Rachaen Huq 6
Truth tables are representations of Boolean
functions.
• Spot the 1 ‘s in output. a b c Minterms Sr# F
•Write as the SUM of 0 0 0 a’b’c’ 0 1
Minterms. 0 0 1 a’b’c 1 1
•You have your function.
0 1 0 a’bc’ 2 0
•But unfortunately not the
0 1 1 a’bc 3 0
shortest.
•May use Boolean Algebra 1 0 0 . 4 1

to shorten. 1 0 1 . 5 1
•We will learn a quicker 1 1 0 . 6 0
method later on. 1 1 1 abc 7 0

So, F = ….. …. ….. …. ….

Called a Sum of Product (SOP) form


Rachaen Huq 7
Truth tables are representations of Boolean
functions.
• Spot the 0 ‘s in output. a b c Maxterms Sr# F
•Write as the Product of 0 0 0 a+b+c 0 1
Maxterms 0 0 1 a + b + c’ 1 1
•You have your function.
0 1 0 2 0
•But unfortunately not the
0 1 1 3 0
shortest.
•May use Boolean Algebra 1 0 0 . 4 1

to shorten. 1 0 1 . 5 1
•We will learn a quicker 1 1 0 . 6 0
method later on. 1 1 1 a’ +b’ + c’ 7 0

So, F = ….. …. ….. …. ….

Called a Product of Sum (POS) form


Rachaen Huq 8
There is a shorter way to represent a
function
• But it only helps (directly) in reproducing the
truth table, doesn’t help in finding the
shortest expression (which is always our
interest! … money! )
• Can be expressed using both minterms and
maxterms
• Called Canonical Forms.

Rachaen Huq 9
Canonical Form: Sum of Minterms
F1 = xyz' = (m6)
F2 = x'y'z+xy'z'+xy'z+xyz'+xyz = (m1,m4,m5,m6,m7)
F3 = x'y'z+x'yz+xy'z'
+xy'z x y z F1 F2 F3
= (m1,m3,m4,m5) 0 0 0 0 0 0
0 0 1 0 1 1
0 1 0 0 0 0
0 1 1 0 0 1
1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 1 1 0
1 1 1 0 1 0
Canonical Form: Product of Maxterms
E.g.: F2 = (M0,M2,M3) = x y z F1 F2 F3
(x+y+z)(x+y'+z)(x+y'+z')
0 0 0 0 0 0
0 0 1 0 1 1
F3 = (M0,M2,M6,M7) 0 1 0 0 0 0
= 0 1 1 0 0 1
(x+y+z)(x+y'+z)(x'+y'+z)(x'+y'+z') 1 0 0 0 1 1
1 0 1 0 1 1
1 1 0 1 1 0
1 1 1 0 1 0
Now… can you guess the inter-relationship
between the two canonical forms?
• In terms of expression only?

Rachaen Huq 12
• Eg: F2(A,B,C) = M(0,3,5,6) = m(1,2,4,7)
• Eg: F1(A,B,C) = m(3,4,5,6,7) = M(0,1,2)

Rachaen Huq 13
At this moment you should be able to fill the
truth table if the canonical forms are given….
• Lets try one.
• Express it is SOP
• In POS
• Which looks shorter
• Calculate number of Gates required.

Rachaen Huq 14
Enough with the drama! Show us the direct
method.
• Its called the Karnaugh Map.
• Maurice Karnaugh (born October 4, 1924,
in New York City) is an American physicist
• Thanks to him

• Btw, he is still alive.

Rachaen Huq 15
Slightly off topic!
• Can you make an inverter using an XOR gate?
• Can you do the same for a follower?
• Can you make an inverter using a NAND gate ?

Rachaen Huq 16

You might also like