5.1.8 · D1Instruction Set Architecture (ISA)

Foundations — RISC-V extensions (M, A, F, D, V, C)

1,959 words9 min readBack to topic

This page assumes you have seen none of the notation on the parent page. We earn every symbol before it appears. Start at line one.


0. The rawest atom: the bit

Figure — RISC-V extensions (M, A, F, D, V, C)

When we line up many boxes we count positions from the right, starting at 0. The rightmost box is position 0, the next is position 1, and so on. That position number is called the bit index.


1. From bits to a number: place value

Each box has a weight. Position is worth . To read a row as a number, add up the weights of the boxes that hold a 1.

Figure — RISC-V extensions (M, A, F, D, V, C)

2. Word, register, and the names RV32I / RV64I

That is what the 32 and 64 mean in RV32I and RV64I:

  • RV = RISC-V.
  • 32 or 64 = how many boxes per register.
  • I = the Integer base — the mandatory core the 5.1.07-RISC-V-base-ISA defines.

3. Hexadecimal: shorthand for four bits at a time

Writing 32 boxes is exhausting. We group them 4 boxes at a time, because 4 bits have combinations, and give each combination a single symbol 09 then AF. This is hexadecimal ("base 16"), written with a leading 0x.

So 0x80000000 is 1000 then seven 0000 groups = a 1 in the leftmost box of 32, everything else 0. Keep that picture — it is the star of the parent page's tricky multiply example.


4. Signed vs unsigned: what the leftmost box means

The same row of boxes can be read two ways.

Figure — RISC-V extensions (M, A, F, D, V, C)

5. Why multiplying can overflow: the 64-bit product

Multiply two 32-box numbers and the answer may need up to 64 boxes. A single 32-bit register cannot hold it, so the hardware splits the result:

That single fact explains the whole "why two results?" section on the parent page — nothing more mysterious than long multiplication overflowing its column.


6. IEEE 754: how a row of bits becomes a fraction

Integers can't store 1.75. The F and D extensions read a register as a floating-point number using the 5.2.03-IEEE-754-floating-point layout. The bits are cut into three fields:

Figure — RISC-V extensions (M, A, F, D, V, C)

7. Atomic, core, and cache line (for the A extension)

The A extension talks about many CPUs sharing memory. Three plain-word terms:

8. What "vector" means (for V) and "compressed" (for C)


Prerequisite map

bit 0 or 1

place value powers of two

word and register width

RV32I RV64I naming

hexadecimal shorthand

signed vs unsigned

M extension multiply and divide

IEEE 754 fields

F and D extensions

core cache line atomic

A extension atomics

scalar vs vector

V extension

instruction encoding size

C extension

RISC-V extensions menu


Equipment checklist

What is a bit and why exactly two states?
One box holding 0 or 1; two states map cleanly to "voltage / no voltage."
What does place value mean?
The box at index (counting from the right, from 0) is worth ; add the weights of the 1 boxes.
What do [31:0] and [63:32] select?
The low 32 boxes, and the upper 32 boxes, of a 64-box row.
Decode RV64I.
RISC-V, 64-bit registers, the mandatory Integer base.
What roles do rd, rs1, rs2 play?
Destination register, read-source 1, read-source 2.
One hex digit equals how many bits?
Four bits ( combinations).
What is 0x80000000 unsigned vs signed?
unsigned, signed (only the top box set).
Why does the top box flip sign in two's complement?
Its weight becomes instead of .
Why does a 32×32 multiply need 64 bits?
The product can be as large as needs 64 boxes; hardware splits it into upper (MULH) and lower (MUL).
Name the three IEEE 754 fields.
Sign, exponent, mantissa.
Why subtract 127 from the exponent?
It is the bias; storing the exponent unsigned lets simple comparators sort floats, and subtracting recovers the true exponent.
Why is 0.1 not exact in a float?
Its binary fraction repeats forever; truncating to 23 bits leaves a small error.
Define atomic and cache line.
Atomic = uninterruptible all-or-nothing; cache line = the memory chunk hardware tracks for coherence.
Scalar vs vector?
Scalar = one number per op; vector = same op on a whole row of numbers at once.