GDEF*INE –

This is the command to define a gate for the program’s use.
‘Gat?’ asks for each gate you wish to define individually.

Note; If the gate is going to take more than one line to define, then at the end of the line you are entering type a ‘&’ . This will tell the program that you wish to continue the present definition on a new line. In this case the program will prompt ‘Nxt?'  for the next line of the definition. A gate definition can be up to seven lines long.

A gate for this program is nothing more than a Boolian expression using the constraint or gate as the variables. Any constraint or gate that is referenced should have been previously defined.

gat -name : (\c-nam\ b-op \c-nam\) b-op ((b—op \c-nam\) b-op \c-nam\)
gat-name-- The name of the gate, terminated by the : symbol
c-nam-- The name of the constraint or gate whose truth value you wish to use.
b-op-- The Boolian operation you wish the program to perform

Gates as used here require some additional explanation. Aside from the symbol \ which is used to tell the program that there is a constraint or gate name present, there is no set format to type the equation.

The valid Boolian operators and their requirements are;

Operator             Format                 Result

NOT or N           NOT op1             Returns a Boolian NOT result
NAND                op1 NAND op2   Returns a Boolian NAND result
AND or A           op1 AND op2      Returns a Boolian AND result
NOR, op1           NOR op2             Returns a Boolian NOR result
EOR or E           op1 EOR op2       Returns a Boolian exclusive OR result
OR                     op1 OR op2          Returns a Boolian OR result

The operators are listed in order of priority. This means that the paired gate definitions below will have the same result.

G One : \C One\ NAND \C Two\ OR \C Three\ NAND \C Four\
G One : (\C One\ NAND \C Two\) OR (\C Three\ NAND \C Four\)
G Two : \C One\ NAND NOT \C Two\ NOT AND \C Four\
G Two : (\C One\ NAND (NOT NOT \C Two\)) AND \C Four\
G Thr : NOT \G One\ NAND NOT \C Two\ OR NOT (\C Three\ AND \C Four\)
G Thr : ((NOT \G One\) NAND (NOT \C Two\)) OR (NOT (\C Three\ AND \C Four\))

The above are boolian algebraic equations. The examples shown above introduce the fact that the use of parentheses are permitted. With the use of parentheses it is possible to override the default priority.

Example G Thr shows that a gate can use the truth value of another gate. This is allowed as tong as the gate given has already been defined.

Important; An examination of G Two will show that the gate is faulty. There is a NOT immediately followed by an AND which is incorrect. In these cases, the parse will assign the NOT to the previous operand (as shown in the second version of G Two).

The parse subroutine that is used will try to parse any algebraic equation that is given to it. Due to the time and size limitations, the parse subroutine will attempt to read in any equation and use it (G Two is an example). But the parse subroutine will not issue an error message. This is one of the few places that the program does not catch the user errors immediately so users BEWARE.