Ethereum: Does Solidity support non-multiple 8-bit integer types?
As a developer building on Ethereum’s blockchain and smart contract platform, understanding the underlying architecture is crucial to ensure smooth interaction with the ecosystem. In this article, we’ll explore whether Solidity provides types that are not multiples of 8 bits, focusing specifically on support for integer types.
Solidity Basics
Before you dive into integer types, it’s essential to understand the basics of Solidity. The language is designed to be concise and efficient, with a focus on ease of use rather than pure performance optimization. It supports various data types, including integers, which are crucial in smart contracts for representing numbers.
Integer types in Solidity
Ethereum’s Solidity provides several integer types:
- “uint8”, “uint16”, “uint32”, and “uint64” – These represent 8-bit, 16-bit, 32-bit, and 64-bit integers, respectively.
- “u8”, “u16”, “u32”, and “u64” are alias types for the corresponding “uint” types with smaller bit sizes (1 byte vs. 4 bytes, 2 words vs. 8 words, etc.).
Not a multiple of 8 bits
Although Solidity supports some integer types that may not be multiples of 8 bits, none of these types meet the requirements of an intermediate type. Intermediate types are typically used to represent intermediate results or values that need to be converted between different data types.
A potentially interesting example is “uint10”. However, it is important to understand that “uint10” is simply a shorthand for representing 10-bit integers in a “uint” type, which has no significant differences from the other integer types. In practice, using “uint10” would not impose any additional performance overhead or requirements.
Why not non-multiples of 8 bits

In Solidity, integer types that are not multiples of 8 bits (such as “uint9”, “u7”, etc.) are simply aliases for the corresponding “uint” type with a smaller bit size. This means that they do not provide any additional functionality or enhancements beyond what is already available in the other integer types.
Conclusion
In summary, while Solidity provides several integer types that support 8-bit data, none of them meet the requirements of an intermediate type. Any non-multiples of 8 bits (such as “uint10”) serve as aliases for existing integer types and do not introduce any additional performance benefits or requirements.
When building on Ethereum’s blockchain and smart contract platform, it is important to be aware of Solidity’s data type limitations and design your code accordingly. This ensures seamless integration into the ecosystem and minimizes potential issues or bugs that can arise from incorrect use of integer types.
