Logic Calculator

This simple calculator, the courtesy of A. Yavuz Oruç and JavaScript, computes the truth value of a logic expression comprising up to four variables, w,x,y,z, two constants, 0,1 and sixty symbols (variables, constants, and operators).

Here is how it works:

1. Select the expression (Expr:) textbar by clicking the radio button next to it.

2. Enter an expression by pressing on the variable, constant and operator keys. (Note that the symbols &, |, and ! denote the logical AND, OR and NOT operators. Also, the NOT operator is prefixed (rather than postfixed) to the variable it negates.)

3. Select the variable (Vars:) textbar by clicking the radio button next to it.

4. Enter the values of w,x,y,z, by separating them with ';'s. For example, you set x to 1 and y to 0 by typing x=1; y=0. ( You may use the DEL key to delete the last character you have entered, or the CLR key to clear all three text bars.)

5. Press the EVAL key to see the truth value of your expression.

Note: You can also directly type in your expressions or assignment statements into the expression and variables text boxes. This way, you can use more than four variables and choose your own variables.