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
 
Format I-Type
Opcode 0x00004013
Extension Pseudo

Operands

  • rd
    Destination register (integer)
  • rs
    Source

Example

NOT x10, x11

// Inverts all bits of x11.

Related

More in Pseudo

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];