Lab 2 Basic Laws of Boolean Algebra

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Adama Science and Technology University

School of Electrical Engineering and Computing


Department of Software Engineering
Course Title: Digital Logic Design
Course No: ECE3201
Lab No: 2
Title: Basic Law & De Morgan’s Theorem

Prepared by:
Name ID No.
1. Fasil Hawultie UGR/25578/14
2. Firaif Lenjisa UGR/25346/14
3. Hanamariam Mesfin UGR/25483/14
4. Nebil Rahmeto UGR/25275/14
5. Sewasew Tadele UGR/25379/14
6. Yabets Workaferahu UGR/25650/14

Date of conduction: August 30, 2023


Date of submission: September 6, 2023
Theoretical Background
Boolean algebra is a branch of algebra that deals with binary variables and logic operations. It
has its own set of rules or laws which are used to define and reduce Boolean expressions. The
basic laws of Boolean algebra are:
Commutative law: allows change in position of “AND” or “OR” variables.
A+B=B+A AB = BA
Associative law: allows grouping of variables.
A + (B + C) = (A + B) + C A(BC) = (AB)C
Distributive law: allows factoring or multiplying out of expressions.
A(B + C) = AB + AC A + BC = (A + B)(A + C)
Identity law: states that using “OR” gate with a variable and value 0 or using “AND” gate
with a variable and value 1 returns the variable.
A+0=A A.1 = A
Complement law: states that using “OR” gate with a variable and its complement always
returns value 1 and using “AND” gate with a variable and its complement always returns
value 0.
A + A' = 1 and A.A' = 0
De Morgan’s laws: are a pair of transformation rules that are both valid rules of inference in
propositional logic and Boolean algebra.
i. The first law states that when the OR sum of two variables is inverted, this is the same as
inverting each variable individually and then ANDing these inverted variables

(A  B)’  A’ B’

ii. The second law states that when the And product of two variables is inverted ,this is the
same as inverting each variable individually and then ORing them.

(AB)’  A’B’

These laws can be used to both reduce and simplify a complex Boolean expression in an attempt
to reduce the number of logic gates required.
Lab – 2: Basic Law & De Morgan’s Theorem
Objectives:

 To become familiar with logic circuits


 To study some fundamental laws of Boolean algebra
 To investigate De Morgan’s Theorem
Apparatus Used:
 Limrose Path
 Connecting Wires
 Digital ICs

Procedures
I. Task 1:
a. Prove A’’ = A
i. First, we connected the pins 7 & 14 of the NOT gate to Ground and +5 V
respectively.
ii. Then, we used a wire to connect a switch to the input pin 1.
iii. Then, we connected the output from pin 2 to the input pin 3.
iv. Then, we connected the output from pin 4 to an LED.
v. Then, we turned on the power switch.
vi. Finally, we observed that the output is the same as the input.
b. Note the effects of A.A’
i. First, we connected the pins 7 & 14 of the NOT gate and the AND gate to Ground
and +5 V respectively.
ii. Then, we used a wire to connect a switch to the input pin 1 of the NOT gate and the
AND gate.
iii. Then, we connected the output from pin 2 of the NOT gate to pin 2 of the AND
gate.
iv. Then, we connected the output from pin 3 of the AND gate to an LED.
v. Then, we turned on the power switch.
vi. Finally, we observed that the output is always 0 (doesn’t turn on the light).
II. Task 2: AND Gate Implementation
a. Extend the 2-input AND gate to a 4-input AND gate
i. First, we connected the pins 7 & 14 of the AND gate to Ground and +5 V
respectively.
ii. Then, we used wires to connect 4 switches to the input pins 1,2, 4 and 5.
iii. Then, we connected the output of pins 1 and 2 from pin 3 to the input pin 9.
iv. Then, we connected the output of pins 4 and 5 from pin 6 to the input pin 10.
v. Then, we connected the output from pin 8 to an LED.
vi. Then, we turned on the power switch.
vii. Finally, we observed that the output is (A.B.C.D).
A B C D Y A B C D Y
0 0 0 0 0 1 0 0 0 0
0 0 0 1 0 1 0 0 1 0
0 0 1 0 0 1 0 1 0 0
0 0 1 1 0 1 0 1 1 0
0 1 0 0 0 1 1 0 0 0
0 1 0 1 0 1 1 0 1 0
0 1 1 0 0 1 1 1 0 0
0 1 1 1 0 1 1 1 1 1

