# `blt`

[RISC-V Documentation](https://asm-editor.specy.app/documentation/risc-v.md) › [Instructions](https://asm-editor.specy.app/documentation/risc-v/instruction.md)

Web page: https://asm-editor.specy.app/documentation/risc-v/instruction/blt

**Branch if less than**

Category: Control flow

Branches to label if the first register is less than the second, comparing as signed.

[RISC-V manual: blt](https://docs.riscv.org/reference/isa/v20260120/unpriv/rv32.html#norm:blt_bltu_op)

Used in: [Asking a question with a branch](https://asm-editor.specy.app/learn/courses/risc-v/introduction/asking-a-question-with-a-branch.md) (RISC-V assembly), [if, else and jump tables](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/if-else-and-jump-tables.md) (RISC-V assembly), [Arrays and strings](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/arrays-and-strings.md) (RISC-V assembly), [The stack and sp](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/the-stack-and-sp.md) (RISC-V assembly), [jal, ret and the calling convention](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/jal-ret-and-the-calling-convention.md) (RISC-V assembly), [The bigger of two numbers](https://asm-editor.specy.app/learn/courses/risc-v/examples/if-else.md) (RISC-V assembly), [The largest element](https://asm-editor.specy.app/learn/courses/risc-v/examples/max-of-an-array.md) (RISC-V assembly), [A subroutine with its arguments in registers](https://asm-editor.specy.app/learn/courses/risc-v/examples/subroutine-with-register-arguments.md) (RISC-V assembly), [Recursion: factorial and Fibonacci](https://asm-editor.specy.app/learn/courses/risc-v/examples/factorial-and-fibonacci.md) (RISC-V assembly), [Print a nonnegative number in bases 2–36](https://asm-editor.specy.app/learn/courses/risc-v/examples/number-to-string.md) (RISC-V assembly)

## Forms

- `blt t1, t2, label`

## Operands

- `t1`: Any integer register, `x0` to `x31`, or its named alias, such as `zero`, `t0` or `t6`.
- `t2`: An integer register. It may be the same register as `t1`.
- `label`: A named address in the program, such as the start of a loop or a variable in `.data`.

## Example

```riscv
# First blt case is taken; second is not. t2 ends at 11 (10 + 1).
.text
li t2, 0
li t0, 3
li t1, 7
blt t0, t1, taken
addi t2, t2, 1
j first_done # Skip the other marker unconditionally.
taken:
addi t2, t2, 10
first_done:
li t0, 7
li t1, 3
blt t0, t1, missed
addi t2, t2, 1
j second_done # Skip the other marker unconditionally.
missed:
addi t2, t2, 10
second_done:
# t2=11 proves one taken and one untaken path.
```
