NOT
Binary Inversion
This string function returns the logical inverse, bit-by-bit, of a string expression.
Syntax
Section titled “Syntax”NOT (string-value [,ERR=line-ref|,ERC=error-code])string value- is any valid string.
line-ref- is the program line number or label to branch to if an error is produced by this function.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”The NOT operation outputs a 1 if the evaluated bit is 0 and outputs a 0 if the evaluated bit is a 1.
This operation is often referred to as a ones-complement operation.
Examples
Section titled “Examples”NOT ("A")returns the inverse of 0100 0001 which is 1011 1110.
LET NULL_STRING$ = AND(STRING$,NOT(STRING$))assigns a string of null bytes (0000 0000) equal to the length of STRING$ to NULL_STRING$.
LET HIGH_VALUE$ = XOR(STRING$,NOT(STRING$))assigns a string of high-value bytes (1111 1111) equal to the length of STRING$ to NULL_STRING$.
See also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume II: F–Q, version 8.9.1. Open this page in the PDF