# Need help with super simple circuit

#### ekafrawy

Joined Apr 11, 2007
6
OK guys/gals here is what I am trying to do.

Right now I have two switches that will go into a logic gate. When either or both switches are broken i want the out of the logic gate to be 1(high) so it turns an LED on.

Now what i'm trying to do is to replicate this circuit but using a lot of gates. Such as and, or, XOR, NOR, inverters, and so on.

I'm looking for examples of this circuit using 3, 4 , and 5 logic gates per example.

thanks!

Eric

#### Papabravo

Joined Feb 24, 2006
16,165
You don't say what kind of switches you are using, but you must be able to define at least three conditions. Closed, open, and broken. Can you explain the difference between "closed", "open", and "broken" for me because I don't see what you are getting at.

A schematic would be most helpful.

#### ekafrawy

Joined Apr 11, 2007
6
The swtches are either open (0v, off) or closed (+5v, on).

When i said broken i meant they are open switches. so no current passes through switch.

#### Papabravo

Joined Feb 24, 2006
16,165
OK, so broken does not mean dysfunctional, it just means the opposite of "make", as in "break" or "make". So the original question was if either switch is broken (open) you want the output to be high. In logic gate terms that is: "A low or a low is a high". If you apply DeMorgan's theorem to that statement you get "A high and a high is a low". This would be a 2-input NAND gate similar to a 74xx00. I don't know the 4000 series equivalent off the top of my head but I'm sure there is one. Is that what you were looking for?

#### Eddy Kurent

Joined Apr 9, 2007
18
When either or both switches are broken i want the out of the logic gate to be 1(high) so it turns an LED on.

Eric
That's easy - a NAND gate does that.

For the rest, study truth tables and Boolean algebra.

#### Attachments

• 7.8 KB Views: 18

#### ekafrawy

Joined Apr 11, 2007
6
Is that what you were looking for?
Today 12:13 PM
Not exactly, Eddy's reply where a Nand gate would accomplish the task i am looking for. But I want to have the same output a NAND gate would produce, except i want to use about 4 or 5 different gates, such as NAND, OR, XOR.

So instead of using just 1 NAND gate. I'd like to see an example of a more complex circuit that does the exact same thing.

Eric

#### Papabravo

Joined Feb 24, 2006
16,165
I suppose that circuits can become more complex by adding useless and redundant terms, but that kind of thing is rather trivial. If you are asking about the implementation of a logic function such as a NAND with another kind of gate then apply deMorgan's theorem to see an alternate view.

A NAND or a NOR gate can be used as an inverter if both inputs are tied to the same signal source. You can get to three gates by running each switch through an inverter implemented with a NAND or a NOR and taking the two outputs of the inverters to the two inputs of a OR gate. This three gate combination will have the same truth table as the NAND gate alone.

If you want complexity why not move on from two variables to four or more. The complexity builds very fast when you implement a multiplexer or a decoder, or an ALU with Carry lookahead. If combinatorial circuits still don't do it for you then try finite state machines in the Moore or Mealy configuration. Still not exhausted, then try a finite reversible pushdown automata, or FRPDA as we used to call 'em.

#### Dave

Joined Nov 17, 2003
6,970
OK guys/gals here is what I am trying to do.

Right now I have two switches that will go into a logic gate. When either or both switches are broken i want the out of the logic gate to be 1(high) so it turns an LED on.

Now what i'm trying to do is to replicate this circuit but using a lot of gates. Such as and, or, XOR, NOR, inverters, and so on.

I'm looking for examples of this circuit using 3, 4 , and 5 logic gates per example.

thanks!

Eric
Why don't you try and implement the NAND gate at transistor-level? Otherwise, if you are looking to waste gates, why don't you implement some Latches to latch the data into and out of your NAND gate? Latches use a few gates.

Dave