notpseudo
not
rd, rspseudo
rd = ~rs

not inverts every bit of a register: each 0 becomes 1 and each 1 becomes 0. The form not rd, rs reads source register rs, flips all 32 of its bits, and stores the result in destination register rd. This is the bitwise complement — the opposite of every bit at once.

not is a pseudo-instruction, meaning it is not a real machine operation but a friendly name the assembler rewrites into a genuine one. Here it becomes xori rd, rs, -1 — XOR against a mask of all 1s. Recall that XOR flips a bit wherever the mask has a 1; a mask that is all 1s therefore flips everything. (The value -1 in bits happens to be all 1s, which is why it serves as that mask.) Because this one rewrite covers the job, RISC-V never needed a dedicated invert instruction.

The everyday use of not is building the opposite of a mask. If you have a pattern that selects certain bits, applying not gives you the pattern that selects all the *others*. Following not with an and then clears exactly the bits the original mask named — the standard way to switch a set of flags off.

Do not confuse not with neg. not flips bits; neg flips the sign (the numeric value). They give different results: not of 5 is -6, while neg of 5 is -5. Because not is pseudo, the simulator's trace shows the xori it really runs.

Expands to
xori rd, rs, -1

A pseudo-instruction: the assembler turns it into the real instruction(s) above.