UINT8 - 8-Bit Unsigned Integer

The unsigned byte: pixel colors, raw binary data, and ML image preprocessing

Bit Layout

Value
V
V
V
V
V
V
V
V
8 bits

An 8-bit unsigned integer uses all 8 bits for magnitude, giving a range of 0 to 255 (28 - 1). It is the unsigned char type in C/C++, byte in C#/Java, and u8 in Rust.

Overview

UINT8 is the fundamental unit of byte-addressable memory. Its 256 possible values are sufficient for color channels, character encodings, and raw binary protocols. In machine learning, UINT8 is the standard input format for image data before normalization to float.

Common Uses

See also: INT8 For the signed variant using two's complement (range -128 to 127), which is the primary format for ML inference quantization.

Range & Properties

PropertyValue
Total Bits8
Minimum Value0
Maximum Value255
Representable Values256

Key Bit Patterns

ValueBit PatternSignedUnsigned
Zero0000000000
One0000000111
Max Unsigned11111111-1255
Max Signed01111111127127
All Ones (-1)11111111-1255
Min Signed (-128)10000000-128128

Interactive Bit Visualizer

Click any of the 8 bits to flip them. With only 256 possible values, you can explore the entire format.

Format Comparison

PropertyUINT8UINT32UINT16UINT4
Total Bits832164
Signed Min-128-2,147,483,648-32,768-8
Signed Max1272,147,483,64732,7677
Unsigned Max2554,294,967,29565,53515
Step (ULP)1111
Values2564,294,967,29665,53616

Where UINT8 Is Used