0% found this document useful (0 votes)
22 views4 pages

Logical Gates Formative

computer science

Uploaded by

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

Logical Gates Formative

computer science

Uploaded by

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

∧  .

 AND
∨  +  OR
For Each Scenario:
1. Graphical Representation:
o Represent the logic functions using AND, OR, and NOT gates.

2. Construct the Truth Table:


o List all possible combinations of inputs (A, B, C) and compute the
output T for each combination using the given logic function.
3. Explain the Logic:
o Explain how the inputs affect the system's output and how the logic
gates control the behavior of the system.

Scenario 1: Automatic Garden Sprinkler System


Description:
The garden sprinkler turns on if:
 It’s not raining, and
 Either the soil is dry OR the temperature is high.
Inputs:
 A: Rain sensor (1 = raining, 0 = not raining)
 B: Soil moisture sensor (1 = dry, 0 = wet)
 C: Temperature sensor (1 = high, 0 = normal)

T = ¬A ∧ (B ∨ C)
Logic Function:

 The sprinkler turns on (T = 1) if it’s not raining (¬A) and either the
soil is dry (B) or the temperature is high (C).
Scenario 1 Answers:

¬A ∧ (B V
C)
A B C ¬A BVC T=

0 0 0 1 0 0
0 0 1 1 1 1
0 1 0 1 1 1
0 1 1 1 1 1
1 0 0 0 0 0
1 0 1 0 1 0
1 1 0 0 1 0
1 1 1 0 1 0

Here we have an automatic sprinkler system that is controlled by three


inputs: Raining (A), when the soil is dry (B), and when the temperature is
high (C). The logic gates above ensures that the sprinkle system only
functions when conditions are met. Thus, protecting plants from over
watering the plants whenever it rains.

Scenario 2: Car Safety System


Description:
A car’s safety system will activate if:
 Either the seatbelt is unfastened OR the door is open, and
 The engine is running.
Inputs:
 A: Seatbelt sensor (1 = unfastened, 0 = fastened)
 B: Door sensor (1 = open, 0 = closed)
 C: Engine sensor (1 = running, 0 = off)

T = (A ∨ B) ∧ C
Logic Function:

 The safety system activates (T = 1) if the engine is running (C) and


either the seatbelt is unfastened (A) or the door is open (B).
Scenario 2 Answers:

∧C
A B C AVB T = (A V B)

0 0 0 0 0
0 0 1 0 0
0 1 0 1 0
0 1 1 1 1
1 0 0 1 0
1 0 1 1 1
1 1 0 1 0
1 1 1 1 1

In this scenario the cars safety system is determined by the seatbelt status (A),
the door (B), and the engine status (C). The logical gate ensures that the safety
systems alert the driver in unsafe conditions when the car is on.

Scenario 3: Smart Light Control


Description:
A smart light turns on if:
 The room is dark, and
 Either someone is in the room or the motion sensor detects movement.
Inputs:
 A: Light sensor (1 = dark, 0 = bright)
 B: Presence sensor (1 = someone in the room, 0 = no one in the room)
 C: Motion sensor (1 = movement detected, 0 = no movement)

T = A ∧ (B ∨ C)
Logic Function:

 The light turns on (T = 1) if the room is dark (A) and either someone is
in the room (B) or movement is detected (C).
Scenario 3 Answers:

T = A ∧ (B V
C)
A B C BVC

0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1

In this scenario the smart light is managed by the lights condition(A), The
presence of someone in the room (B), and motion detection (C). The logical gate
ensures that the smart light only operates when needed, it saves energy by only
lighting up when someone is in the room.

You might also like