Generating the look - up table while pre - processing
#define P2 ( n )  n, n ^ 1, n ^ 1, n NEW_LINE #define P4 ( n )  P2(n), P2(n ^ 1), P2(n ^ 1), P2(n) NEW_LINE #define P6 ( n )  P4(n), P4(n ^ 1), P4(n ^ 1), P4(n) NEW_LINE #define LOOK_UP  P6(0), P6(1), P6(1), P6(0)