# Desperately need help with logic project

#### Deleted member 289596

Joined Dec 31, 1969
0
I am trying to get this project done. Basically what we have to do is design a controller for a 7 segment display (numbers 0-9 display) using all nand gates and 2 3-8 decoders on a breadboard. I also have to do this on quartus (computer simulating program).

Basically I came up with this equation A+C'D'+BC'+BD', then I put it in terms of not-and-or gates, but now I am having trouble with transferring it to all NAND gates. I also am not sure how to implement this WITH the 2 decoders afterwards.

Is anyone able to help me? I can show you my work I've done by hand and on my computer via quartus.

#### WBahn

Joined Mar 31, 2012
29,878
You definitely need to show your work in order to get assistance.

What do you A,B,C,D signals represent? Don't force us to read your mind.

What is the output of that equation supposed to be? It's a single signal but you need seven signals, right? Again, don't force us to read your mind.

I'm pretty sure that the point of the decoders is for you to recognize that, combined with an OR gate afterwards, that you can implement an arbitrary function of three variables with a 3-8 decoder. With a bit of "glue logic", you can use 2 3-8 decoders to implement any arbitrary function of 4 variables.

But that will only get you the logic for one of the seven segments.

#### Deleted member 289596

Joined Dec 31, 1969
0
Sorry my question was kinda all over the place lol.

Basically there's gonna be ABCD as input and F as an output. The F is that part of the 7 segment LED and that's all I have to worry about for now. You can see it in the picture, along with the full directions for the project. So far I've done a lot, but converting it to all NAND gates is what's getting me. Then I'm not sure how to make the 4-16 decoder out of the two 3-8 decoders. My goal is to make the A+C'D'+BC'+BD' function in 8 or less NAND gates so that I can use only two 7400 chips on my breadboard. I'm just kind of confused right now.

#### WBahn

Joined Mar 31, 2012
29,878
Getting it done with just 8 2-input NAND gates is going to be challenging (without looking at the specifics, it looks like it will not be possible -- but sometimes you can play clever ad hoc logic games with specific logic functions).

Let's look at the decoder approach.

First, do you understand how to use a since 3-8 decoder along with some glue logic to implement an arbitrary function of three inputs? If so, describe how you would do it.

#### Deleted member 289596

Joined Dec 31, 1969
0
Yea I found out that it's better to do the two parts separately, so since the first part is figuring out the nand construction, I'm gonna do that part first.

Since I'm doing it first, I'm gonna just use as many nands as I want. Right now I'm using 8 2 inputs and 1 4 input. I basically make each component of the equation separately, then I try joining them together in an or simulation .

A goes in its own nand
BC' goes in another
BD' in one
C'D' in one

Then I put them all 4 into a 4 input nand. That should simulate addition right? But it's not working.

#### WBahn

Joined Mar 31, 2012
29,878
How are you getting C' and D'?

#### Deleted member 289596

Joined Dec 31, 1969
0
I just figured it out actually lol. Now I need to do the 2 3-8 bit decoder part. I'm not sure how to start this. I know that I have to make this into a 4-16 bit decoder

#### WBahn

Joined Mar 31, 2012
29,878
I just figured it out actually lol. Now I need to do the 2 3-8 bit decoder part. I'm not sure how to start this. I know that I have to make this into a 4-16 bit decoder
You could start by understanding how to make a 4-16 decoder out of two 3-8 decoders and some glue logic, or you could start with understanding how to use an N-2^N decoder and some glue logic to implement an arbitrary function of N inputs. These are largely separate and distinct problems. So pick one and then think about what you need and what you have to work with.

#### Deleted member 289596

Joined Dec 31, 1969
0
Once again, I ended up figuring it out lol. I have a tendency to get really stressed and ask a lot of questions that I answer a little while later lol. Thank you for the help!

#### WBahn

Joined Mar 31, 2012
29,878
Once again, I ended up figuring it out lol. I have a tendency to get really stressed and ask a lot of questions that I answer a little while later lol. Thank you for the help!
That's perfectly fine. I've used a number of similar tactics over the years. At times when I had a problem I couldn't figure out I would explain it, in painstaking detail, to my dog. Often, in forcing ourselves to explain it to someone else in clear detail we spot the key point that was eluding us.