UINT16 - 16-Bit Unsigned Integer

Compact unsigned 16-bit type: graphics indices, Unicode code units, and network ports

Bit Layout

Value
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
16 bits

A 16-bit unsigned integer uses all 16 bits to represent magnitude, giving a range of 0 to 65,535 (216 - 1). It is the unsigned short type in C/C++ and u16 in Rust.

Overview

UINT16 is ideal for compact storage of non-negative values that fit within 0–65,535. It uses half the memory of UINT32 while covering a range sufficient for many common applications.

Common Uses

See also: INT16 For the signed variant using two's complement, commonly used for 16-bit PCM audio samples.

Range & Properties

PropertyValue
Total Bits16
Minimum Value0
Maximum Value65,535
Representable Values65,536

Key Bit Patterns

ValueBit PatternSignedUnsigned
Zero000000000000000000
One000000000000000111
Max Unsigned1111111111111111-165535
Max Signed01111111111111113276732767
All Ones (-1)1111111111111111-165535
Min Signed (-32768)1000000000000000-3276832768

Interactive Bit Visualizer

Click any bit to flip it. All 16 bits contribute directly to the unsigned magnitude.

Format Comparison

PropertyUINT16UINT32UINT8UINT4
Total Bits163284
Signed Min-32,768-2,147,483,648-128-8
Signed Max32,7672,147,483,6471277
Unsigned Max65,5354,294,967,29525515
Step (ULP)1111
Values65,5364,294,967,29625616

Where UINT16 Is Used