NOT16

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

NOT16

MrPostnikov
Hello, I am not sure if this was asked before, but I am not finding the same question that I have.

Some context...

After understanding some basic gates I built them like instructed out of nand everything worked fine.

However, when I started to build NOT16 and the other ones, I was a bit confused, the only solution I could come up with, was this...

Not(in=in[0], out=out[0]);...0 to 15 like it said.

I tested this and it seemed to have worked.

However, when I read the introduction again, it asked us to make EVERYTHING from nand gates.
I looked around and found people just simply implementing nand gate based on what you made the not gate out of.

That is nand(a=a[0], b=b[0], out=out[0]);

I don't feel as though my way is exactly wrong, however, is the not gate being used here the one that is supplied with the book, or is it using the one I made out of nand gate?

Am I doing something wrong?

EDITED: spelling

Reply | Threaded
Open this post in threaded view
|

Re: NOT16

WBahn
Administrator
I'm not completely sure I follow what you are asking, but let's see if this is close.

Once you make a Not gate using nothing but Nand gates, you now have two gates that you can use for building future gates and circuits.

If you were to use a Nand and a Not to make and And gate, you now have three gates in your toolbox.

This approach is essential, both from an educational standpoint and from a practical standpoint. You use smaller parts to make larger parts. Then you use those larger parts to make even larger parts.

You will find that, at the top level when you are making your entire computer, you will only have a few parts in it.

If you think about it, this IS making everything out of Nand gates (well, pretty soon you will also use DFF parts as primitive building blocks). You are just putting some Nand gates in a black box and then labeling that box as a Not or an And or Mux, or an ALU, or a CPU. But if you open up one of those boxes, you will only find other boxes and, possibly, Nand gates (and DFFs eventually). After you open up all the boxes within the boxes, you will have found nothing but Nand gates and DFFs.

You can actually make the DFF out of Nand gates, too, but that is a bit beyond the scope of the course and the simulator can't handle the kind of feedback that is required to make them work correctly, so they just make the DFF available and the simulator knows what to do with that part, just like it knows what to do with a Nand gate.
Reply | Threaded
Open this post in threaded view
|

Re: NOT16

MrPostnikov
Thank you.

although you may not think so, this answers my question.

That is the way I thought about it as well. If I made the basic gates out of nand then I feel like I should be able to use it.

I also visualized that what I was doing is that, if I opened up the black box say NOT gate, I would see a "nand gate" A bit more complex than that but I understand the basics.