# Design the simplest switch circuit from given truth table

#### Rapper329

Joined Oct 7, 2022
7
 A B Required Output 1 X(don't care) 1 X(don't care) 0 0

#### dl324

Joined Mar 30, 2015
16,918
Welcome to AAC!

Is this schoolwork?

#### Papabravo

Joined Feb 24, 2006
21,225
It is just a logical OR

#### Rapper329

Joined Oct 7, 2022
7
Welcome to AAC!

Is this schoolwork?
Nop, Actually this is the circuit logic I want to implement for a bulb in my room. I want two switches for it. One switch outside the room and another one inside the room. Now what I want to be able is "When the switch outside is ON, the bulb must be ON regardless of inside switch. And the bulb should be off if the switch inside is OFF regardless of outsides switch.

#### Rapper329

Joined Oct 7, 2022
7
It is just a logical OR
But with logical OR, when A = 1 in 2nd row, the output is 1 but required output is 0

#### Papabravo

Joined Feb 24, 2006
21,225
Nop, Actually this is the circuit logic I want to implement for a bulb in my room. I want two switches for it. One switch outside the room and another one inside the room. Now what I want to be able is "When the switch outside is ON, the bulb must be ON regardless of inside switch. And the bulb should be off if the switch inside is OFF regardless of outsides switch.
And a logical OR gives you that functionality, unless you can tell me a reason that won't work.

#### djsfantasi

Joined Apr 11, 2010
9,163
 A B Required Output 1 X(don't care) 1 X(don't care) 0 0
That truth table can’t be correct.

Let’s say A = 1. Then the first row says the result should be 1 always, since the we don’t care about the value of B. But wait, if the value of B is zero, the result should be 0. Hence, we really do care about the value of B. But the first row says we don’t care…

The same argument (circular argument) can be made when B = 0…

So the truth table is wrong.

#### Papabravo

Joined Feb 24, 2006
21,225
But with logical OR, when A = 1 in 2nd row, the output is 1 but required output is 0
You cannot have both of the don't cares simultaneously.

#### Rapper329

Joined Oct 7, 2022
7
And a logical OR gives you that functionality, unless you can tell me a reason that won't work.
The problem with logical OR is when the switch outside is ON and switch inside is OFF, the bulb glows, but I want the bulb to be OFF in this case

#### dl324

Joined Mar 30, 2015
16,918
Your truth table is incomplete. With 2 variables, you have 4 possible combinations; and don't cares aren't valid for inputs.

#### Rapper329

Joined Oct 7, 2022
7
That truth table can’t be correct.

Let’s say A = 1. Then the first row says the result should be 1 always, since the we don’t care about the value of B. But wait, if the value of B is zero, the result should be 0. Hence, we really do care about the value of B. But the first row says we don’t care…

The same argument (circular argument) can be made when B = 0…

So the truth table is wrong.
Thanks for pointing the mistake. I'd be grateful if there was any way I could implement the circuit I wanted.
If this circuit is somehow not possible, what would the corrected one be like for my requirement ?

#### dl324

Joined Mar 30, 2015
16,918
Thanks for pointing the mistake. I'd be grateful if there was any way I could implement the circuit I wanted.
If this circuit is somehow not possible, what would the corrected one be like for my requirement ?
You haven't given us sufficient information. Give us the output for all 4 input combinations.

"When the switch outside is ON, the bulb must be ON regardless of inside switch. And the bulb should be off if the switch inside is OFF regardless of outsides switch.
These requirements are in conflict. If the light should be on when the outside switch is on, regardless of the position of the inside switch, how can the inside switch affect the outside switch when the outside switch is on?

#### Rapper329

Joined Oct 7, 2022
7
You haven't given us sufficient information. Give us the output for all 4 input combinations.

These requirements are in conflict. If the light should be on when the outside switch is on, regardless of the position of the inside switch, how can the inside switch affect the outside switch when the outside switch is on?
I tried but could not find another truth table that fulfills my requirement. Maybe I was trying something impossible. Sorry for asking stupid question.

#### michael8

Joined Jan 11, 2015
414
I'd likely want the light status (on/off) to follow the *last* switch change, whichever that was.

#### Rapper329

Joined Oct 7, 2022
7
I'd likely want the light status (on/off) to follow the *last* switch change, whichever that was.
Could you tell me how this idea can be implemented using switch/circuits.

#### michael8

Joined Jan 11, 2015
414
The less complex alternative is to use the normal two switch light control with SPDT switches. This connection
doesn't have an on/off position of a switch, just swiching a switch (either one) will change the light status.

two-way switch http://edu-clicks.blogspot.com/2010/08/two-way-switch.html

#### michael8

Joined Jan 11, 2015
414
Could you tell me how this idea can be implemented using switch/circuits.
As a start it takes memory of:
a. the light state: on/off​
b. switch 1 state: on/off​
c. switch 2 state: on/off​
And then logic which implements the requirements... So it's not simple.

#### WBahn

Joined Mar 31, 2012
30,058
Nop, Actually this is the circuit logic I want to implement for a bulb in my room. I want two switches for it. One switch outside the room and another one inside the room. Now what I want to be able is "When the switch outside is ON, the bulb must be ON regardless of inside switch. And the bulb should be off if the switch inside is OFF regardless of outsides switch.

What if the bulb outside the room is ON and the bulb inside the room is OFF?

Your first spec says that the bulb must be ON while your second spec says that it should be OFF.

Which is it? Perhaps is should be ON since "must" is stronger than "should"?

#### WBahn

Joined Mar 31, 2012
30,058
The problem with logical OR is when the switch outside is ON and switch inside is OFF, the bulb glows, but I want the bulb to be OFF in this case
But you said very explicitly that if the outside switch is ON that the bulb must be ON regardless of the inside switch.