(Integer Representations): Simplify; delete xref to containing chapter.
This commit is contained in:
parent
2b017543cc
commit
6eeb5e1743
19
c.texi
19
c.texi
|
@ -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
|
||||
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
|
||||
decimal numbers from @minus{}128 to +127. We will revisit that
|
||||
peculiarity shortly.
|
||||
decimal numbers from @minus{}128 to +127. Negating @minus{}128 ought
|
||||
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
|
||||
representation for integers (@pxref{Integers in Depth}), but they are
|
||||
long gone and not worth any effort to support.
|
||||
Decades ago, there were computers that used other representations for
|
||||
signed integers, but they are long gone and not worth any effort to
|
||||
support. The GNU C language does not support them.
|
||||
|
||||
@c ??? Is this duplicate?
|
||||
|
||||
|
|
Loading…
Reference in New Issue