Académique Documents
Professionnel Documents
Culture Documents
Functions
CS 3402:A.Berrached
2.
3.
4.
Base 2 system
Be able to convert number from/to base 10 to/from
base 2
2s complete system
Be able to represent positive and negative integers
using the 2s complete system
Be able to convert between decimal and 2s
complement sytem
2s complete arithmetics
Addition
subtraction
Hexadecimal representation
CS 3402:A.Berrached
Boolean Algebra
Algebraic structure consisting of:
a set of elements B
operations {AND, OR}
Notation:
X AND Y X Y XY
X OR Y
X+Y
B contains at least two elements a & b such that a b
Note: switching algebra is a subset of Boolean algebra where
B={0, 1}
Axioms of Boolean Algebra
4. Associative Laws:
1. Closure a,b in B,
(i) a + (b+c) = (a+b)+c = a+b+c
(ii) a. (b.c) = (a.b).c = a.b.c
(i) a + b in B
5. Distributive Laws:
(ii) a b in B
(i) a + (b c) = (a + b) (a + c)
2. Identities: 0, 1 in B
(ii) a (b + c) = (a b) + (a c)
(i) a + 0 = a
6. Existence of the Complement:
(ii) a 1 = a
exists a unique in B
3. Commutative Laws: a,b in B,
(i) a + a = 1
(i) a + b = b + a
(ii) a a = 0
(ii) a b = b a
a is complement of a
CS 3402:A.Berrached
Principle of Duality
Definition of duality:
a dual of a Boolean expression is derived by replacing AND
operations by ORs, OR operations by ANDs, constant 0s by 1s,
and 1s by 0s (everything else is left unchanged).
Principle of duality: if a statement is true for an expression, then it
is also true for the dual of the expression
Example: find the dual of the following equalities
1)
2)
XY+Z = 0
a(b+c) = ab + ac
CS 3402:A.Berrached
Boolean Expression
CS 3402:A.Berrached
Exercise
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
CS 3402:A.Berrached
CS 3402:A.Berrached
F1 = xy + xyz + xyz
Get truth table for F1
Draw logic circuit diagram for F1
X Y Z
F2=xy + xz
Get truth table for F2
Draw logic circuit diagram for F2
F1
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
(End of class?)
CS 3402:A.Berrached
B
T1
C
T
A
B
C
D
For each Boolean function, there is only one unique truth table
representation
=>Truth table is the unique signature of a Boolean function
CS 3402:A.Berrached
Boolean Functions
Possible Boolean Functions of Two variables
X Y
0 0
0 1
1 0
1 1
NAND
NOR
X Y
1
X
X+Y
Description
Z = 1 if X is 0
or Y is 0
Description
Z = 1 if both X
and Y are 0
Gates
X
Y
Truth T able
X Y Z
0 0 1
0 1 1
1 0 1
1 1 0
Gates
X
Y
CS 3402:A.Berrached
Truth T able
Z
X
0
0
1
1
Y
0
1
0
1
Z
1
0
0
0
10
CS 3402:A.Berrached
11
Gates
Gates
X
Z
Truth T able
X
0
0
1
1
(a) XOR
Y
Truth T able
Y
0
1
0
1
Z
0
1
1
0
X
0
0
1
1
Y
0
1
0
1
Z
1
0
0
1
(b) XNOR
CS 3402:A.Berrached
12
CS 3402:A.Berrached
13
Optimization Criteria
1.
2.
3.
CS 3402:A.Berrached
14
b. X.(X + Y) = X.Y
CS 3402:A.Berrached
15
More theorems
(a)
(b)
7. Consensus Theorem
AB + AC + BC = AB +AC
(A+B).(A+C).(B+C) = (A+B).(A+C)
CS 3402:A.Berrached
16
DeMorgan's Law
8. DeMorgans Law
a. (X+Y) = X . Y
b. (X.Y) = X + Y
In general
a. (A+B+.+Z) = A . B . .Z
b. (A.B.C.Z) = A + B + .+Z
CS 3402:A.Berrached
17
DeMorgan's Theorem
(X + Y)' = X' Y'
NOR is equivalent to AND
with inputs complemented
X
0
0
1
1
Y
0
1
0
1
X
1
1
0
0
Y
1
0
1
0
X
0
0
1
1
Y
0
1
0
1
X
1
1
0
0
Y
1
0
1
0
X +Y
1
0
0
0
XY
1
0
0
0
XY X +Y
1
1
1
1
1
1
0
0
18
De Morgans Law
Find the complement of the following function and put in a
form that only single variables are complemented:
F = x.(yz + yz) + x(yz)
CS 3402:A.Berrached
19
Chapter 2:
2.1a,b,&c
2.2b
2.3 c
2.13a
2.17c
20
(X + YZ).(X+YZ)
(W + X + YZ)(W + X + YZ)
(VW + X)(X + Y + Z + VW)
(V + WX)(V + WX + YZ)
(W + X)YZ + (W +X) YZ
(V+U+W)(WX+Y+UZ)+(WX+UZ+Y)
A + B + CD(A+B)
ABC + CD + BCD+ABD
[(A+D+BC)(B+D+AC)]+BCD+ACD`
CS 3402:A.Berrached
21
Function Representations
Note --- TTL Databook link:
http://webpages.ull.es/users/marbelo/74XX.pdf
CS 3402:A.Berrached
22
Function Representations
==>
==>
==>
==>
CS 3402:A.Berrached
TO
Logic Diagram
Boolean Expression
Truth Table
Boolean Expression
23
Function Representations
CS 3402:A.Berrached
24
CS 3402:A.Berrached
25
Note:
X(YZ)'
CS 3402:A.Berrached
26
Note:
SOP expressions ==> 2-level AND-OR circuit
CS 3402:A.Berrached
27
XYZ
X+Y+Z
CS 3402:A.Berrached
28
Minterms
Bit Combination
000
001
010
011
100
101
110
111
The bit combination associated with each minterm is the only bit
combination for which the minterm is equal to1.
Example: X'Y'Z' = 1 iff X=0, Y=0, and Z=0
Each bit represents one of the variables ( order is important) :
==> 0
29
Maxterms
Maxterm
Bit Combination Designmation
X+Y+Z
000
M0
X + Y + Z
001
M1
X + Y + Z
010
M2
X + Y + Z
011
M3
X + Y + Z
100
M4
X + Y + Z
101
M5
X + Y + Z
110
M6
X + Y + Z
111
M7
30
CS 3402:A.Berrached
31
Input
AB C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Output
F
1
0
0
1
0
0
0
0
Minterm
term
ABC
ABC
ABC
ABC
ABC
ABC
ABC
ABC
designation
m0
m1
m2
m3
m4
m5
m6
m7
F is 1 iff (A=0 AND B=0 AND C=0) or (A=0 AND B=1 AND C=1)
F is 1 iff (A=1 AND B=1 AND C=1) or (A=1 AND B=1 AND C=1)
F is 1 iff A.B.C = 1 OR A.B.C= 1
F is 1 iff ABC + ABC = 1
=> F = ABC + ABC
Short-hand notation:
CS 3402:A.Berrached
=> F = m0 + m3
F = m ( 0, 3)
32
CS 3402:A.Berrached
33
Input
AB
0 0
0 0
0 1
0 1
1 0
1 0
1 1
1 1
C
0
1
0
1
0
1
0
1
Output
F
1
0
0
1
0
0
0
0
Minterm
term
Designation
ABC
m0
ABC
m1
ABC
m2
ABC
m3
ABC
m4
ABC
m5
ABC
m6
ABC
m7
Maxterm
term
A +B+C
A + B + C
A + B + C
A + B + C
A + B + C
A + B + C
A + B + C
A + B + C
Designation
M0
M1
M2
M3
M4
M5
M6
M7
M(1,2,4,5,6,7)
CS 3402:A.Berrached
34
Product of Maxterms
CS 3402:A.Berrached
35
CS 3402:A.Berrached
36
Method 1:
1. Derive Truth Table for F
2. Get SOP and POS from truth table
Method 2:
Use Shannons Expansion Theorem
CS 3402:A.Berrached
37
CS 3402:A.Berrached
38
CIRCUIT DESIGN
CS 3402:A.Berrached
39
40
X
Y
Z
CS 3402:A.Berrached
41
Truth Table
CS 3402:A.Berrached
42
CS 3402:A.Berrached
43
N = 856.3710
44
W
X
CS 3402:A.Berrached
45
Truth Table
WXYZ F
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
1
0
0
1
0
1
1
0
0
1
d
d
d
d
d
d
F = m ( 0, 3, 5, 6, 9)+d(1015)
F = M(1,2,4,7, 8). d(1015)
CS 3402:A.Berrached
46
Examples
1.
CS 3402:A.Berrached
47
Suggested HW problems
Do the following problems from your textbook (Roth)
2.3, 2.8, 2.9, 2.17, 2.18
3.14, 3.16, 3.23
4.5, 4.7, 4.8, 4.11, 4.13, 4.16 4.18
CS 3402:A.Berrached
48