It is a logical calculator made in Java to evaluate logical expressions
- The operators and operands are comma (,) separated
- The binary operators operate on the last two operands
- The unary operators operate only on the last operand
- The operators are reserved, therefore they are not used as operands
- The false and true are reserved and operate like yours truth values
Operators |
Description |
~ |
Negates |
^ |
AND |
v |
AND/OR |
=> |
Conditional |
<=> |
Biconditional |
Operand |
Description |
false |
Always False |
true |
Always True |
Input |
Equivalent Expression |
Output |
p,q,^ |
p ^ q |
undefined |
false,~,p,v,true,^ |
(~false v p) ^ true |
tautology |
p1,q1,v,~,p1,q1,v,^ |
~(p1 v q1) ^ (p1 v q1) |
contradiction |
s,t,~,v,s,t,=>,<=> |
(s v ~t) <=> (s => t) |
undefined |
a,~,b,v,a,b,=>,<=> |
(~a v b) <=> (a => b) |
tautology |