nand
NAND
nand RA, RS, RB
Bitwise NAND. RA = ~(RS & RB).
Details
Performs a bitwise NAND operation: RA ← ~(RS AND RB). Each bit position in RA is set to 1 if the corresponding bits in RS and RB are not both 1, 0 otherwise. No condition registers or status fields are affected unless an extended form with a recorded bit is used (nand.).
Pseudocode Operation
RA ← ~(RS & RB)
Programming Note
The crnand instruction is useful for performing bitwise NAND operations on specific bits within the Condition Register. Ensure that the bit positions specified by BA, BB, and BT are valid to avoid undefined behavior. This instruction operates at user privilege level and does not generate exceptions under normal conditions.
Example
nand r4, r3, r5
Encoding
Binary Layout
31
0
RS
6
RA
11
RB
16
476
21
/
31
Operands
-
RA
Target -
RS
Src A -
RB
Src B