# Logic Circuit help

Discussion in 'Electronics Homework Help' started by Madz2007, Dec 8, 2016.

12
0
Dec 8, 2016
Hey guys,

Before i post what i need help with, i'll leave my skype if anyone would be kind enough to help me 1 on 1 please do

Skype: Live:mahdi.rajabi_2

Im having some problems figuring how to make this logic circuit.

This is the problem:

https://gyazo.com/1e4e58b73e6ec4881f1b8f1c6682cf66

I think i've figured out the truth table, but maybe wrong.

Last edited by a moderator: Dec 8, 2016
2. ### davennModerator

13,802
1,941
Sep 5, 2009
post your result and some one better at digital than me can check it

3. ### Laplace

1,252
184
Apr 4, 2010
The number is odd only and always when the "1" input is HI, A= 1. The number is even when either the "2" or "4" or both inputs are HI and the "1" input is LO. So the green LED is identical to input A. The red LED is HI when either B "2" OR C "4" are HI, AND A "1" is NOT HI. That is how you get 3 logic gates AND, OR, & NOT for your design. This is a trivial logic design that does not require design tools, so the object is not to get the solution but rather to demonstrate ability to use the design tools, to convert a problem statement to a truth table, to convert a truth table to a logic function, to transfer a truth table to a K-map, and to minimize a K-map.

12
0
Dec 8, 2016

5. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,482
2,830
Jan 21, 2010
Post the details here or I will close the thread. We aim to answer questions both for you and for anyone who comes along later with a similar problem.

If you can't play your part you may find that we won't spend a lot of effort helping you.

12
0
Dec 8, 2016
7. ### Laplace

1,252
184
Apr 4, 2010
Looks good to me. I like to use index numbers for the truth table, and mark as much information as possible on the truth table. See attached image. On my K-maps I also put little index numbers in the corners of the boxes. That makes it easier to transfer the contents of the truth table onto the K-map.

8. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
Laplace has given you a nice table to work with.

The 'logic' for ODD is ridiculously simple as can be seen quickly from Laplace's table.

The logic for EVEN would also be very simple if it weren't for the quirky definition of zero not being EVEN (zero is an even number).
However, compare EVEN and ODD for all numbers except 0 to find a very simple logic for the red LED. Then add a little bit more logic to account for the special case 0.

12
0
Dec 8, 2016
A friend has helped me put this Logic Circuit up, representing that Truth table.

Circuit:

Kmap:

What is the equation for the table? Can someone help me get the formula

Last edited by a moderator: Dec 9, 2016
10. ### davennModerator

13,802
1,941
Sep 5, 2009

It would be really helpful if you would post your images in the forum like I have done for you
it saves people having to load other pages and then flick between pages for their discussion

Dave

11. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
For the Green LED, have a very close look at the input A...

For the red LED, look in the same way at A, then cosider A=B=C=0 as a special case to add the required logic.

12
0
Dec 8, 2016
Ok, i have no idea how to do that, im so rusty at all this, i just got into breadboad and any sort of wiring 4 days ago... So im picking up a lot of stuff at once, but im trying.

In all honesty, I understood that you said to go back to the truth table and look at the Inputs, but i dont know how to write them or anything..

However, could you tell me whether the the circuit is correct?

13. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
O.K., what is the difference between input A and output ODD (green)? If you don't see the answer for the green LED now, I can't help
For the red LED, compare green and red for all numbers 1...7, there's only one logic function that strikes you. only 1!
What will be the output of this logic function for the case A=B=C=0? Obviously not the one expected. So you'll have to add some logic to make the red output 0 for A=B=C=0.
Which logic function can enforce a 0 output (by using one control input) regardless of the state of the other input? It is an elementary function.
What is the logic level on this control input for this case and how can you create this logic level for A=B=C=0 only?

Sorry, I do not have the tiem to draw a schematic from your wiring diagram. Show us the schematic diagram, that's quite another thing.
Also don't forget to label the inputs A, B and C and the outputs red and green.

12
0
Dec 8, 2016

Here it is:

15. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
I meant something like this.
We can live with the schematic from post #14, but it is not ideal.
The chips are 7408?
Where's A, B and C?
Which of D1, D2 is the red one, which the green one?

Whatever the answers, the logic for the green diode is definitely much too complex.
Go back to post #7, compare A and green bit by bit what do you see?

12
0
Dec 8, 2016
Apart from what Laplace already said:

And the Green LED and Red LED are complete opposite to each other apart from #0 i dont know

12
0
Dec 8, 2016
I also got this, this MAY NOT be correct, please tell me if it is or not.

18. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
You finally got it!

Right again, so red = NOT green (except A=B=C=0). Now let's tackle that last obstacle. Which logic gate will force its output (red) to 0 regardless of the input (NOT green) when the other input (what I called control input) is 0? This is an elementary logic function of two input signals and one output signal.

Next task: how can you create a control signal that os 0 for the condition A=B=C=0?

You then have all the necessary building blocks for the solution.

Finally heed Laplace's comment:
You'll stil have to perform these parts of the task.

19. ### Harald KappModeratorModerator

11,310
2,588
Nov 17, 2011
Doesn't look like it's doing what you expect. Check for yourself by writing down the truth table.