BINVI

Bit Invert Immediate

BINVI rd, rs1, imm

Inverts (toggles) a single bit in rs1 at the index specified by an immediate.

Details

BINVI inverts the single bit of rs1 selected by the immediate, writing the result to rd.

Pseudocode Operation

R[rd] = R[rs1] ^ (1 << imm);

Example

BINVI x10, x11, 7

Encoding

Binary Layout
011010
31:26
shamtd
25:20
rs1
19:15
001
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x68001013
Extension Zbs

Operands

  • rd
    Destination register (integer)
  • rs1
    Source
  • imm
    Index