KEMBAR78
Car Security System-Recitation Example | PDF | Mathematical Logic | Computer Science
0% found this document useful (0 votes)
106 views3 pages

Car Security System-Recitation Example

The document describes a car security system with three inputs - a main switch, vibration sensor, and door sensor. It presents the truth table and boolean expressions to represent the output - the car alarm. The boolean expression is simplified using theorems. A finite state machine approach is then described to address the limitation that the alarm turns off immediately when the triggering condition is removed. The state diagram and next state/implementation tables are provided. Finally, the excitation equation for the D flip-flop is given and the final circuit diagram can be constructed.

Uploaded by

PRaed Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views3 pages

Car Security System-Recitation Example

The document describes a car security system with three inputs - a main switch, vibration sensor, and door sensor. It presents the truth table and boolean expressions to represent the output - the car alarm. The boolean expression is simplified using theorems. A finite state machine approach is then described to address the limitation that the alarm turns off immediately when the triggering condition is removed. The state diagram and next state/implementation tables are provided. Finally, the excitation equation for the D flip-flop is given and the final circuit diagram can be constructed.

Uploaded by

PRaed Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Car Security System

Using combinational logic only


Three inputs: Main switch (M), Vibration/Motion Sensor (V), Door Sensor (D)
Output: Car Alarm (A)

Truth Table
Inputs Output
M V D A
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1

Boolean Expression
𝐴 = 𝑀𝐷% 𝑉 + 𝑀𝐷𝑉( + 𝑀𝐷𝑉

Boolean algebraic simplification


𝐴 = 𝑀𝐷% 𝑉 + 𝑀𝐷𝑉( + 𝑀𝐷𝑉
𝐴 = 𝑀(𝐷% 𝑉 + 𝐷𝑉( + 𝐷𝑉) by distributive theorem, xy+xz = x(y+z)
𝐴 = 𝑀(𝐷% 𝑉 + 𝐷𝑉( + 𝐷𝑉 + 𝐷𝑉) by idempotent theorem, x + x = x
𝐴 = 𝑀(𝑉(𝐷 + 𝐷 % ) + 𝐷(𝑉 + 𝑉()) by distributive theorem
𝐴 = 𝑀(𝑉(1) + 𝐷(1)) by inverse theorem x+x’ = 1
𝐴 = 𝑀(𝑉 + 𝐷) = 𝑀𝑉 + 𝑀𝐷

Karnaugh map based simplification

Final Circuit
FSM based variant
The problem with a combinational circuit is that once the alarm is triggered, by let’s say opening the door, the alarm
can be turned off immediately by closing the door again. However, what we want is that once the alarm is triggered,
it should remain on even after closing the door, and the only way to turn it off is to turn off the master switch. This
requirement suggests that we need a sequential circuit instead where the output is dependent on not only the
current input switch settings but also on the current state of the alarm.

Step 1: State Diagram

Step 2: Next State Table


Present State Inputs Next State
Q M D V Qnext
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1

Step3: Implementation Table


Given the present state and a desired next state, what will be the input(s) to the flip-flop(s) used in the FSM? To
answer that question, we use an implementation table. Here we are going to use a D flip-flop, which is a transparent
latch i.e. Qnext = D0. Hence the implementation table will be the same the next state table (step 2) but next state
(Qnext) replaced with flip-flop input (D0). If we use other flip-flops (SR, JK, and T), we will have to use their respective
excitation tables to come up with the implementation table.
Present State Inputs Flip-flop implementation
Q0 M D V D0
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 0
1 0 1 1 0
1 1 0 0 1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Step 4: Excitation Equation(s)

Karnaugh map based simplification

𝐷, = 𝑀𝑉 + 𝑀𝐷 + 𝑄, 𝑀

Step 5: Final Circuit

You might also like