NOT
Bitwise NOT
NOT rd, rs
Computes the bitwise logical negation (one's complement).
Encoding
Binary Layout
111111111111
31:20
rs1
19:15
100
14:12
rd
11:7
0010011
6:0
Operands
-
rd
Destination register (integer) -
rs
Source
Example
NOT x10, x11
// Inverts all bits of x11.
Related
More in Pseudo
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
NOT performs a bitwise logical NOT of rs1 and writes to rd. It is a pseudoinstruction for XORI rd, rs1, -1.
Operation
R[rd] = ~R[rs];