Re: 1.1.1 text elaboration request

Posted by cadet1620 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/1-1-1-text-elaboration-request-tp3829880p3830114.html

linuxford wrote
Let me try to be a bit more precise. 1. Canonical representation - I got the fact that and-ing bears uncanny resemblance to multiplication and or-ing to addition. Curious about the picking function formulation of f(xyz) = ~xy~z + x~y~z + xy~z. I understand how you determined to pick the formula but curious why this works.

2. Two-input boolean function - I'm wondering why it works out to be 2^2^n

1. The first row in figure 1.1 that has a 1 as its output requires that x=0, y=1, z=0. If x=0 then ~x=1. So for this row in the truth table ~x=1, y=1, ~z=1, so anding them together results in 1. ~x y ~z will only be 1 for this combination of inputs.

The other two and terms work similarly.

These terms that generate 1 for the required rows are ored together so that the function will output 1 if and only if one of the row selecting and terms has detected its correct combination of inputs.


2. For n input variables, the truth table will have 2n rows. Since there are two choices for the output value for each of these 2n rows, the number of combinations is 2(2n).

--Mark