On Fri, 16 Jun 2017 22:56:18 +0100, David W Noon wrote:
>
>>> In fact, on little-endian systems the numbers are put into big-endian
>>> order when loaded into a register. Consequently, these machines do
>>> arithmetic in big-endian.
>>>
>> Ummm... really?
>
>Yes.
>
>> I believe IBM computers number bits in a register with
>> 0 being the most significant bit; non-IBM computers with 0 being the
>> least sighificant bit.  I'd call that a bitwise little-endian.  And it gives 
>> an
>> easy summation formula for conversion to unsigned integers.
>
>The endianness is determined by where the MSB and LSB are stored. On IBM
>machines the MSB is in the left-most byte of the register and the LSB in
>the right-most byte. That is big-endian.
>
>Ascribing indices to the bit positions in either order makes no
>difference. It is the order of *storage* that determines endianness.
>
???  We're talking about *registers* here.  See your first paragraph I quoted.

What do you mean by "the order of *storage*" of bits in a register
other than how one ascribes indices?  If I rotate my laptop 180° on
my desk, have I swapped the left end and the right end?

>The computers perform their arithmetic in whatever byte order the
>hardware designers choose.
> 
If they operate serially, it's simplest if they start at the less significant 
end.

>My first system was a clone of an IBM 360. I felt dismay when I first
>read a core dump from a PDP-11.
> 
That's one data point confirming my conjecture that people perceive
the conventions they learned earliest as Natural Law.

>Fortunately, DEC realized that their design was crap and added a
>hardware instruction to put 16-bit binary integers into big-endian
>order; it had the assembler mnemonic SWAB (SWAp Bytes). The company I
>worked for in the 1970s exchanged data between many PDP-11s and a
>central IBM 370, usually without problems.
> 
EBCDIC?  Well, not if your data were entirely numeric.  Hexadecimal floating 
point?

>> For those who remain unaware on a Friday:
>>     https://en.wikipedia.org/wiki/Lilliput_and_Blefuscu#History_and_politics

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to