Basic RISC-V Arithmetic Operations

There are three basic arithmetic operations in 32-bit RISC-V. Pseudoinstructions are italicized:

| Operation | Description |
| :----------: | :------------: |
| add | Sets x1 to the sum of x2 and x3. |
| sub | Sets x1 to the difference of x2 and x3. |
| addi | Sets x1 to the sum of x2 and some immediate k. |
| neg | |

Note!

There is no multiplication and division in the vanilla RISC-V instruction set. Refer to 2.1c.2 for ways to multiply and divide numbers.