BEXTI
Bit Extract Immediate
BEXTI rd, rs1, imm
Extracts the value of a single bit (0 or 1) at the index specified by an immediate.
Details
BEXTI extracts the single bit of rs1 selected by the immediate, zero-extending to XLEN and writing to rd.
Pseudocode Operation
R[rd] = (R[rs1] >> imm) & 1;
Example
BEXTI x10, x11, 31
Encoding
Binary Layout
0100100
31:25
imm
rs1
24:20
101
19:17
rd
16:12
0010011
11:5
Operands
-
rd
Dest (0 or 1) -
rs1
Source -
imm
Index