|Re: typo/overstatement in HP-16c manual?|
Message #5 Posted by Mark Crispin on 28 Oct 2005, 1:13 p.m.,
in response to message #4 by Eric Smith
Please turn to page 32 of the HP-16c manual and consider the entire paragraph in question:
A current word size smaller than 8 will limit the size of the number you can enter to stipulate a new word size; but you can always enter 0 f WSIZE to set a word size of 64. (You can then set any word size.) Error 2 results if you attempt to specify a word size larger than 64.*
Thus, the manual is talking about the need to use a two-step process to recover from setting the word size smaller than 8: 0 f WSIZE then n f WSIZE where n is the desired new word size. It is not talking about "representing a valid word size".
This two-step process is completely unnecessary in the case of a current word size of 7, and in the case of a current word size of 6 if the mode is unsigned. There is no need for the additional bit because 0 is treated as equivalent to 64, and works no matter what the word size may be.
You only need to use the two step process if:
. signed, current word size 6, desired new word size 32 or greater
. unsigned, current word size 5, desired new word size 32 or greater
. signed, current word size 5, desired new word size 16 or greater
. unsigned, current word size 4, desired new word size 16 or greater
. signed, current word size 4, desired new word size 8 or greater
. unsigned, current word size 3, desired new word size 8 or greater
. signed, current word size 3, desired new word size 4 or greater
. unsigned, current word size 2, desired new word size 4 or greater
. signed, current word size 2, desired new word size 3 or greater
. current word size 1
Note: "3 or greater" is not a typo. If the desired word size is 2 you don't need to do anything!
As for whether zero is (or is not) a valid word size, without referring to the microcode (have you?), there is no particular reason to believe that "0 is handled as a special case alias for 64." It is quite possible that 64 is the special case for zero in the microcode. Consider, for example, a 6-bit register which holds the "word size restriction", where zero means "unrestricted".
Regardless of what how the microcode implements it, the effect is the same: the range of values accepted by WSIZE is 0..64, and 0 and 64 are functionally identical.
Go ahead and argue semantics if you wish; the fact is that in terms of keystrokes entered the manual overstates the need to do the two-step process.