0
\$\begingroup\$

I'm totally lost and I've got no idea what to search to help find this. Basically I have two inputs [A,B] Where A represents the number 1 and B represents the number 2. I'm trying to make it so when 1 is "on" It turns on a little LED, and when two is "on" it turns a seperate LED on. I've got that, but I want to add an AND gate to make it so when both are on it turns a new LED on and the other two turn off. I've tried using a XOR gate & and gate but it can't differentiate the two signals, [1,2] Hopefully I can finally understand this. I'm currently using Logism to make it easy to see and understand. Thanks.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Think of this as 3 separate problems, one for each of the LEDs. Write a truth table for each one, giving the output for each combination of inputs. \$\endgroup\$
    – The Photon
    Commented Mar 6, 2016 at 3:16

3 Answers 3

3
\$\begingroup\$

Try this

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ mine's prettier :P \$\endgroup\$ Commented Mar 6, 2016 at 3:38
2
\$\begingroup\$

A Simpler Way?

Given you haven't specified what rail the LEDs are connected to, it is actually possible to implement the solution showed by both @WhatRoughBeast and @RobhercKV5ROB (both are the same circuit effectively), using just three 2-input NAND gates:

schematic

simulate this circuit – Schematic created using CircuitLab

Basically the LEDs are wired up to act as inverters - if the output is high, then the LED is off. This allows all the gates to be transformed into NAND gates.


Fun facts:

This is also the most optimal way to design it using 7400/4000 series ICs (just one!).

It can also become the most optimal at the transistor level - by stripping away unused parts of the NAND gates, it could me made using just 5 NMOS transistors!

\$\endgroup\$
1
\$\begingroup\$

You can accomplish this easily with 3 AND gates & 2 inverters. Here's a schematic example:

schematic

The 3 AND gates turn on the LEDs. The 2 inverters turn off both the 'single' LEDs if the center 'dual' LED is lit due to 1=2=on

\$\endgroup\$
3
  • \$\begingroup\$ You beat me by 3 seconds. And mine is clearer. \$\endgroup\$ Commented Mar 6, 2016 at 3:39
  • \$\begingroup\$ @WhatRoughBeast yeah, I'm on my cell...no access to CircuitLab (& I'd have beaten you by 2 minutes if I didn't have to reboot the stinkin' thing to get the img to upload). \$\endgroup\$ Commented Mar 6, 2016 at 3:44
  • \$\begingroup\$ You do not need two inverters. Both of them are doing the same thing so one could be pulled out. \$\endgroup\$ Commented Mar 6, 2016 at 4:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.