-
Notifications
You must be signed in to change notification settings - Fork 0
Equation Syntax
A logic equation in Logic Friday has the form:
<output> = <expr>;
<output> and the input variables must contain from 1 to 8 characters. All characters are legal except the operators (see below) and the following symbols:
@ # " \ { } = , (comma)
Note that variable names are case sensitive; 'A' and 'a' are different variables.
<expr> may contain the following operators:
| ( ) | grouping |
| & or * or juxtaposition | boolean AND |
| | or + | boolean OR |
| ! (prefix) or ' (postfix) | complement |
| != or ^ | exclusive-OR |
| == | exclusive-NOR |
Examples:
f = a' b c' + a c;
F = A(!B|!C);
f = (a&b + a&c)';
LED1 = SW1*SW2 + SW1*SW3';
Variable order
By default, when you enter an equation variables are assigned to the truth table in the order they are encountered reading left to right. You can override this behavior with the INORDER and OUTORDER keywords. Syntax:
INORDER = <input variable list>;
OUTORDER = <output variable list>;
Example:
F1 = A C + B D;
F0 = A + C D;
INORDER = A B C D;
OUTORDER = F0 F1;
The arrangement of variables in the truth table will be
A B C D => F0 F1.
Notes:
- If juxtaposition is used for AND, the variables must be separated by white space or an operator.
- For functions with multiple outputs, each equation may be entered on a separate line by using CTRL+ENTER to advance a line.
- Equations generated by Logic Friday always use juxtaposition for AND, + for OR, and '(postfix) for complement.