immediate encoding
How a constant is squeezed into the few bits an instruction has room for, which is why some constants fit in one instruction and others don't.
Immediate encoding is the scheme an ISA uses to store a constant in an instruction's immediate field: RISC-V splits a sign-extended 12-bit value across fields, ARM64 uses 12-bit values (optionally shifted by 12), 16-bit chunks for movz/movk and bitmask immediates for logical instructions, and x86-64 stores 1, 2, 4 or 8 whole bytes.
Examples
RISC-V
addiholds −2048 to 2047, so the assembler rejectsaddi a0, a0, 2048.
See also