Why can a logical left shift produce all ones in the upper 32 bits?
The shift fills low bits with zero within 32 bits; the W form then sign-extends result bit 31 to 64 bits. When bit 31 is 1, the upper 32 bits are all ones.
Shift lower 32 bits of rs1 left logically by rs2[4:0], sign-extend 32-bit result to 64 bits
SLLW (R-type, opcode=0111011, funct7=0000000, funct3=001) performs a logical left shift on the lower 32 bits of rs1 by the shift amount in rs2[4:0]. Zeros are shifted into the lower bits. The 32-bit result is sign-extended to 64 bits.
Starts with machine-code field decoding, then shows operand reads, instruction-specific execution, and ISA-visible state update.
This example uses fixed initial register values and PC=0x2000; instruction fetch succeeds, with no asynchronous interrupt or extra extension checks. Exception branches stop ordinary commit; post-trap PC and handler state are EEI-dependent.
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.
Shift lower 32 bits of rs1 left logically by rs2[4:0], sign-extend 32-bit result to 64 bits
RV64I, x11=0x40000000 and x12=33: sllw x10, x11, x12 uses shift amount 1 and gives 0xffffffff80000000.
The shift fills low bits with zero within 32 bits; the W form then sign-extends result bit 31 to 64 bits. When bit 31 is 1, the upper 32 bits are all ones.