BCLR

Bit Clear

BCLR rd, rs1, rs2

Clears a single bit in rs1 at the index specified by rs2.

Details

BCLR clears the single bit of rs1 selected by the lower log2(XLEN) bits of rs2, writing the result to rd.

Pseudocode Operation

R[rd] = R[rs1] & ~(1 << (R[rs2] & (XLEN-1)));

Example

BCLR x10, x11, x12

Encoding

Binary Layout
0100100
31:25
rs2
24:20
rs1
19:15
001
14:12
rd
11:7
0110011
6:0
 
Format R-Type
Opcode 0x33
Extension Zbs

Operands

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