What immediate range can SLLI encode?
As a shift amount, RV32 encodes 0..31 and RV64 encodes 0..63. It is not the ordinary -2048..2047 I-type arithmetic immediate.
Shift rs1 left logically by shamt bits (zeros into LSBs), result in rd
SLLI is the I-type immediate logical left-shift form. It shifts rs1 left by shamt, fills low bits with zero, discards overflowed high bits, and writes the XLEN-truncated result to rd. RV32 uses imm[4:0] as shamt, range 0..31; RV64 uses a 6-bit shamt with imm[5] in bit25, while the remaining high bits are fixed for legal shift-immediate encodings. opcode=0010011, funct3=001.
Uses the same rhythm as the ADDI page: machine-code fields, fixed-field identification, operand reads, instruction-specific execution, and ISA-visible state update.
The machine code is split by the current instruction format; the animation starts from encoding/decode.
This animation shows ISA-visible decode and state changes, not any specific CPU pipeline, cache, prediction, or timing implementation.
SLLI shifts rs1 left by the shamt constant in the syntax. It uses specialized shift-immediate encoding, not a normal signed imm[11:0] operand.
Understand this scenario with real code like «slli x5, x6, 2 # x5 = x6 << 2 (multiply by 4)».
Understand this scenario with real code like «slli x5, x6, 2 # x5 = x6 << 2 (multiply by 4)».
As a shift amount, RV32 encodes 0..31 and RV64 encodes 0..63. It is not the ordinary -2048..2047 I-type arithmetic immediate.
No. High bits shifted beyond XLEN are discarded, low bits are filled with zero, and rd receives only the XLEN-bit result.