Creates a graph whose nodes are all $2^n$ tuples in
${0,1}^n$, e.g. for n=3: 000, 001, 010, 011, 100, 101, 110,
111, and whose directed edges connect two nodes if the end node can
be obtained from the start node by turning one 0 into a 1 (if
up=TRUE) or one 1 into a 0 (if up=FALSE).