The standard signed integer: two's complement encoding for general-purpose computing
A 32-bit integer stores a whole number using all 32 bits. For signed integers (INT32), the most significant bit is the sign bit (0 = positive, 1 = negative) using two's complement encoding. For the unsigned variant, see UINT32.
32-bit integers are the most common integer type in computing. They are the default int type in C, C++, Java, C#, and Rust on most platforms. They provide over 4 billion distinct values, sufficient for most counting, indexing, and general-purpose integer operations.
Unlike floating-point formats, integers represent exact values with no rounding error. Every integer within the format's range is perfectly representable. The trade-off is that they cannot represent fractions or very large/small numbers.
Signed integers use two's complement encoding, where negative numbers are represented by inverting all bits and adding 1. This elegant system has a key property: addition and subtraction work the same way for both signed and unsigned values at the hardware level.
For example, -1 is encoded as 11111111 11111111 11111111 11111111 (all ones), because 232 - 1 = 4,294,967,295.
Click any bit to flip it. See both the signed (two's complement) and unsigned interpretation of the same bit pattern.
.s32 as the signed accumulator type (MMA C/D output) for integer Tensor Core operations. INT8×INT8 and INT4×INT4 matrix multiplies accumulate partial sums into INT32 to prevent overflow.torch.int32 for signed 32-bit tensor storage. The ONNX specification defines INT32 = 6 as a core data type.4× i32 C/D fragments. cuBLAS uses int32_t workspace allocations in fixed-point emulation pipelines.int32_t as the default, stable accumulator type for low-precision integer matrix operations on NVIDIA Tensor Cores.