First Digital Logic Circuit

NanyBany

May 15, 2014
12
Joined
May 15, 2014
Messages
12
20140618_220621.jpg So this is my first Digital Logic Circuit and basically what it does is it turns on a LED depending on the decimal value of the 2-bit input. EX. 00 = 0 so no LED's are on, 01 = 1 so the 1st LED is turned on etc. I just wanted to see how I did any positive feedback would be greatly appreciated.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
That looks fine.

You don't need the OR gate. You have A and B, and you have inverters to generate not A and not B. You can just use the three AND gates to detect the three relevant combinations of those signals.

Edit: If you build up this circuit, remember that you need resistors in series with the LEDs.

Suitable ICs for prototyping would be CD4069 or CD40106 for the inverters, and CD4081 for the AND gates. Or you could use 74HC04 or 74HC14 for the inverters and 74HC08 for the AND gates.
 
Last edited:

Ehsan

Jun 12, 2014
100
Joined
Jun 12, 2014
Messages
100
That is cool ! Your next step should be to buy the real 74xx ICs , two switches and two LEDs and build the circuit on a breadboard. ( get a 5v DC adapter also)
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
When delving into digital design, instead of relying on 'inspirational creativity' for a solution, one should learn the most common digital design procedures that will always guarantee a correct solution. These are: Truth Table, Karnaugh Map, & NAND/NOR gate implementation. I have attached a PDF which shows how to use these procedures to solve this problem and implement the solution with NOR gates.

3led-nor-png.13659


The use of the Truth Table and Karnaugh Map are well-documented through Google. While this particular LED project is almost too simple to bother with a formal design procedure (no K-map minimization was even necessary), it would have prevented the mistake of the extraneous OR gate. Implementing the design as shown with NOR gates relies on the use of negative logic, i.e. realizing that an OR gate with negated inputs is the same as an AND gate with negated output (NAND) while an AND gate with negated inputs is the same as an OR gate with negated output (NOR). So inversion circles are selectively added to a pure logic diagram to achieve a NAND/NOR design. Two inversion circles may be added to any logic signal line while an existing inversion may be moved from one end of the signal line to the other (a negated logic variable may be shifted to invert a gate input). Negative logic may not be very intuitive but the procedure tends to not be error prone. Give it a try, you will like it.
 

Attachments

  • 3LED-NOR.png
    3LED-NOR.png
    10.6 KB · Views: 740
  • 3-LED_Switch.pdf
    28.3 KB · Views: 82
Top