Home

uint64

uint64 is an unsigned 64-bit integer type used in several programming languages. It stores non-negative whole numbers in a fixed width of 64 bits, allowing values from 0 to 2^64−1. The exact type name varies by language (for example uint64 in Go, u64 in Rust and Zig). In C and C++, a 64-bit unsigned integer is typically provided as uint64_t via the stdint.h header.

On modern hardware, it occupies eight bytes of memory. The value range is 0 to 18,446,744,073,709,551,615. In

Arithmetic on uint64 values is generally modulo 2^64, so adding one to the maximum value wraps to

Common uses include counters, array indices, file sizes, protocol fields, and unique identifiers where a large

binary,
these
values
correspond
to
all
patterns
from
all-zeroes
to
all-ones.
Endianness
affects
how
the
bytes
are
laid
out
in
memory
or
in
network
serialization,
not
the
abstract
value.
zero.
Subtraction,
multiplication,
and
division
follow
the
same
wraparound
behavior
in
typical
implementations.
Some
languages
provide
overflow
checks
in
debug
mode
or
offer
explicit
checked
arithmetic.
Conversions
from
signed
integers
or
floating-point
numbers
may
require
explicit
casting
and
can
lose
information
if
out
of
range,
and
moving
from
a
larger
unsigned
type
to
a
smaller
one
can
truncate
data.
non-negative
range
is
required.
When
interoperating
with
other
systems,
it
is
important
to
agree
on
endianness
and
to
use
a
standard
representation
such
as
64-bit
unsigned
integers
in
network
byte
order
where
appropriate.
Related
types
include
uint32
and
other
fixed-width
unsigned
integers,
and
the
signed
counterpart
int64
in
languages
that
distinguish
signed
and
unsigned
forms.