LOGBOOK

HELP

Quiz Entry - updated: 2026.07.30

For uint/int, what do the bit-size suffixes like uint8 or uint256 mean, and what is the default?

The number is how many bits the integer gets — uint8 fits 0–255, uint256 is the largest — sizes go in steps of 8 (8, 16, …, 256), and a bare uint defaults to uint256.

An integer's bit width sets how large a value it can hold. The smallest is 8 bits (one byte); you climb by 8 up to 256:

uint8   small;    // 0 to 255
uint256 big;      // the maximum
uint    same;     // identical to uint256 (the default)

Writing uint alone is legal and means uint256, but many developers write uint256 explicitly for clarity. The same rule applies to int (signed) and to bytes1bytes32 (a bytes64 does not exist — 32 is the max fixed size). Choosing a smaller type can save storage but is often not worth the reduced range unless you know the value stays small.

Go deeper:

From Quiz: IOTHACK / Smart Contracts & the Remix IDE | Updated: Jul 30, 2026