One- and two-input logic operations

There are two distinct one-input logic operations and eight distinct two-input operations. The tables below show the output obtained by performing each of these operations on each possible bit-wise input. The bottom rows indicate the minimum number of nand computations required to perform each operation, proven through exhaustive search. To receive the reward for doing a particular logic function, a digital organism must return the correct values for an entire series of 32 bit-wise problems, including multiple examples of each possible combination of inputs.


  1-Input    Output

A   ECHO NOT
0   0 1
1 10

# nand   0 1

     

 2-Input    Output

A B   NAND AND OR_N* OR AND_N* NOR XOR EQU
0 0   1 0 1 0 0 1 0 1
0 1   1 0 0 1 0 0 1 0
1 0   1 0 1 1 1 0 1 0
1 1   0 1 1 1 0 0 0 1

# nand   1 2 2 3 3 4 4 5

* The order of the two inputs is arbitrary. Thus, the rewards for performing OR_N and AND_N are also triggered by the recipricol operations, in which A and B are reversed.

From the Supplementary Information for an article by Lenski, Ofria, Pennock & Adami on "The Evolutionary Origin of Complex Features" that appeared in Nature (8 May 2003), vol 423, pp 139-144.