# `seb`

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md) › [Instructions](https://asm-editor.specy.app/documentation/mips/instruction.md)

Web page: https://asm-editor.specy.app/documentation/mips/instruction/seb

**Sign extend byte**

Category: Arithmetic

Copies the low 8 bits of the second register into the first, with bit 7 replicated through the upper 24 bits.

## Forms

- `seb $t1, $t2`

## Operands

- `$t1`: Any general-purpose register, `$0` to `$31`, using its numeric or named spelling, such as `$8` or `$t0` (`$zero` is `$0`; `$ra` is `$31`).
- `$t2`: A general-purpose register. It may be the same register as `$t1`.

## Description

Turns a byte loaded with 'lbu', or one extracted by shifting, back into a signed value.

## Example

```mips
# Apply seb to initialized pattern 0x80FF. Inspect $t2: 0xFFFFFFFF.
li $t0, 0x80FF
seb $t2, $t0
```
