Bitwise NOT NOT
Dest gets Source with every bit flipped.
BITWISE_NOT
SourceGlobal.Flags12DestGlobal.FlagsInv-13
| Tag | After two scans |
|---|---|
| Flags | 12 |
| FlagsInv | -13 |
How it works
While the rung is true, each bit of Dest is the opposite of that bit in Source, so NOT 0 is -1. A false rung changes nothing.
How it's used
Use NOT to flip inputs that are on when off.
BITWISE_NOT
SourceGlobal.RawInputs12DestGlobal.Active3
BITWISE_AND
AGlobal.Active3B15DestGlobal.Active3
| Tag | Value |
|---|---|
| RawInputs | 12 |
| Active | 3 |
NOT flips every bit. AND keeps the four inputs used: 12 becomes 3.
Operands
| Operand | Data type | Read or write |
|---|---|---|
| Source | DINT or a number | Reads |
| Dest | DINT | Writes |
Common mistakes
- Expecting NOT 0 to be 1Every bit flips, so NOT 0 is -1.