Need pointers creating the And chip

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

Need pointers creating the And chip

Hans
Hi all,

I'm a bit confused when trying to create the And chip...

What am I supposed to put in PARTS: ?

I tried putting And(a=a,b=b,out=out);
Also tried with And(a=in,b=in,out=out);

I'm guessing I should rather put something like if a=b then out=1 else out=0 but I can't understand where and how should I write this in the code??

It's a bummer the solutions are not available anywhere (unless I missed something), they could help us figure things out by ourselves.

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Need pointers creating the And chip

cadet1620
Administrator
It's very important to make the chips in the order listed in section 1.3.

This is because the later chips you make require the use of earlier chips you made.

What you need to put in the PARTS: section of your And.hdl is a combination of Nand and Not parts. Nand is a built-in part, but you need to have built and tested Not.hdl before writing And.hdl.

Not.hdl can only use the built-in Nand part. It will look like this:
CHIP Not {

    IN  in;
    OUT out;

    PARTS:
    Nand(a=something, b=something, out=something);
}
I leave it to you to determine what the somethings need to be.

Once Not is passing its test, then write And using Not and Nand. Hint: Nand is a combined And and Not operation. How do you undo the Not?

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Need pointers creating the And chip

Hans
Thanks, I was following the order of folder project/01

I will create the Not first, thanks!