Question: 1 . PROBLEM DESCRIPTION: A room has five doors with a light switch next to each door numbered from 1 to 5 , and one

1. PROBLEM DESCRIPTION:
A room has five doors with a light switch next to each door numbered from 1 to 5, and one light
in the center of the room. Design a circuit that allows any light switch to change the state of the light
(that is, if the light is currently off, any switch can turn it on, and vice-versa) and display the
corresponding switch number used.
Each of the five inputs can be ON or OFF (a 1 or a 0), so you can represent all possible
combinations of inputs in a truth table. The first row (all 0s) represents a state where the light is
OFF and number 0 is displayed. From there, if any input equal to a 1(ON), the light toggles ON
and the corresponding switch used will be displayed. When the output is ON, any of the input equal
to a 1(ON) will set the light OFF again and the switch number will be displayed, and then any of
the input equal to a 1(ON) will turn the light back ON and the switch number will be displayed,
etc.
You need to set a rule for the system on what to be done if more than one switches equal to a
1(ON) at the same time to avoid any error that may occur (The system will always toggle the
light unless all switches are OFF).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!