Truth Table for Two Variables
| > | restart: |
Enter your choice of compound statement after f: For connectives use: not, and, or, implies.
| > | f:= |
| > | TT:=Array(1..5,1..3): |
| > | T:=true: F:=false: |
| > | prop:=convert(f,string): |
| > | TT[1,1]:="p": TT[1,2]:="q": TT[1,3]:=prop: TT[2,1]:=T: TT[2,2]:=T:TT[3,1]:=T:TT[3,2]:=F:TT[4,1]:=F:TT[4,2]:=T:TT[5,1]:=F:TT[5,2]:=F: |
| > | p:=T:q:=T:TT[2,3]:=evalb(f): p:=T:q:=F:TT[3,3]:=evalb(f): p:=F:q:=T:TT[4,3]:=evalb(f): p:=F:q:=F:TT[5,3]:=evalb(f): |
| > | TT; |
| > | T:='T': F:='F':p:='p':q:='q':f:='f':prop:='prop': |