Gates

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

Gates

Mustard
Hello, I was just wondering if could get some clarification. I am aware you have to start with a just the nand gate. So w/ the survival guide in mind it would be," Nand(a= ,b= ,out= );" ? I'm new to HDL so I was wondering if you would have to go about making the Not with the Nand going down the truth table and setting if and else statements ? or am I overthinking this ? Any help is much appreciated, thanks
Reply | Threaded
Open this post in threaded view
|

Re: Gates

WBahn
Administrator
What 'if' and 'else' statements?

The HDL is purely structural. You instantiate gates and then wire them together with named wires.

Have you read Appendix A?

If not, you need to do so. It should give you a good start.
Reply | Threaded
Open this post in threaded view
|

Re: Gates

xedover
In reply to this post by Mustard
HDL is not a programing language. Its literally a "Hardware Description Language".

It describes the hardware. So think about real hardware, real chip and IC circuits, and connecting wires.

What you are describing/building are chips, and the inputs (a=, b=) and outputs (out=) are the "names" of the wires to connect to other parts ("chips").

So, you want to make a Not gate (one input, "in=" and one output, "out="), using the pre-existing Nand gate (which has two inputs and one output).

Think of the Chip you are creating (the Not gate), as a big empty box. Its connecting wires labeled "in" and "out" are currently dangling, and not connected to anything. What wire(s) would you connect from your Nand gate by putting it inside that box to those inputs and outputs?

Make sense?
Reply | Threaded
Open this post in threaded view
|

Re: Gates

Mustard
In reply to this post by WBahn
Appendix A from the book? I wasn't aware it was vital. I'm about to order it, thanks (:
Reply | Threaded
Open this post in threaded view
|

Re: Gates

Mustard
In reply to this post by xedover
So if the not gate is an empty box, with one input wire and one output wire, and the nand gate is as follows: Nand(a= ,b= ,out= );.  then I would connect both a and b to the input wire? and out with the output?Nand(a=in ,b=in ,out=out ); I'm new to logic gates, is there any supplementary videos or course I should take (besides the videos) in order to understand them more in depth? I know I can probably google images and see them already constructed but I would like to know figure out how I can construct them myself, with my logic.
Reply | Threaded
Open this post in threaded view
|

Re: Gates

WBahn
Administrator
In reply to this post by Mustard
Appendix A is also available from the Nand2Tetris website.
Reply | Threaded
Open this post in threaded view
|

Re: Gates

WBahn
Administrator
In reply to this post by Mustard
That's correct.

You can also tie one input of the Nand gate HI (true) and tie the other to the input. If you really had to make an inverter this way (and sometimes it's the most convenient way to do it) this is the preferred way.

There are thousands (millions?) of websites that provide basic digital electronics tutorials and courses.

Without knowing more about your background and educational level, it's very difficult to recommend anything specific since they range from stuff targeted at middle school kids to stuff targeted at graduate students coming from a non-EE background.

Try Googling something like Digital Electronics Basics and you will get LOTS of hits. Peruse some of them and see if you can find something that is at a useful level for your needs.
Reply | Threaded
Open this post in threaded view
|

Re: Gates

xedover
In reply to this post by Mustard
The authors of this course have created, and illustrated the Xor gate as an example for you already, including illustrating it as I have described. See the course material (slides, videos, book links, etc.)

However, you won't be able to create your own copy of the Xor gate, until after you first create the other component parts.
Reply | Threaded
Open this post in threaded view
|

Re: Gates

xedover
In reply to this post by Mustard
Links to the Appendix A are on the website: https://www.nand2tetris.org/project01