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
Graphics index buffers: UINT16 is the standard type for mesh vertex indices in OpenGL and Vulkan, supporting up to 65,535 vertices per draw call at half the memory cost of UINT32.
Unicode: UTF-16 code units are UINT16 values, covering the Basic Multilingual Plane (most common characters) in a single unit.
Network protocols: TCP/UDP port numbers (0–65,535) are stored as UINT16.
Sensor data: 16-bit ADC readings, telemetry values, and fixed-width file format fields.
See also: INT16
For the signed variant using two's complement, commonly used for 16-bit PCM audio samples.
Range & Properties
Key Bit Patterns
Interactive Bit Visualizer
Click any bit to flip it. All 16 bits contribute directly to the unsigned magnitude.
Format Comparison
Where UINT16 Is Used
GPU packed operations: The PTX ISA 9.2 introduces .u16x2 packed types (two 16-bit unsigned integers in a 32-bit register) with add/sub/min/max and .sat qualifier support.
Graphics index buffers: UINT16 is the standard vertex index type in OpenGL and Vulkan, supporting up to 65,535 vertices per draw call at half the memory cost of UINT32 indices.
Unicode and networking: UTF-16 code units and TCP/UDP port numbers are both UINT16 values, making this the standard type for text processing and network protocol implementations.