Contributed by Yong Bakos
20 Dec 2009
[Original forum thread]
I created a worksheet to help guide my students to realize that combining four simple Boolean/binary operations (zeroing, bitwise negation, summing, anding) in a two's complement number system can yield eighteen functions (per figure 2.6).
This is to help assert the path of using the simple operations as mentioned in the implementation hint on page 39, as opposed to just diving in trying to implement the higher-level functions as they know them. For example, a student may try to use Inc16 to implement x+1 rather than using the combined simple operations in figure 2.6. Although this may be possible, I want to be sure the student embraces the underlying design of the ALU and has a nice "Aha!" moment.