4-variable-simplifier/README.md
2025-07-17 11:59:03 -05:00

790 B

4 variable boolean simplifier

Boolean simplifier uses brute-force to generate all simplest expression trees for any 4-variable truthtable. It's pretty cool! And it has a repl! and it has colors! It uses dynamic programming to run in reasonable time.

The python script takes 6 hours, the C program takes 30 seconds.

By default, the program will simplify/re-write the given expression(s) using only "or", "and" and "not" operators. You can tell it to use all supported operators ("xor", "xnor", "nor", "nand", etc.) using -e. Or, you can explicitly control which operators to use using -o. Ternary takes a long time, so it is not included in -e, you have to speficially request it using -o. Out of the box, it'll have to build it's cache, you can use -B to force a rebuild.