In this unit we're going to describe all the chips that you have to build in Project 2, and give you some guidelines on how to actually implement them. So when you set out to build the chips of Project 2, you can certainly use all the chips that you built In Project 1, you know these are the fruits of your hard labor. So you can suddenly plug them into your HDL implementations. And using these building blocks, you now have to build the following five chips ranging from HalfAdder all the way to ALU. Basically this is a family of combinational chips, from simple adders to more complex ones. So, let us start with the simplest chip in this family, the HalfAdder. The HalfAdder takes two bits, and adds them up, and outputs both the sum of these two bits and the carry bit, which may be either 0 or 1. This is the truth table of the HalfAdder, and here is the stub file of this chip. And if you look carefully at this at this truth table, you will realize that the sum and the carry columns are identical to the outputs of two gates that we have already built in project one. So, this tip is sufficiently, I think, helpful to let you understand that building this gate is a rather trivial thing. You have to pick up two gates that you already built, plug them in in some way, and what you get is a HalfAdder functionality. Which is kind of interesting because we use a logical device to affect something which is semantically an addition operation, something that happens all the time when you do digital design. The next chip up the hierarchy is called FullAdder and FullAdder is slightly more powerful than the HalfAdder. It is capable of summing up three incoming bits, so to speak and it outputs the same thing, the sum of the three bits and the carry. This is a truth table of the FullAdder. This is the stub file that we have to complete. Now in general you can build a FullAdder using two HalfAdders. Which you can put together and add some glue in, in the form of some other logic gates that combine the operations of these two HalfAdders. And this by the way is the reason why this gate is called a, a half adder. Not this one but the one we saw previously because it takes two half adders, in addition to some other functionality to deliver the functionality of a FullAdder. By the way, this is not the only way to implement the FullAdder, you can do it in other ways. So you're welcome to to come up with any hdl implementation that makes sense. The next shape that we'd like to talk about is a 16-bit adder. We begin to see some industrial strength addition, so to speak. This is the the stub file. And if you think about it, it can be built quite easily from a sequence of of 16 regular adders or 16 full adders. So you put these 16 adders, one next to the other and you can pipe the carry bit of one adder to one of the inputs of of the next adder up the significance ladder, so to speak, going from right to left. And notice that that according to the chip specification, the most significant carry bit is simply ignored. Moving along the next chip is called a incrementor. It's a simple version of an adder. It takes a single input called in, it adds 1 to the incoming value and delivers the result. The stub file is straightforward, and you can build such an incrementor using the chips that you built already. In doing so, I just want to remind you that in HDL, you can represent a single bit value, 0 and 1, using the keywords false and true, respectively. Finally we get to the most interesting chip in this project, the ALU. And we talked about the ALU to great detail in the previous unit, but just to repeat the main functionality of the ALU, I'm giving you this section of the stub file that you will get from us, which documents what the ALU is supposed to do. Once again, all the operations here are straightforward. We've done them before using previously implemented chips. So now you have to put together all this functionality in order to deliver the required ALU functionality. Two useful hints. I hope you can build this ALU using a 16-bit adder and various chips that you built in Project 1. And finally, you can you can do all the above, you can build all this functionality with less than 20 lines of HDL code, which is another manifestation of the simplicity and elegance of this non-trivial chip. In terms of resources you have to go to the NAND to NAND to Tetris website and get the full description of the of Project 2. Once again I want to remind you that if you have downloaded the course, software suite, there is no need to download anything else during the course. You now have a directory on a computer called, projects/02, which includes all the files which are necessary for Project 2. There are a few more resources that I described in in project one, which are relevant to this project also. So finally some best practice advice, much of it repeats what I said in project one, so I don't want to read it aloud, but you certainly have to go through it before you set out to work on the project. Now there's something new that we have to say about Project 2. The best practice advice is not to use your HDL implementations and instead use their built-in versions which are automatically available when you use our hardware simulator. So let me repeat and explain how we do it. If you look at your Project 2 files you will see that they include only six chips, beginning with a half adder and ending up with an ALU. And yet I just told you that you're welcome to use previously defined chips like end or mooks or so on. You can use these chips precisely because they are not listed, they are not available in your Project 2 directory. Because the simulator works in such a way that if it tries to evaluate the chip part and it doesn't find it in the current directory, it reverts to using its, built in version of, of this chip. So, this setting is ideal for our purposes. You just use the chips that we gave you, and you use any previously defined chips as chip parts, and, the simulator will kick in and use the automatic versions whenever it's necessary. So, this has been an overview of Project 2 and all the chips that you have to, to build in this, in this project. And the next unit, as usual at the end of each week, will be perspective in which we'll give you some more information about combinational logic, and about ALU use of other computers and so on.