Hamza Hanif DLD Lab #5

You might also like

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

Name:- Hamza Hanif

Class:- Bscs 2
Section : ‘A’
Subject :- DLD Lab
Teacher Name:- Mr. Imran Ahmad

Lab 5: Designing from Logical Statement, Function Minimization


and Implementation

.
Task # 5.1:
• A security system for a building has three ways of detecting an intruder.
• Security camera (SC) which sends a 1 when an intruder is detected
• Motion sensor (MS) which sends a 0 when an intruder is detected
• Noise level detector (NLD) which sends a 1 when the noise level rises
beyond a certain threshold
• The system works in such a way that the alarm sounds when
• SC doesn’t detect an intruder but the MS and the NLD do
• Neither SC nor the MS detects but the NLD does
• SC and the MS detect but NLD doesn’t
• SC detects only
• SC and NLD detect but MS doesn’t

Circuit:
Expression :
𝐀 = 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍

𝑨𝒆 = 𝑺 𝑴. 𝑵 + 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍 + 𝐒. 𝐌. 𝐍

Truth Table:
Inputs Output of Existing System Output of Fixed System
S M N A Ae
0 0 0 0 0
0 0 1 1 1
0 1 0 0 0
0 1 1 1 1
1 0 0 0 1
1 0 1 0 0
1 1 0 1 1
1 1 1 1 1

Conclusion:
For the five condition given in Task. The Output for alarm (A) should be activated so we
logically OR the different products. But as per the given information, the existing system
does not sound an alarm, when noise level detector is off even if security camera and
motion sensor detects the intruder.That means when S=1 and M=0 and N=0 the system
doesnot sound the Alarm.
Task # 5.2:
F= D’(B’C’+B’C) + B(A’D+AD)
• Simplify the function using k-map. Simulate and implement on bred board
• Combine the 0’s in the k-map to obtain the complement of the function.
• Simulate and implement F’

K-map :

1 1
1 1
1 1
1 1

Expression :
F= 𝑩. 𝑫 + 𝑩𝑫

Circuit :

Truth Table:
B D 𝑩 𝑫 𝑩. 𝑫 B.D 𝑩 𝑫 + 𝑩𝑫
0 0 1 1 1 0 1
0 1 1 0 0 0 0
1 0 0 1 0 0 0
1 1 0 0 0 1 1
Complement of the Function :

0 0
0 0
0 0
0 0

Expression :
𝑭 = (𝑩 + 𝑫)(𝑩 + 𝑫)

Circuit :

Truth Table:
B D 𝑩 𝑫 𝑩+𝑫 𝑩+𝑫 (𝑩 + 𝑫)(𝑩 + 𝑫)
0 0 1 1 1 1 1
0 1 1 0 1 0 0
1 0 0 1 0 1 0
1 1 0 0 1 1 1

Conclusion:
First we simplify the k map for the given function and then we take complement of F.
Answer the following Questions
1. F= ∑(1,3,4,5,6,7,8,10,12,13,14,15)
• Simplify the function using k-map
• Combine the 1’s to obtain simplified F
• Combine the 0’s to obtain simplified F’
• Simulate the circuit for both F and F’

K-Map for 1’s :

1 1
1 1 1 1
1 1 1 1
1 1

Expression :
𝑭 = 𝑩 + 𝑨𝑫+A𝑪 𝑫 + 𝑨𝑪𝑫

F= B+𝑨𝑫+A𝑫(𝑪 + 𝑫)

F= B+𝑨𝑫+A𝑫
F=B+AD

Circuit :
K-Map to Obtain Simplified 𝑭 :

0 0

0 0

Expression :

𝑭 = (𝑨 + 𝑩 + 𝑫)(𝑨 + 𝑩 + 𝑫)
Circuit :

You might also like