# How to combine all possible N boolean values?

Is there any simpler formula than

Tuples[{False, True}, 3]


to generate tuples of all combinations of boolean values?

• In what way do you want it to be simpler? That looks like a very simple and efficient way to get what you are looking for. Mar 9, 2015 at 8:32

As said in comments, that's an efficient way of generating combinations. If you want to do something with them, BooleanTable is pretty neat:

TableForm[
BooleanTable[{{a, b, c}, And[a, b, c], Or[a, b, c], Xor[a, b, c], Xnor[a, b, c]}, {a, b, c}],
TableHeadings -> {None, {"Vars", "And", "Or", "Xor", "Xnor"}}]


• that is neat! +1:) Mar 9, 2015 at 12:04

Just to give another way to this goal:

IntegerDigits[#, 2, 3] & /@ Range[2^3] /. {1 -> "True", 0 -> "False"}


;-)