Creating circuit diagrams from verbal descriptions. (Digital Logic)

I have these two descriptions of systems:

And I want to answer them correctly (comes from a book with no solutions).

For #9, isn't that just going to be an AND gate? We all know the truth table for that.

But #10 is a little more difficult. I'm not exactly sure how to go about that one. I've looked through my table of gates and their truth tables, but none of them seem to be what I'm looking for.

Thanks for any help!

Truth table for #10 (for OP to fill out). [Transistor]
A | B | Z
---+---+---
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1


EDIT: So it is just an OR gate? When no switches are on then the light is off; if either switch is on then the light is also on; when both are on then the light should be on. That's how I read it at least and it makes sense.

Thanks for you help transistor.

EDIT 2:

A | B | Z
---+---+---
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0


So it is an XOR.

• I'd rather give you the satisfaction of figuring this out yourself. Edit your post to include your effort at the truth table. There are only two inputs with four possible states and one output with two possible states. There's no nice table function in the editor so put four spaces at the start of each line to force the markup into "code" which is monospaced. – Transistor Jan 31 '18 at 20:32
• #10 does not specify any polarity, so there are two possible gates, one the inverse of the other. Just assume (randomly) that when both switches output LOW, the output should be LOW, and construct the rest from there. You will then end up with one of the common logic gates. – CL. Jan 31 '18 at 20:41
• When A is HIGH, and B is switched, the output must change! In other words, the output flips whenever you flip any switch. – CL. Jan 31 '18 at 20:47
• @CL. Then what gate do I use? Or gates? I can't figure this out. – JustHeavy Jan 31 '18 at 20:52
• @Transistor I gave it a go, but I do not think it is correct. – JustHeavy Jan 31 '18 at 20:52

Perhaps you live in a land of single-story houses and are not familiar with stairway light switches. The idea is that you can change the state of the light by switching either switch. Here's how they're wired.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Stairway lighting circuit. Note that the logic can be inverted if the wires are crossed over between the switches so there are two possible solutions.

Now back to your truth table ...

• I made an edit above and it resembles an XOR. – JustHeavy Jan 31 '18 at 21:04

To answer my own question, #10 can be done with an XOR (or EOR) gate.

• Correct. You can accept this as being the correct answer even though you wrote it yourself. You can upvote mine if you consider it helped (but I'm not short so don't worry). – Transistor Jan 31 '18 at 21:10