Truth Tables for Programmers
This is a truth table generator to go with
Logic for Programmers. It follows syntax from the book, meaning:
- Use
&&, ||, and ! for "and", "or", and "not"
- Use
=> for implication and == for equality
- T and F are "True" and "False", all other alphanumeric tokens are variables
- Does not support sets or quantifiers
Precedence order (highest to lowest): (), !, &&/||, =>, <=>/==. Check "Show all groupings with parenthesis" if you're not sure.
You can compare the outputs for two expressions by separating them with a comma, like
P && Q,P || Q.