# First Digital Logic Circuit

Discussion in 'General Electronics Discussion' started by NanyBany, Jun 19, 2014.

1. ### NanyBany

12
0
May 15, 2014
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.

2. ### KrisBlueNZSadly passed away in 2015

8,393
1,270
Nov 28, 2011
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: Jun 19, 2014
3. ### Ehsan

100
1
Jun 12, 2014
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)

4. ### Laplace

1,252
184
Apr 4, 2010
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.

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.

#### Attached Files:

File size:
10.6 KB
Views:
739
• ###### 3-LED_Switch.pdf
File size:
28.3 KB
Views:
82
KrisBlueNZ likes this.