Experiment no 2: Boolean Algebra

advertisement
Experiment 2: Boolean Algebra
Objective: 1. To solve and implement Boolean function and complement of a function using logic gates.
2. Boolean function and complement of a function using CEDAR Simulator program.
Components Required: IC 7404, IC 7408, IC 7432, Mini Digital Training.
Theory:
Basic Definitions: 1. Associative law: A binary operator * on a set S is said to be associative whenever,
(x * y) * z = x * (y * z) for all x, y, z, 𝜖 S.
2. Commutative law: A binary operator * on a set S is said to be commutative whenever
x * y = y * x for all x, y 𝜖 S.
3. Identity element: A set S is said to have an identity element with respect to a binary operation * on S if there
exists an element e ϵ S with the property that,
e*s = x*e = x for every x 𝜖 S.
Example: The element 0 is an identity element with respect to the binary operator + on the set of integers I =
{……., -3, -2, -1, 0, 1, 2 3,…….. }, since x + 0 = 0 + x = x for any x 𝜖 I.
4. Inverse: A set S having the identity element e with respect to a binary operator * is said to have an inverse
whenever, for every x ϵ S, there exists an element y ϵ S such that
x * y =e
Example: In the set of Integers I, and the operator +, with e = 0, the inverse of an element a is (-a), since
a + (-a) = 0.
5. Distributive law: If * and ⦁ are the two binary operators on a set S. * is said to be distributive over ⦁
whenever
x * (y ⦁ z) = (x * y) ⦁ (x * z)
Page 1
Complement of a Function: The complement of a function F is F΄ and is obtained from an interchange of 0’s
for 1’s and 1’s for 0’s in the value of F. The complement of a function can be derived algebraically through
DeMorgan’s theorems.
(A + B)΄ = A΄ B΄, and (AB)΄ = A΄ + B΄ for two variables A, B
The theorem can be generalized for any number of variables,
(A + B + C +………. F)΄ = A΄ B΄ C΄ … F΄
(A B C …………….. F)΄ = A΄ + B΄ + C΄ + ……. F΄
Some Solved Examples:
1. Simplify the following Boolean functions to a minimum number of literals
a) F = x΄yz + xz
b) F = (x + y΄ + z΄)(x΄ + z΄)
Solution: a) F = x΄yz + xz
= z (x΄y + x)
= z ((x + x΄)(x + y))
[x + yz = (x+y)(x + z)]
= z (y + x)
= xz + yz
b) F = (x + y΄ + z΄)(x΄ + z΄)
= x.x΄ + x.z΄ + x΄.y΄ + y΄.z΄ + z΄.x΄ + z΄.z΄
= 0 + z΄ (x + y΄ + x΄ + 1) + x΄y΄
= z΄ + x΄y΄
[x.x΄ = 0, z΄.z΄ =z΄]
[x + 1 = 0]
2. Find the complements of the functions F = x΄yz΄ + x΄y΄z
Solution: F΄ = ( x΄yz΄ + x΄y΄z )΄
= ( x΄yz΄ )΄ ( x΄y΄z )΄
[(x + y)΄ = x΄ y΄ ]
= (x΄΄ + y΄+ z΄΄ ) ( x΄΄ + y΄΄ + z΄ )
[(x y)΄ = x΄ + y΄ ]
= ( x + y΄ + z) (x + y + z΄ )
= xx + xy + xz΄ + y΄x + y΄z΄ + xz + yz
= x( 1 + y + z΄ + y΄+ z) + y΄z΄+ yz
F΄ = x + y΄z΄ + yz = 𝑥 + (𝑦 ⊕ 𝑧)΄
3. Simplify the following Boolean functions to a minimum number of literals
a) F1 = x΄z΄ + xyz + xz΄
b) F2 = (A΄ + C)(A΄ + C΄)(A + B + C΄D)
Solution: a) F1 = x΄z΄ + xyz +xz΄
= z΄ (x΄ + x) + xyz
= z΄ + xyz
= (z΄ + z)(z΄ + xy)
[x + yz = (x+y)(x + z)]
= z΄+ xy
Page 2
Truth table: F1 = z΄+ xy = Σ (000 010 100 110 , 110 111) = Σ (0, 2, 4, 6, 7)
Min
terms
0
1
2
3
4
5
6
7
x
y
z
F1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
b. F2 = (A΄ + C)(A΄ + C΄)(A + B + C΄D)
= (A΄ + A΄C΄ + A΄C + CC΄)(A + B + C΄D)
= A΄ (1 + C΄ + C) (A + B + C΄D)
= A΄A + A΄B + A΄C΄D
= A΄B + A΄C΄D
Page 3
Truth table: F2 = A΄B + A΄C΄D = Σ (0100 0101 0110 0111 , 0001 0101) = Σ (1, 4, 5, 6, 7)
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
A
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
B
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
C
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
D
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
F2
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
0
Procedures:
1. Implement the functions using basic gates and bread board, and verify the truth tables.
2. Repeat step 1 using Cedar simulator.
Conclusions: Thus the implementation of the functions using IC and breadboard, and the simulation of
function using Cedar simulator are studied.
Page 4
Download