(Integer Representations): Simplify; delete xref to containing chapter.

This commit is contained in:
Richard Stallman 2022-09-30 11:03:02 -04:00
parent 2b017543cc
commit 6eeb5e1743
1 changed files with 10 additions and 9 deletions

19
c.texi
View File

@ -12181,18 +12181,19 @@ bits has a range from @math{-2@sup{(@var{n} - 1)}} to @minus{}1 to 0
to 1 to @math{+2@sup{(@var{n} - 1)} - 1}, inclusive. The leftmost, or to 1 to @math{+2@sup{(@var{n} - 1)} - 1}, inclusive. The leftmost, or
high-order, bit is called the @dfn{sign bit}. high-order, bit is called the @dfn{sign bit}.
@c ??? Needs correcting In two's-complement representation, there is only one value that means
zero, and the most negative number lacks a positive counterpart. As a
result, negating that number causes overflow; in practice, its result
is that number back again. We will revisit that peculiarity shortly.
There is only one value that means zero, and the most negative number
lacks a positive counterpart. As a result, negating that number
causes overflow; in practice, its result is that number back again.
For example, a two's-complement signed 8-bit integer can represent all For example, a two's-complement signed 8-bit integer can represent all
decimal numbers from @minus{}128 to +127. We will revisit that decimal numbers from @minus{}128 to +127. Negating @minus{}128 ought
peculiarity shortly. to give +128, but that value won't fit in 8 bits, so the operation
yields @minus{}128.
Decades ago, there were computers that didn't use two's-complement Decades ago, there were computers that used other representations for
representation for integers (@pxref{Integers in Depth}), but they are signed integers, but they are long gone and not worth any effort to
long gone and not worth any effort to support. support. The GNU C language does not support them.
@c ??? Is this duplicate? @c ??? Is this duplicate?