# `mul`

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

**Multiply**

Category: Arithmetic

Multiplies the second register by the third and stores the low register-width bits of the product in the first.

[RISC-V manual: mul](https://docs.riscv.org/reference/isa/v20260120/unpriv/m-st-ext.html#norm:mul_op)

Used in: [Arithmetic, logic and bits](https://asm-editor.specy.app/learn/courses/risc-v/think-in-assembly/arithmetic-logic-and-bits.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), [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), [ecall](https://asm-editor.specy.app/learn/courses/risc-v/talking-to-the-outside-world/ecall.md) (RISC-V assembly), [The bitmap display and the keyboard registers](https://asm-editor.specy.app/learn/courses/risc-v/talking-to-the-outside-world/the-bitmap-display-and-the-keyboard.md) (RISC-V assembly), [Multiply and divide, with the remainder](https://asm-editor.specy.app/learn/courses/risc-v/examples/multiply-and-divide.md) (RISC-V assembly), [Stack arguments and a stack frame](https://asm-editor.specy.app/learn/courses/risc-v/examples/subroutine-with-stack-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), [A jump table](https://asm-editor.specy.app/learn/courses/risc-v/examples/jump-table.md) (RISC-V assembly), [A 2D array](https://asm-editor.specy.app/learn/courses/risc-v/examples/two-dimensional-array.md) (RISC-V assembly)

## Forms

- `mul t1, t2, t3`

## 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`.
- `t3`: An integer register. It may be the same register as `t1`.

## Example

```riscv
.text
li t0, 13
li t1, 5
# t0=13, t1=5; mul writes 65 to t2.
mul t2, t0, t1
```
