December 2001 Commands 7 – 105
Word processing 
with the AND NOT 
command
Syntax: AN (AND NOT)
Operands: B, W, D, K
Action:
Gate the contents of the word accumulator and the operand with AND NOT. 
In accordance with the different data widths of the operands (B = 8 bits; W =  
16 bits; D = K = 32 bits), 8, 16 or 32 bits, respectively, are influenced in the 
accumulator. Thus, bit 0 of the accumulator is gated with bit 0 of the operand, 
bit 1 of the accumulator with bit 1 of the operand, etc. The TNC saves the 
result of the operation in the word accumulator.
Example:
Gate the content of words W4 and W6 with AND NOT, and assign the result 
to word W8. 
Initial state:
Word  W4  = 36 AA (hex)
Word  W6 = 3C 36 (hex)
Word W8 = ?
Function STL Accumulator contents [bit] Operand contents [bit]
31..15 ..................... 7 ................. 0 1 5.......... 8 7............ 0
Load W6 into the 
word accumulator.
L W6 0 ..... 0 0 1 1 1 1 0 0 0 0 1 1 0 1 1 0 0 0111100 00110110
Gate the content of 
word accumulator 
and word W4 with 
AND NOT.
AN W4 0 ..... 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0110110 10101010
Assign the gating 
result to word W8.
= W8 0 ..... 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0001000 00010100