ANDI
Logical AND Immediate
ANDI rd, rs1, imm
Performs a bitwise logical AND between a register and a sign-extended 12-bit immediate.
Details
ANDI performs a bitwise AND of register rs1 with the sign-extended 12-bit immediate, writing the result to rd.
Pseudocode Operation
R[rd] = R[rs1] & sext(imm);
Example
ANDI x10, x11, 15
Encoding
Binary Layout
imm[11:0]
31:20
rs1
19:15
111
14:12
rd
11:7
0010011
6:0
Operands
-
rd
Destination Register -
rs1
Source Register -
imm
12-bit Signed Immediate