changeset 106190:1e3dd8cfce17

(Radix modes): Discuss alternate bases for two's complement notations.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 22 Nov 2009 02:19:03 +0000
parents 316000cce056
children baf1843cbc25
files doc/misc/calc.texi
diffstat 1 files changed, 20 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/doc/misc/calc.texi	Sat Nov 21 20:19:15 2009 +0000
+++ b/doc/misc/calc.texi	Sun Nov 22 02:19:03 2009 +0000
@@ -13173,41 +13173,42 @@
 in the current radix.  (Larger integers will still be displayed in their
 entirety.) 
 
-With the command @kbd{C-u d 2}, Calc will display integers using
-twos-complement notation, using the current word-size to determine
-the number of bits.  When using twos-complement notation, a negative
-word size might be appropriate (@pxref{Binary Functions}).  If the
-absolute value of the word size is @expr{w}, then twos-complement
-notation will represent the integers in the symmetric interval from
+
+Calc can display @expr{w}-bit integers using two's complement notation
+and binary, octal or hexadecimal display radix with the commands
+@kbd{C-u d 2}, @kbd{C-u d 8} or @kbd{C-u d 6}, respectively.  In this
+case a negative word size might be appropriate (@pxref{Binary Functions}).
+The integers in the symmetric interval from
 @texline @math{-2^{w-1}}
 @infoline @expr{-2^(w-1)}
 to
 @texline @math{2^{w-1}-1}
 @infoline @expr{2^(w-1)-1}
-using the binary numbers from @expr{0} to @expr{2^w}; the
-integers from @expr{0} to 
+will be represented by using the integers from @expr{0} to @expr{2^w};
+the integers from @expr{0} to
 @texline @math{2^{w-1}-1}
 @infoline @expr{2^(w-1)-1}
-will be represented by their usual binary form and the integers
-from 
+will be represented by themselves and the integers
+from
 @texline @math{-2^{w-1}}
 @infoline @expr{-2^(w-1)}
-to @expr{-1} will be represented by first adding @expr{2^w} to them
-and then using the usual binary form (so they will be represented by
-the integers from
+to @expr{-1} will have @expr{2^w} added to them, so they will be
+represented by the integers from
 @texline @math{2^{w-1}}
 @infoline @expr{2^(w-1)}
-to @expr{2^w}).  Calc will represent a twos-complement integer
-by the radix @expr{2}, two @kbd{#} symbols, and the @expr{w} binary
-digits (including any necessary leading zeros).  Numbers that are not
-displayed in twos-complement notation (i.e., that aren't integers from 
+to @expr{2^w}.  Calc will represent a twos-complement integer
+by the radix (either @expr{2}, @expr{8} or @expr{16}), two @kbd{#}
+symbols, and then the digits (including any necessary leading zeros to
+include all @expr{w} bits).  Numbers that are not displayed in 
+twos-complement notation (i.e., that aren't integers from
 @texline @math{-2^{w-1}}
 @infoline @expr{-2^(w-1)}
-to 
+to
 @c (
 @texline @math{2^{w-1}-1})
 @infoline @expr{2^(w-1)-1})
-will be represented using Calc's usual binary notation.
+will be represented using Calc's usual notation (in the appropriate
+radix).
 
 @node Grouping Digits, Float Formats, Radix Modes, Display Modes
 @subsection Grouping Digits