# Logic Circuit help

Dec 8, 2016
12
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:

#### davenn

Moderator
Sep 5, 2009
14,142
I think i've figured out the truth table, but maybe wrong.

post your result and some one better at digital than me can check it

#### Laplace

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

Dec 8, 2016
12
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.

#### (*steve*)

##### ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
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.

Dec 8, 2016
12

#### Laplace

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

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
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.

Dec 8, 2016
12
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:

#### davenn

Moderator
Sep 5, 2009
14,142

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

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
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.

Dec 8, 2016
12
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.

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?

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
n all honesty, I understood that you said to go back to the truth table and look at the Inputs,
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?

However, could you tell me whether the the circuit is correct?
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.

Dec 8, 2016
12
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.

Here it is:

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
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?

Dec 8, 2016
12
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?

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

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

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
The green LED is identical to input A
You finally got it!

And the Green LED and Red LED are complete opposite to each other apart from #0
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:
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.
You'll stil have to perform these parts of the task.

#### Harald Kapp

##### Moderator
Moderator
Nov 17, 2011
13,062
also got this, this MAY NOT be correct, please tell me if it is or not.
Doesn't look like it's doing what you expect. Check for yourself by writing down the truth table.

Dec 8, 2016
12
I have no idea how to test my circuit to see if it matches the truth table.

And is it the And gate?

Replies
17
Views
4K
Replies
2
Views
1K
Replies
10
Views
6K
Replies
3
Views
6K
J
Replies
16
Views
811
Rich Grise
R