Bored at work. Perfect boolean-algebra simplifier. 30-second to 6-hour startup time.
Find a file
2025-07-21 20:26:09 -05:00
.envrc added flake files 2025-06-11 13:30:43 -05:00
.gitignore added bin/ to .gitignore 2025-07-21 20:26:09 -05:00
flake.lock added flake files 2025-06-11 13:30:43 -05:00
flake.nix added flake files 2025-06-11 13:30:43 -05:00
main.c added disabling autowrap 2025-07-17 11:27:08 -05:00
main.py added c implementation, which is MUCH faster! 2025-06-10 20:51:47 -05:00
makefile added printing stats 2025-07-17 11:20:48 -05:00
README.md added README for new users 2025-07-17 11:59:03 -05:00
setup.sh added setup.sh for new users 2025-07-17 11:50:07 -05:00

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.