Some people love to argue the smallest point.
06/13/2023 11:42:56 AM:
> In both cases they are treated numerically as a whole,
Not true in the majority of cases. The proof is that the logical
comparison of unstructured data does not proceed for the full length of
the data but ends as soon as an inequality is found. See the manual if
you still want to argue the point.
> For logical instructions the operands are treated as unsigned numbers.
It is true that the manual states that. However, you left off the
rest of the manual's answer. It states:
Signed-binary-comparison operations are provided
which treat the operands as signed binary integers,
and logical-comparison operations are provided
which treat the operands as unsigned binary integers
or as unstructured data.
Thus, it depends upon the instruction whether the data is treated,
as a whole, as an unsigned binary integer or, in part, as unstructured
data -- i.e., as a character string.
Logical comparison of two operands is performed
byte by byte, in a left-to-right sequence. The operands
are equal when all their bytes are equal. When
the operands are unequal, the comparison result is
determined by a left-to-right comparison of corresponding
bit positions in the first unequal pair of
bytes: the zero bit in the first unequal pair of bits indicates
the low operand, and the one bit the high operand.
Since the remaining bit and byte positions do
not change the comparison, it is not necessary to
continue comparing unequal operands beyond the
first unequal bit pair.