sxtb

Sign Extend Byte

SXTB <Wd>, <Wn>

Extracts the lowest 8 bits and sign-extends to 32 bits (Alias for SBFM).

Pseudocode Operation

Wd ← SignExtend(Wn[7:0], 32)

Example

SXTB w0, w1

Encoding

Binary Layout
0
31
00
30:29
100110
28:23
0
22
000000
21:16
000111
15:10
Rn
9:5
Rd
4:0
 
Format Bitfield
Opcode 0x13001C00
Extension Base

Operands

  • Wd
    Destination 32-bit integer register
  • Wn
    First source / base 32-bit integer register

Related

Other forms of sxtb

  • sxtb Signed Extend Byte (Thumb)
  • sxtb Signed Extend Byte (A32)

Across architectures

Sign Extend Byte : how x86, ARM, RISC-V, and PowerISA each do this.

More in Base

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x13001C00 SXTB <Wd>, <Wn> A64 0 | 00 | 100110 | 0 | 000000 | 000111 | Rn | Rd
0x93401C00 SXTB <Xd>, <Wn> A64 1 | 00 | 100110 | 1 | 000000 | 000111 | Rn | Rd
0x0410A000 SXTB <Zd>.<T>, <Pg>/M, <Zn>.<T> A64 00000100 | size | 010 | 00 | 0 | 101 | Pg | Zn | Zd

Description

Signed Extend Byte extracts an 8-bit value from a register, sign-extends it to the size of the register, and writes the result to the destination register.