Beruflich Dokumente
Kultur Dokumente
License: http://creativecommons.org/licenses/by-nc-nd/3.0/
Boolean Algebra
George Boole (1815-1864) English mathematician and philosopher.
ab a+b Complement
Defined on the set B={0,1} b b a a'
0 1 0 1
Binary operators: AND, OR { , + } a a
Unary operation: Complement (NOT) { ' } 0 0 0 0 0 1 0 1
1 0 1 1 1 1 1 0
Axioms (Laws):
Under assumption a , b B
1. Closure: a+bB abB
2. Commutative: a+b=b+a ab=ba
3. Associative: a + (b + c) = (a + b) + c a (b c) = (a b) c
4. Identity : a+0=a a1=a
5. Distributive: a + (b c) = (a + b) (a + c) a (b + c) = (a b) + (a c)
6. Inverse: a + a' = 1 a a' = 0
http://www.faculty.itu.edu.tr/buzluca 2.1
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
De Morgan:
Although truth tables may contain many rows, they can be filled and compared
by computer programs in very short times.
http://www.faculty.itu.edu.tr/buzluca 2.5
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example:
Z = A' B C + A B' C + A B C' + A B C
= A' B C + A B' C + A B C' + A B C + A B C
= A' B C + A B C + A B' C + A B C' + A B C
= (A' + A) B C + A B' C + A B C' + A B C
= (1) B C + A B' C + A B C' + A B C
= B C + A B' C + A B C' + A B C + A B C
= B C + A B' C + A B C + A B C' + A B C
= B C + A (B' + B) C + A B C' + A B C
= B C + A (1) C + A B C' + A B C
= B C + A C + A B (C' + C)
= B C + A C + A B (1)
= BC + AC + AB
http://www.faculty.itu.edu.tr/buzluca 2.6
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: http://creativecommons.org/licenses/by-nc-nd/3.0/
Digital Circuits
X= x1 x2 x3 E(X)
Combinations for
0 0 0 0 Set of all input
which E(X)
0 0 1 1 combinations
generates 1
0 1 0 0 (X)
(covers)
0 1 1 1
1 0 0 0 000 001
1 0 1 1 010 011
1 1 0 1 100 101
1 1 1 1 111 110
http://www.faculty.itu.edu.tr/buzluca 2.8
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example:
X1=1001 , X2 = 1101
X1 X2.
http://www.faculty.itu.edu.tr/buzluca 2.9
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
http://www.faculty.itu.edu.tr/buzluca 2.14
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
y = f(X): Bn B
X0Bn ; ! y0 B ; y=f(X)
Example: x1 x2 x3 y
000 1 x1
001
010
1
0
x2
x3
f y
011 0
100 1
101 0
110 0
111 1
http://www.faculty.itu.edu.tr/buzluca 2.15
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
( n)
There are 2 2 possible basic logical functions for n binary variables (inputs).
There are 16 possible basic logical functions for 2 binary variables (inputs).
x
f z
y
The truth table of 16 possible basic logical functions for 2 binary variables (F0F15):
Inputs Functions
X Y F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1
X Y Y' X'
X XOR Y X=Y X NAND Y
X AND Y
X OR Y X NOR Y
(X AND Y)'
(X OR Y)'
http://www.faculty.itu.edu.tr/buzluca 2.16
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example:
x1 x2 x3 y1 y2
000 1 1 x1 y1
001
010
1
0
0
0
x2
x3
f y2
011 0 0
100 1 1
101 0 1
110 0 1
111 1 0
http://www.faculty.itu.edu.tr/buzluca 2.17
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
http://www.faculty.itu.edu.tr/buzluca 2.18
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits License: http://creativecommons.org/licenses/by-nc-nd/3.0/
http://www.faculty.itu.edu.tr/buzluca 2.19
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
No x1 x2 y1 y2
y1 = f(x1,x2) = 1(0) + 0(1,3)
0 0 0 1 1
1 0 1 0 or y1 = f(x1,x2) = 1(0) + (2)
2 1 0 0 or y1 = f(x1,x2) = 0(1,3) + (2)
3 1 1 0
y2 = f(x1,x2) = 1(0) + 0(2)
or y2 = f(x1,x2) = 1(0) + (1,3)
or y2 = f(x1,x2) = 0(2) + (1,3)
http://www.faculty.itu.edu.tr/buzluca 2.21
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Graphical Representation
The input variables (combinations) of a logical function are elements of the set Bn.
These variables can be represented as vertices of an n-dimensional hyper cube.
Vertices that correspond to 1-generating combinations are colored (marked).
Number of inputs of the function defines the dimension of the cube.
n-bit input n-dimensional cube
Boolean Cubes: 01 11
0 1
Y 2- dimensional
1-dimensioanal
X 10
00
X
1111
111 0111
3- dimensional 4- dimensional
Y Z 101 Y
Z
W
000 1000
X 0000 X
http://www.faculty.itu.edu.tr/buzluca 2.22
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example: A B F
01 11
0 0 1
B
0 1 0
1 0 1 00 10
A
1 1 0
Example: A B C F
0 0 0 0
0 0 1 0 111
0 1 0 0
0 1 1 1
1 0 0 0 B C 101
1 0 1 1
1 1 0 1 000 A
1 1 1 1
With the increase in the variables (inputs) it gets harder to draw a Boolean cube.
Therefore Boolean cubes are not practical to represent Boolean functions with
many inputs.
However, they make it easier to see some properties (especially the adjacent
combinations) of the functions, and explain further topics.
http://www.faculty.itu.edu.tr/buzluca 2.23
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Cells of the table are ordered according to the principles of Gray code in which
only one variable changes in between adjacent (horizontal and vertical) squares.
Format of the Karnaugh map of a function with 3 inputs:
F CD
Format of the Karnaugh map of a 00 01 11 10 Gray Code
AB
function with 4 inputs: 00
0 1 3 2
01
Gray Code 4 5 7 6
11
12 13 15 14
10
8 9 11 10
http://www.faculty.itu.edu.tr/buzluca 2.25
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
Example:
"True" (1) combinations: F = 001 011 101 110 111
Sum of Minters: F = A'B'C + A'BC + AB'C + ABC' + ABC
A B C F F
0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0
The 1st canonical form of the complement of the function can be obtained similarly
by considering the "false" (0) rows:
http://www.faculty.itu.edu.tr/buzluca 2.28
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Indexing minterms:
We assign each minterm an index (number) based on binary encoding of the variables.
For example, we assign the index 5 to the minterm ab'c (101) and denote that
minterm as m5.
A B C Minterms Expression of function F in (2.28) in 1st canonical form:
0 0 0 A'B'C' m0 F(A, B, C) = m(1,3,5,6,7)
0 0 1 A'B'C m1 = m1 + m3 + m5 + m6 + m7
0 1 0 A'BC' m2 = A'B'C + A'BC + AB'C + ABC' + ABC
0 1 1 A'BC m3 F = A, B, C (1,3,5,6,7) (Sum of minterms)
1 0 0 AB'C' m4
1 0 1 AB'C m5 Canonical forms are usually not the simplest (optimal)
1 1 0 ABC' m6 algebraic expression of the function.
1 1 1 ABC m7 The can be usually simplified.
Digital Circuits
The 2nd canonical form consists of a product of sum terms each correspond
to a row in the truth table with the output "0".
For a Boolean function of n variables, a sum term in which each of the n
variables appears once (in either its complemented or uncomplemented form)
is called a maxterm.
For example a function with 3 variables (a, b, c) has 8 maxterms:
a+b+c, a+b+c', a+b'+c, a+b'+c', a'+b+c, a'+b+c', a'+b'+c, a'+b'+c'
Each maxterm is "false" for exactly one combination of inputs.
The 2nd canonical form of a function is the product of maxterms.
To find the maxterms,
Locate all rows in the truth table where output is "0".
To generate the individual maxterms, substitute variables (for example
A, B, or C) for zeros (of the inputs) and complements of variables (A', B',
or C') for ones in the truth table.
Each Boolean function has a unique 2nd canonical (standard) form.
http://www.faculty.itu.edu.tr/buzluca 2.30
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Example:
A B C F
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
F' = (A + B + C') (A + B' + C') (A' + B + C') (A' + B' + C) (A' + B' + C')
http://www.faculty.itu.edu.tr/buzluca 2.31
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Indexing maxterms:
We assign each maxterm an index (number) based on binary encoding of the variables.
For example, we assign the index 5 to the maxterm a'+b+c' (101) and denote that
maxterm as M5.
Canonical forms are usually not the simplest (optimal) expression of the function.
The can be usually simplified.
Example: 2nd canonical form of F:
A B C maxterms
F(A, B, C) = M(0,2,4)
0 0 0 A+B+C M0
= M0 M2 M4
0 0 1 A+B+C' M1
= (A + B + C) (A + B' + C) (A' + B + C)
0 1 0 A+B'+C M2
0 1 1 A+B'+C' M3
F = A,B,C(0,2,4) product of maxterms.
1 0 0 A'+B+C M4
1 0 1 A'+B+C' M5
Minimization:
1 1 0 A'+B'+C M6
1 1 1 A'+B'+C' M7
F(A, B, C) = (A+B+C) (A+B+C) (A+B+C)
= (A+C)(B+B') (A'+B+C)
= (A+C) (A'+B+C)
Representation of maxterms = (A+C) (A'+B+C) (B+C) (consensus)
with 3 variables = (A + C) (B + C)
http://www.faculty.itu.edu.tr/buzluca 2.32
2011 Dr. Feza BUZLUCA
http://www.buzluca.info
Digital Circuits
Digital Circuits
Applying the De Morgan theorem to the complement of the function in the 2nd
canonical form generates the expression in the 1st canonical form.
Complement of the function in POS form
F' = (A + B + C') (A + B' + C') (A' + B + C') (A' + B' + C) (A' + B' + C')
De Morgan
(F')' = ( (A + B + C')(A + B' + C')(A' + B + C')(A' + B' + C)(A' + B' + C') )'
F = A'B'C + A'BC + AB'C + ABC' + ABC 1st canonical form is obtained.
http://www.faculty.itu.edu.tr/buzluca 2.34
2011 Dr. Feza BUZLUCA
http://www.buzluca.info