Word operations use byte-addressed temporary memory.
LET’S PICTURE IT
A worktable location marks a starting byte, then a whole word spans the next thirty-two positions.
SEE IT FOR YOURSELF
Use temporary memory in one execution frameStep 1 / 4
This frame uses temporary byte-addressed memory. Solidity normally keeps a free memory pointer at address 0x40, initially pointing to 0x80.
This frame uses temporary byte-addressed memory. Solidity normally keeps a free memory pointer at address 0x40, initially pointing to 0x80.In this simplified example, MSTORE writes integer forty-two into thirty-two bytes beginning at memory byte 0x80. Accessing this range may expand active memory.MLOAD at byte 0x80 reads that complete thirty-two-byte word back as a stack value. It does not fetch persistent storage or network data.RETURN can expose a chosen memory range as output. Frame memory is temporary; returning data does not turn it into persistent contract state.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Count byte addresses
Memory offsets are byte positions. MSTORE at offset 0x80 writes a thirty-two-byte word across the range 0x80 through 0x9f.
Read a full word
MLOAD retrieves thirty-two bytes beginning at the specified offset. It does not automatically select a Solidity field or apply the source variable’s declared width.
Distinguish single-byte stores
MSTORE8 writes only the low byte of its value. It is a separate instruction and should not be confused with the full-width MSTORE operation.
Include expansion effects
Touching a farther range can expand active memory and increase cost. Memory remains temporary to the current execution frame rather than persistent contract state.
Trace the idea
MSTORE(offset 0x80, value 42)
MLOAD(offset 0x80) → 42
Both operations cover 32 bytes.
Stack examples list the bottom first and the top last. These small traces omit gas and surrounding dispatch unless stated.