# `sltu`

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

**Set on less than unsigned**

Category: Comparison

Sets the first register to 1 if the second is less than the third 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), [Reverse a string in place](https://asm-editor.specy.app/learn/courses/mips/examples/reverse-a-string.md) (MIPS assembly)

## Forms

- `sltu $t1, $t2, $t3`

## 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`.
- `$t3`: A general-purpose register. It may be the same register as `$t1`.

## Description

Treats both operands as unsigned 32-bit integers (0 to 4294967295). Use this when comparing memory addresses or unsigned counters.

## Example

```mips
# Compare signed and unsigned bit patterns: $t0 is -1 (0xFFFFFFFF), $t1 is 1. Inspect $t2: 0.
li $t0, -1
li $t1, 1
sltu $t2, $t0, $t1
```
