Skip to content

anatom3000/truth_tables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Truth Table

A simple truth table generator.

Usage

python main.py

Note: you can use rlwrap to get prompt history :

rlwrap python main.py

No dependencies are required.

Examples

> a + ~a
| a | - |
| 1 | 1 |
| 0 | 1 |
> a&b <=> (~a+b)
| a | b | - |
| 1 | 1 | 1 |
| 1 | 0 | 1 |
| 0 | 1 | 0 |
| 0 | 0 | 0 |

Syntax

Note: listed by decreasing precedences

  • not: ~a
  • and: a & b
  • or: a + b
  • nand: a | b
  • implies: a => b
  • iff: a <=> b

Parentheses are supported.

About

A simple truth table generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages