Re: ALU part
Posted by cadet1620 on Mar 02, 2013; 11:59pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/ALU-part-tp4025145p4026407.html
Recapping for people seeing this thread for the first time:
Figure 2.5 is the definition of the ALU. This is what you want to use to build your ALU.
Figure 2.6 isn't really a truth table, it's what I would call a function table. It lists what functions are computed by an ALU following the design presented in figure 2.5. Its main use is for specifying what instruction bits need to be set for various computations. You need to know what computations are available when you learn assembly language programming in chapter 4. You need to know the exact bit combinations when you write an assembler in chapter 6.
It is possible to build an ALU from the function table, but as Justin says, it's a daunting task. I did see one student's ALU that had individual circuits for each unique computation and a hierarchy of multiplexers that used the control bits to select the correct function. This was a HUGE hdl file.
--Mark