architecturebinarysystemboolean-logicnand2tetris

Boolean Logic - Two Input Boolean Functions - Truth Table function's output clarification


I do not understand the truth table (Figure 1.2) function's output (the four right columns) The function input variables (x and y) have bold numbers to the right of them, that I am not sure how to use, and i just do not understand how to work this truth table.

These sentences are the text that is not seen in the image : "These functions were (FIGURE 1.2) constructed systematically, by enumerating all the possible 4-wise combinations of binary values in the four right columns. Each function has a conventional....

enter image description here

I have grasped naming of the functions ( what Nor, Xor etc mean) but regrading the binary I am out of ideas, I have tried in some ways I can't explain but it was obvious i am missing the point.


Solution

  • Each of the rows in the chart represents a different boolean function, like AND, OR, XOR, etc.

    There are two input values X and Y, each can be 0 or 1, so there are 4 possible combinations, thus the 4 value columns in each row. From left to right, these show the value that is generated when:

    (X=0,Y=0) (X=0,Y=1) (X=1,Y=0) (X=1,Y=1)

    For example, the AND row in the table lists values 0, 0, 0, 1. This means that X AND Y is 0 for the first 3 possibilities, and 1 for X=1,Y=1.

    The XOR row lists values 0 1 1 0, because XOR is 1 when X != Y.

    Similarly, the Equivalence row is 1 0 0 1, because Equivalence only outputs a 1 when X=Y (and is thus the inverse of XOR).

    Hope this helps.