Truth Table Solver

It's useful to check out truth statements quickly, so this tool can help you. Solves standard boolean algebra truth tables. It is best if identifiers are single letter upper case.

Results

P  Q  |  ~  (  P  |  Q  )  <->  (  ~  P  &  ~  Q  )
---------------------------------------------------

0  0  |  1     0  0  0       1     1  0  1  1  0     
0  1  |  0     0  1  1       1     1  0  0  0  1     
1  0  |  0     1  1  0       1     0  1  0  1  0     
1  1  |  0     1  1  1       1     0  1  0  0  1     

Examples

De Morgan's Law (Wikipedia)

Usage

Operators in order of evaluation. All identifiers must be uppercase.

  1. 1: true
  2. 0: false
  3. ~: not
  4. +: xor
  5. &: and
  6. |: or
  7. ->: if
  8. <->: equivalence
  9. /: separator

Implementation

This truth table generator is written in ruby by Samuel Williams. It uses a unique parsing algorithm which supports arbitrary complexity operators, precedence and runs in linear time.

The source code is available here.