#cli #table #truth #generate #boolean #formula

app truth-table

Generate a truth table from a formula

2 unstable releases

0.2.0 Jul 30, 2021
0.1.0 Jun 15, 2021

#1494 in Math

MIT/Apache

21KB
614 lines

This is a very simple command-line tool to generate a truth table based on a given boolean expression.

Examples

$ truth-table "a or b"
a b | a∨b
0 0 | 0
0 1 | 1
1 0 | 1
1 1 | 1
$ truth-table "(a or b) -> c"
a b c | (a∨b)→c
0 0 0 | 1
0 0 1 | 1
0 1 0 | 0
0 1 1 | 1
1 0 0 | 0
1 0 1 | 1
1 1 0 | 0
1 1 1 | 1

Dependencies

~1.5MB