J3/06-220r2
To: J3
From: Bill Long
Subject: C10 - UTI 48 : List-directed bits output
Date: 17-aug-2006
---------------------
Unresolved Technical Issue 48 (page 282) Asks three questions: Why are
leading zeros considered significant in list-directed output for bits?
Why is Z format user rather than B? What is the exact meaning of
(k+3)/4 ?
Reply:
1) In the bits context, I see no reason why a zero bit should be any
less or more significant than a one bit. It is true that leading
zeros are not included in B0, O0, and Z0 output, but that is mainly
for backwards compatibility. List-directed output for bits is new
and it seems reasonable to do it "right". For example, you might
want to know if the leftmost bit of a value is zero. By printing
all the bits, you can just look at the leftmost character printed,
rather than having to count the number of characters output to
determine if maybe some leading zero bits had been dropped.
2) The selection of Z format for list-directed output is mainly for
practical considerations. B format output results in
significantly, and in some cases, impractically long output
strings. The use of Z format allows compact output from which the
reader can easily visualize the represented bit pattern.
3) The intended meaning of (k+3)/4 was to be interpreted according to
Fortran's integer divide rules. As written in the text, this is not
clear. Edits are provided to fix this.
Edits:
------
[281:11] Replace "Zw" with "Zw.w".
[281:11] Replace (in LaTeX-ese) $ {k+3}\over 4 $ with "CEILING(k/4)".
[287:14] Replace "Zw" with "Zw.w".
[287:14] Replace (in LaTeX-ese) $ {k+3}\over 4 $ with "CEILING(k/4)".