SEX.B

Sign Extend Byte

SEX.B rd, rs1

Sign-extends the lowest byte (8 bits) to XLEN bits.

Details

SEX.B sign-extends the least-significant byte of rs1 to XLEN bits (alias of SEXT.B).

Pseudocode Operation

R[rd] = sext(R[rs1][7:0]);

Example

SEX.B x10, x11

Encoding

Binary Layout
0110000
31:25
00100
24:20
rs1
19:15
001
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x13
Extension Zbb

Operands

  • rd
    Destination register (integer)
  • rs1
    Source