J3/07-335 To: J3 From: Van Snyder Subject: More BOZ literal and bit sequence stuff Date: 2007 November 13 Reference: 07-326r1, 07-007r3 1. Introduction Subclause 1.3 says that the standard does not specify the representation of quantities, but subclause 13.3 does so specify. The BOZ literal stuff never gets around to specifying that the sequence of digits defines a sequence of bits. The BOZ literal stuff doesn't specify a limit (low or high) on the position of the leftmost nonzero bit in a bit sequence. 2. Edits w.r.t. 07-007r3 [2:1-2]------------------------------------------------------------------- Editor: Replace "and" by "other than bit sequences or positive integers,". Then make the remainder of the item a separate item. [56:5]-------------------------------------------------------------------- Replace the edit for [56:5] in paper 07-326r1 by [57:5] At the end of the paragraph, add more sentences: "Each digit of a represents a sequence of bits, according to its numerical interpretation, using the model of 13.3, with $z$ equal to one for binary constants, three for octal constants or four for hexadecimal constants. A represents a sequence of bits that consists of the concatenation of the sequences of bits represented by its digits, in the order the digits are specified. The positions of bits in the sequence are numbered from right to left, with the position of the rightmost bit being zero. The length of a sequence of bits is the number of bits in the sequence. The processor shall allow the position of the leftmost nonzero bit to be at least $2 \times z - 1$, where $z$ is the value of the named constant NUMERIC_STORAGE_SIZE (13.8.2.16) from the intrinsic module ISO_FORTRAN_ENV." STRAW VOTE: Replace the last sentence by "The position of the leftmost nonzero bit shall be less than $2 \times z$, where is the value of the named constant NUMERIC_STORAGE_SIZE (13.8.2.16) from the intrinsic module ISO_FORTRAN_ENV." [339:21+]----------------------------------------------------------------- Insert a subclause heading "<<13.3.1 General>>" [340:3]------------------------------------------------------------------- Before "An example" insert "This defines a sequence of bits $w_{z-1} \dots w_0$, with $w_{z-1}$ the leftmost bit and $w_0$ the rightmost bit. The positions of bits in the sequence are numbered from right to left, with the position of the rightmost bit being zero. The length of a sequence of bits is the number of bits in the sequence." [340:5+]------------------------------------------------------------------ Insert a paragraph: "The interpretation of a negative integer as a bit sequence is processor dependent.j [340:11+]----------------------------------------------------------------- Insert new subclauses: "<<13.3.2 Bit sequence comparisons>> "When bit sequences of unequal length are compared, the shorter sequence is considered to be extended to the length of the longer sequence by appending zero bits on the left. "After extension if necessary, bit sequences are compared from left to right, one bit at a time, until unequal bits are found or all bits have been compared and found to be equal. If unequal bits are found, the sequence with zero in the unequal position is considered to be less than the sequence with one in the unequal position. Otherwise the sequences are considered to be equal. "<<13.3.3 Bit sequence operations>> "When operations are applied to pairs of bit sequences of unequal length, the shorter sequence is considered to be extended to the length of the longer sequence by appending zero bits on the left." [569:5+]------------------------------------------------------------------ Insert an item: o the representation of a negative integer as a sequence of bits (13.3);