III. Task 3: Associative and Commutative Laws


a. Implement the Boolean Equation Y = A(BC)
i. First, we connected the pins 7 & 14 of the AND gate to Ground and +5 V
respectively.
ii. Then, we labeled three switches A, B and C and used different connecting wires
for each of them.
iii. Then, we connected switch A and switch B to pins 1 & 2 respectively.
iv. Then, we connected switch B and switch C to pins 4 & 5 respectively.
v. Then, we connected the output of pins 1 and 2 from pin 3 to the input pin 9.
vi. Then, we connected the output of pins 4 and 5 from pin 6 to the input pin 12.
vii. Then, we connected switch C and switch A to the input pins 10 and 13.
viii. Then, we connected the output from pin 8 to an LED and labeled it output Z.
ix. Then, we connected the output from pin 11 to an LED and labeled it output Y.
x. Then, we turned on the power switch.
xi. Finally, we observed the output.
A B C Y Z A B C Y Z
0 0 0 0 0 1 0 0 0 0
0 0 1 0 0 1 0 1 0 0
0 1 0 0 0 1 1 0 0 0
0 1 1 0 0 1 1 1 1 1
IV. Task 4: Laws of Boolean Algebra
a. Demonstrate the Distributive law
i. First, we connected the pins 7 & 14 of the OR gate and the AND gate to Ground
and +5 V respectively.
ii. Then, we labeled three switches A, B and C and used different connecting wires
for each of them.
iii. Then, we connected switch A and switch B to pins 1 & 2 of the AND gate
respectively.
iv. Then, we connected switch A and switch C to pins 4 & 5 of the AND gate
respectively.
v. Then, on the OR gate we connected switch B and switch C to pins 1 & 2
respectively.
vi. Then, we connected the output of pins 1 and 2 from pin 3 of the AND gate to the
input pin 4 of the OR gate.
vii. Then, we connected the output of pins 4 and 5 from pin 6 of the AND gate to the
input pin 5 of the OR gate.
viii. Then, we connected the output of pins 1 and 2 from pin 3 of the OR gate to the
input pin 9 of the AND gate.
ix. Then, we connected switch A to pin 10 of the AND gate.
x. Then, we connected the output from pin 8 of the AND gate to an LED and labeled
it output Z.
xi. Then, we connected the output from pin 6 of the OR gate to an LED and labeled it
output Y.
xii. Then, we turned on the power switch.
xiii. Finally, we observed the output.
A B C Y Z A B C Y Z
0 0 0 0 0 1 0 0 0 0
0 0 1 0 0 1 0 1 1 1
0 1 0 0 0 1 1 0 1 1
0 1 1 0 0 1 1 1 1 1
V. Task 5: De Morgan’s Theorem
a. Demonstrate De Morgan’s theorem by connecting NOT, AND, and OR gates as shown
in figure below.

i. First, we connected the pins 7 & 14 of the OR gate, NOT gate and the AND gate
to Ground and +5 V respectively.
ii. Then, we labeled two switches A and B and used different connecting wires for
each of them.
iii. Then, we connected switch A and switch B to pins 1 & 2 of the AND gate
respectively.
iv. Then, we connected the output of pins 1 and 2 from pin 3 of the AND gate to the
input pin 1 of the NOT gate.
v. Then, we connected the output of pin 2 of the NOT gate to an LED and labeled it
output Y.
vi. Then, we connected switch A and switch B to the input pins 3 & 5 of the NOT
gate using a second set of wires.
vii. Then, we connected the outputs from pin 4 and pin 6 of the NOT gate to input pin
1 and pin 2 of the OR gate.
viii. Then, we connected the output of pins 1 and 2 from pin 3 of the OR gate to an
LED and labeled it output Z.
ix. Then, we turned on the power switch.
x. Finally, we observed the output.
A B Y Z
0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0
Questions
1. How can NAND gate be used as a basic gate?
By connecting it together in various combinations, the three basic gate types of AND, OR and
NOT gates can be formed.

2. How can NOR gate be used as a basic gate?


NOR gate can be used to produce any other type of logic gate function just like the NAND gate;
By connecting it together in various combinations the three basic gate types of AND, OR and
NOT gates can be formed.

References
 electronics-tutorials.ws
“We have neither received nor provided any help on the writing of this lab report.”

You might also like