CS302 - Lab Manual - Week No PDF
CS302 - Lab Manual - Week No PDF
CS302 - Lab Manual - Week No PDF
Background
We can write expressions in many ways, but some ways are more useful than others
A sum of products (SOP) expression contains: Only OR (sum) operations at the “outermost” level and each
term that is summed must be a product of literals
The advantage is that any sum of products expression can be implemented using a three-level circuit
– literals and their complements at the first level
– AND gates at the second level
– a single OR gate at the third level
Example:
f(x,y,z) = y’ + x’yz’ + xz
Notice that the NOT gates are implicit and that literals are reused.
A minterm is a special product of literals, in which each input variable appears exactly once.
A function with n variables has 2n minterms (since each variable can appear complemented or not)
Example:
A three-variable function, such as f(x,y,z), has 23 = 8 minterms:
Each minterm is true for exactly one combination of inputs:
Those minterms are: x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ xyz
A Minterm is true when:
Minterm When the minterm is True Minterm ID
x’y’z’ x=0, y=0, z=0 m0
x’y’z x=0, y=0, z=1 m1
x’yz’ x=0, y=1, z=0 m2
x’yz x=0, y=1, z=1 m3
xy’z’ x=1, y=0, z=0 m4
xy’z x=1, y=0, z=1 m5
xyz’ x=1, y=1, z=0 m6
xyz x=1, y=1, z=1 m7
Example
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
= m0 + m1 + m2 + m3 + m6
= Σm(0,1,2,3,6)
Example
f(x, y, z) = y’ . (x’+y+z’) . (x+z)
A maxterm is a sum of literals, in which each input variable appears exactly once.
A function with n variables has 2n maxterms
Example
A three-variable function f(x,y,z) has 8 maxterms
Each maxterm is false for exactly one combination of inputs:
Those materms are: x’+y’+z’ x’+y’+z x’+ y+z’ x’+ y+z x+y’+z’ x+y’+z x+y+z’ x+y+z
Maxterm Is false when:
Maxterm When the maxterm is false Maxterm ID
x+y+z x=0, y=0, z=0 M0
x + y + z’ x=0, y=0, z=1 M1
x + y’ + z x=0, y=1, z=0 M2
x + y’ + z’ x=0, y=1, z=1 M3
x’ + y + z x=1, y=0, z=0 M4
x’ + y + z’ x=1, y=0, z=1 M5
x’ + y’ + z x=1, y=1, z=0 M6
x’ + y’ + z’ x=1, y=1, z=1 M7
x’y’z’ m0 x+y+z M0
x’y’z m1 x + y + z’ M1
x’yz’ m2 x + y’ + z M2
x’yz m3 x + y’ + z’ M3
xy’z’ m4 x’ + y + z M4
xy’z m5 x’ + y + z’ M5
xyz’ m6 x’ + y’ + z M6
xyz m7 x’ + y’ + z’ M7
Example
From before
f = Σm(0,1,2,3,6)
and f’ = Σm(4,5,7)
= m4 + m5 + m7
complementing (f’)’ = (m4 + m5 + m7)’
so f = m4’ . m5’ . m7’ [ DeMorgan’s law ]
= M4 . M5 . M7
= ΠM(4,5,7)
Lab Tasks
Task 1: Three-input Boolean functions
Given the following truth table of a three-input logic circuit
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Write the above function in the two standard forms
F(A, B, C)= Σ ( )
F(A, B, C) = Π( )
Draw a circuit that implements the above logic function (use minterms only)
Draw a circuit that implements the above logic function (use maxterms only)
A B C F (simplified)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A B C D F
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1