[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/doc/misc calc.texi
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] emacs/doc/misc calc.texi |
Date: |
Sun, 22 Nov 2009 02:19:04 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jay Belanger <jpb> 09/11/22 02:19:04
Modified files:
doc/misc : calc.texi
Log message:
(Radix modes): Discuss alternate bases for two's complement notations.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/misc/calc.texi?cvsroot=emacs&r1=1.43&r2=1.44
Patches:
Index: calc.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/doc/misc/calc.texi,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- calc.texi 16 Nov 2009 23:41:19 -0000 1.43
+++ calc.texi 22 Nov 2009 02:19:03 -0000 1.44
@@ -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
address@hidden 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
+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
@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