# HG changeset patch # User Jay Belanger # Date 1260838688 0 # Node ID 2a9e2308291790ded2b4a1f62569043c3de9bc2c # Parent 446187db591e422ece16bb8c2ffc8baf3c453041 (Radix Modes): Clarify two's complement notation. diff -r 446187db591e -r 2a9e23082917 doc/misc/calc.texi --- a/doc/misc/calc.texi Mon Dec 14 23:22:54 2009 +0000 +++ b/doc/misc/calc.texi Tue Dec 15 00:58:08 2009 +0000 @@ -13173,34 +13173,36 @@ in the current radix. (Larger integers will still be displayed in their entirety.) - -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 +@cindex Two's complements +With the binary, octal and hexadecimal display modes, Calc can +display @expr{w}-bit integers using two's complement notation. These +versions of the display radices are selected with the key sequences +@kbd{C-u d 2}, @kbd{C-u d 8} and @kbd{C-u d 6}, respectively. +In these cases a negative word size might be appropriate +(@pxref{Binary Functions}). In two's complement notation, the integers +in the (nearly) 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} -will be represented by using the integers from @expr{0} to @expr{2^w}; +are represented by the integers from @expr{0} to @expr{2^w-1}: the integers from @expr{0} to @texline @math{2^{w-1}-1} @infoline @expr{2^(w-1)-1} -will be represented by themselves and the integers -from +are represented by themselves and the integers from @texline @math{-2^{w-1}} @infoline @expr{-2^(w-1)} -to @expr{-1} will have @expr{2^w} added to them, so they will be -represented by the integers from +to @expr{-1} are 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 (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 +to @expr{2^w-1} (the integer @expr{k} is represented by @expr{k+2^w}). +Calc will display a two's complement integer by the radix (either +@expr{2}, @expr{8} or @expr{16}), two @kbd{#} symbols, and then its +representation (including any leading zeros necessary to include all +@expr{w} bits). In a two's complement display mode, numbers that +are not displayed in two's complement notation (i.e., that aren't +integers from @texline @math{-2^{w-1}} @infoline @expr{-2^(w-1)} to