10-154r1
To: J3
From: Robert Corbett/Stan Whitlock
Subject: Interpretation Request: Can zero have more than one
bit sequence representation?
Date: 2010 June 15
NUMBER: F03/0007
TITLE: Can zero have more than one bit sequence representation?
KEYWORDS: zero, bits
DEFECT TYPE: Interpretation
STATUS: J3 consideration in progress
QUESTIONS:
Question (1):
Some processors provide two internal representations for the
integer value zero. The ones' complement representation of signed
integers and the signed-magnitude representation of signed
integers both provide two representations for zero. Must a
processor for such a machine use a bit sequence consisting of all
zero bits to represent zero, regardless of the internal
representation of zero?
Question (2):
The Fortran 2008 standard [13.3.1, 317:9] states
The interpretation of a negative integer as a
sequence of bits is processor dependent.
Could a standard-conforming processor interpret all negative
integers as a sequence of all zero bits?
ANSWERS:
Answer to question (1): Yes. The standard does not allow for more
than one bit representation of zero.
Answer to question (2): No. The standard specifies that the integer
value of a string of all zero bits is zero. The standard does not
specify the integer values for bit strings when the leftmost bit is
one. A processor could interpret all negative integers as a sequence
of a one followed by all zero bits. It would not be a useful bit
representation but it is not disallowed.
EDITS to 10-007:
None.
SUBMITTED BY: Robert Corbett
HISTORY: 10-154 m192 F03/0007 submitted
10-154r1 m192 Draft answer