# `sltiu`

[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/sltiu

**Set on less than immediate unsigned**

Category: Comparison

Sets the first register to 1 if the second is less than an immediate as unsigned integers, otherwise to 0.

Used in: [Comparing two numbers](https://asm-editor.specy.app/learn/courses/mips/introduction/comparing-two-numbers.md) (MIPS assembly)

## Forms

- `sltiu $t1, $t2, imm16`

## 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`.
- `imm16`: A signed 16-bit immediate, `-32768` to `32767`.

## Description

The immediate is sign-extended to 32 bits first, then interpreted as unsigned. Commonly used to test if a value is below a limit without needing a separate register.

## Example

```mips
# Unsigned comparison: 0xFFFFFFFF is greater than 1. Inspect $t2: 0.
li $t0, -1
sltiu $t2, $t0, 1
```
