Boolean Expression Solver

truth table with step-by-step sub-expression columns

Loading interactive simulation...

split logic for simpler circuits 🖖

A useful hardware trick: pick the input variable that best separates TRUE/FALSE behavior, implement each branch separately, then multiplex through that input. That's exactly what the information-gain split below computes: it finds the variable whose value reduces uncertainty about the output the most - the same idea decision trees use to choose their first split.

one row for every possibility 🖖

A truth table is simply an exhaustive list: it writes out every possible combination of TRUE/FALSE inputs and shows what the expression does for each. With n variables there are 2ⁿ rows, so each new input doubles the table — 3 variables give 8 rows, 5 give 32. The intermediate columns matter too: they build up each sub-expression in turn, so you can follow the logic one operator at a time instead of trusting the final answer.

32 rows, four billion functions 🖖

Here is the twist: the table for 5 variables has just 32 rows, yet the number of different expressions you can define over them is 2³² = 4,294,967,296. Every distinct way of filling the output column with 0s and 1s is its own Boolean function, and there are 2^(2ⁿ) of them in total. So this modest tool quietly explores a space of more than four billion possible logic circuits — one for each pattern the final column can take.

Example problems