commit cd5a9ba1f4e38292d8e8c122c2e8ce4d3879367f (tree)
parent 24d718e7ebcf9b13044ead80510c6c703eebd929
Author: Shane Kennedy <shane.kennedy19@gmail.com>
Date: Mon, 22 Aug 2022 12:57:51 +0200
lagnref: add signed integer repr documentation
Closes #11103
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/langref.html.in b/doc/langref.html.in
@@ -1521,7 +1521,8 @@ fn divide(a: i32, b: i32) i32 {
Zig supports arbitrary bit-width integers, referenced by using
an identifier of <code>i</code> or <code>u</code> followed by digits. For example, the identifier
{#syntax#}i7{#endsyntax#} refers to a signed 7-bit integer. The maximum allowed bit-width of an
- integer type is {#syntax#}65535{#endsyntax#}.
+ integer type is {#syntax#}65535{#endsyntax#}. For signed integer types, Zig uses a
+ <a href="https://en.wikipedia.org/wiki/Two's_complement">two's complement</a> representation.
</p>
{#see_also|Wrapping Operations#}
{#header_close#}