NOTV is a CAOS command for a bitwise operation.
Usage[]
Syntax: NOTV var (variable)
Performs a bitwise NOT operation on var. This means that every binary digit (bit) in 32-bit var is reversed. In C this is expressed var = ~var
. var must be integer.
Examples[]
This negates va00 (equivalent to NEGV va00 for integers):
NOTV va00 ADDV va00 1
See how this works with va00 = 16:
16 = 0000 0000 0000 0000 0000 0000 0001 0000 NOTV: 1111 1111 1111 1111 1111 1111 1110 1111 ADDV 1: 1111 1111 1111 1111 1111 1111 1111 0000
...and this is -16 in two's complement form.