Author Topic: Little/Big-Endian the most stupid term ever conceived.  (Read 9286 times)

0 Members and 5 Guests are viewing this topic.

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
  • Retired, now restoring antique test equipment
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #25 on: May 28, 2025, 08:47:10 pm »
Yes, it is a made-up word, based on Swift's amusing idea of a religious conflict.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #26 on: May 28, 2025, 08:51:39 pm »
Swift's Gulliver's Travels is an English-language classic (18th Century), not so often read anymore, but the concept of visiting countries with very different sized individuals is very common in animated cartoons and similar media.

I read it as a kid, but at that age could not understand the fine subtleties of the satire. Different sized people is merely a small part of it.

One which still resonates is the concept of "flappers". Gulliver visited a land where flappers were junior servants to Important People(IP). The key point is that the IP could not communicate with each other unless and until their flappers raised their flaps.

That concept is just as valid and visible today as it was in the 18th century.

As for Swift's satirical use of endianness, see https://www.ling.upenn.edu/courses/Spring_2003/ling538/Lecnotes/ADfn1.htm
Note that Danny Cohen's reuse of the concept was entirely apt and directly relevant.
« Last Edit: May 28, 2025, 09:01:04 pm by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline UnijunctionTransistor

  • Frequent Contributor
  • **
  • Posts: 471
  • Country: us
  • Ohms Law: Resistance is futile.
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #27 on: May 28, 2025, 08:55:53 pm »
One can see that behavior at the top corporate levels.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
  • Retired, now restoring antique test equipment
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #28 on: May 28, 2025, 09:01:02 pm »
Swift's Gulliver's Travels is an English-language classic (18th Century), not so often read anymore, but the concept of visiting countries with very different sized individuals is very common in animated cartoons and similar media.

I read it as a kid, but at that age could not understand the fine subtleties of the satire. Different sized people is merely a small part of it.

One which still resonates is the concept of "flappers". Gulliver visited a land where flappers were junior servants to Important People(IP). The key point is that the IP could not communicate with each other unless and until their flappers raised their flaps.

That concept is just as valid and visible today as it was in the 18th century.

Swift was not a children's author, and his writings were very scandalous for a clergyman.
Unfortunately, the different-sized people bits were cleaned up for children, while the rest is ignored.

Flappers was a wonderful concept:  if a person were very, very important, his flappers had flappers.

Towards the end of the book, there are very nasty satires of research institutes, which could have been written by recent politicians.

Swift's most outrageous work was an 1729 essay "A modest proposal", which is too nasty for me to quote here.
Full title:  "A Modest Proposal for Preventing the Children of Poor People from Being a Burthen to Their Parents or Country, and for Making Them Beneficial to the Publick"
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #29 on: May 28, 2025, 09:04:55 pm »
 :--
One can see that behavior at the top corporate levels.

Yes, and political levels too.

Decent corporations employ explicit mechanisms to allow flappers to be circumvented. There several Bill-and-Dave stories and mechanisms, of which MBWA is probably the most widely known.

Prince (now King) Charles was known for incognito MBWA.
« Last Edit: May 28, 2025, 09:17:08 pm by tggzzz »
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #30 on: May 28, 2025, 09:13:08 pm »
Swift's Gulliver's Travels is an English-language classic (18th Century), not so often read anymore, but the concept of visiting countries with very different sized individuals is very common in animated cartoons and similar media.

I read it as a kid, but at that age could not understand the fine subtleties of the satire. Different sized people is merely a small part of it.

One which still resonates is the concept of "flappers". Gulliver visited a land where flappers were junior servants to Important People(IP). The key point is that the IP could not communicate with each other unless and until their flappers raised their flaps.

That concept is just as valid and visible today as it was in the 18th century.

Swift was not a children's author, and his writings were very scandalous for a clergyman.
Unfortunately, the different-sized people bits were cleaned up for children, while the rest is ignored.

Flappers was a wonderful concept:  if a person were very, very important, his flappers had flappers.

Towards the end of the book, there are very nasty satires of research institutes, which could have been written by recent politicians.

Swift's most outrageous work was an 1729 essay "A modest proposal", which is too nasty for me to quote here.
Full title:  "A Modest Proposal for Preventing the Children of Poor People from Being a Burthen to Their Parents or Country, and for Making Them Beneficial to the Publick"

Just so. There is a reason it has lasted quarter of a millennium. Decades and lifetimes barely compare.

Lilliput and Brobdingnag are the least interesting ddestinations.

Memo to self: use Project Gutenberg to put a version on my Kindle. (My Kindle has many things, with none contributing to Bezos' fortune :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 9165
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #31 on: May 29, 2025, 12:46:38 am »
I just remember it as Little endian being the Logical one - increasing index (whether it be a bit number or memory address), increasing value.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 6398
  • Country: nz
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #32 on: May 29, 2025, 01:12:05 am »
I just remember it as Little endian being the Logical one - increasing index (whether it be a bit number or memory address), increasing value.

I find it illogical, in that the bytes of numbers and strings are stored in opposite orders in RAM.

e.g. 0x12345678 is stored as a number as 78 56 34 12 but converted to a string is 31 32 33 34 35 36 37 38

Big-endan allows the same comparison function to be used for numbers and strings.

But the world has gone little-endian and it's not worth trying to fight it.
 

Online Analog Kid

  • Super Contributor
  • ***
  • Posts: 4816
  • Country: us
  • DANDY fan (Discretes Are Not Dead Yet)
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #33 on: May 29, 2025, 02:08:25 am »
My, my, turn my back for a second and there's this whole shit-storm brewing over ... endian-ness?

OK, so I'm known for having a pretty short fuse when it come to language stupidities and annoyances. But in this case I really can't see what all the fuss is about; seems like a tempest in a teapot to me.

That might be because of my innate prejudice, since I grew up as an Intel kiddie (8088) and just kinda accepted "littie-endian" as a minor stumbling block (can't tell you how many times I had to get out paper and pencil and draw out the contents of memory vs. registers), but ultimately just a fact of life.

I suppose programming the 68000 might have cured me of that attitude ...
 

Online westfw

  • Super Contributor
  • ***
  • Posts: 4638
  • Country: us
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #34 on: May 29, 2025, 05:45:23 am »
Quote
Computer pioneers and academics were widely read, so everybody recognised that reference.

Nonsense.  The reference was explicitly called out and explained in the paper that was instrumental in getting the terms applied to computing.  https://www.rfc-editor.org/ien/ien137.txt
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 6354
  • Country: gb
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #35 on: May 29, 2025, 07:57:23 am »
So 'western' decimal is little endian? 

I think I have a mental block for this.  For me it just comes down to remembering which end they mean.

If like decimal read from left to right, starting with the "big" numbers and "ending with the little", then it's little endian right?
"What could possibly go wrong?"
Current Open Projects:  68000 Self Build computer + OS.
 

Offline woody

  • Frequent Contributor
  • **
  • Posts: 631
  • Country: nl
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #36 on: May 29, 2025, 08:53:04 am »
Wrong, according to duck.ai:

Big-endian is a method of storing data in which the most significant byte (the "big end") is placed at the lowest memory address. This means that when reading the data, the most important part comes first, similar to how we read numbers from left to right.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 8349
  • Country: fi
    • My home page and email address
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #37 on: May 29, 2025, 09:34:28 am »
This "endianness" discussion gleefully mixes three distinct concepts:
  • Bit order in a sequence, for example in serial communications
  • Byte order
  • Bit labeling
Some people assume "big-endian" and "little-endian" defines all three at once, but that's just a common convention, not a necessity.

For example, IBM and others used to label bits in an unsigned integer value as bit \$b\$ having value \$2^{N-b-1}\$, where \$N\$ is the number of bits in that field.  In other words, they would label bit 0 as the one whose logical value is the largest.

Mathematically, bit \$b\$ having value \$2^b\$ (and for two's complement signed integers, the most significant bit having value \$-2^b\$) is the simplest labeling scheme.  You can re-label the bits in any documentation, without changing the meaning or operation of said documentation at all, if you also include implicit ordering definitions (as in "bits are serialized in the order they are labelled" replaced with "bits are serialized with the most significant bit first").

In 16-bit and 32-bit microcontrollers, byte order is usually defined by the processor, but bit order can often be defined either most significant or least significant bit first for serial peripherals like SPI bus.  Thus, even byte and bit orders are very loosely coupled.

The bit labeling issue is one I could rant for hours, because there are so many people who have the misconception that it is somehow tied to bit or byte order or both.  It isn't; it is purely a convention that the different bit and byte order people chose, apparently to ensure they were the opposite of the one the competition used.  Typical human contrariness, in other words.
« Last Edit: May 29, 2025, 09:36:08 am by Nominal Animal »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 6398
  • Country: nz
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #38 on: May 29, 2025, 10:08:13 am »
For example, IBM and others used to label bits in an unsigned integer value as bit \$b\$ having value \$2^{N-b-1}\$, where \$N\$ is the number of bits in that field.  In other words, they would label bit 0 as the one whose logical value is the largest.

As I wrote about, explicitly mentioning IBM S/360 and POWER and drew diagrams of the numbering options, 21 hours ago:

https://www.eevblog.com/forum/programming/littlebig-endian-the-most-stupid-term-ever-conceived/msg5928662/#msg5928662

Quote
You can re-label the bits in any documentation, without changing the meaning or operation of said documentation at all

Not true when you have instructions such as 8051's "ANL C,ACC.7 ;and carry with accum. bit 7" (and many others), PIC's "BCF f,b; BSF f,b; BTFSC f,b; BTFSS f,b" (bit clear/set, skip if bit clear/set).

Or M68020's "BFSET <ea>{OFFSET:WIDTH}" the description of which explicitly says "Be careful, this instruction operates from MSB to LSB!!" despite Motorola's documentation labelling the LSB as bit 0

https://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/bfset.HTML

Or similar instructions in M88000 to clr, set, ext, extu a bit field and mak to create a mask for a bit field, all of which take a 10 bit width5:offset5 pair either as a 10 bit literal in the instruction OR as the lowest 10 bits in a register.

You CAN NOT wave any of those away as a mere documentation convention, the bit ordering is baked into the hardware -- all the more so with the M88k when you can compute the width:offset pair at runtime.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 3459
  • Country: fi
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #39 on: May 29, 2025, 11:11:17 am »
Latin and Arabic numbers,
one is from left to right and the other is from right to left, but both are still the same.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Precision-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Schneider-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus work shop of the world unknowns)
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 5083
  • Country: gb
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #40 on: May 29, 2025, 12:44:52 pm »
This "endianness" discussion gleefully mixes three distinct concepts:
  • Bit order in a sequence, for example in serial communications
  • Byte order
  • Bit labeling
Some people assume "big-endian" and "little-endian" defines all three at once, but that's just a common convention, not a necessity.

Yup, what I wrote above about myC, is basically "byte-ordering" as "object" property!
myC also has operators for bit-manipulation { bit.set, bit.clr, bit.get, ... }, but bit0 is always the first on the right (bitn-1 ....... bit0).

The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 5083
  • Country: gb
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #41 on: May 29, 2025, 12:52:00 pm »
M68020's "BFSET <ea>{OFFSET:WIDTH}" the description of which explicitly says "Be careful, this instruction operates from MSB to LSB!!" despite Motorola's documentation labelling the LSB as bit 0

Yup, there are some inconsistencies in Motorola's designs.

The first time you pick up an 68k SBC to practice onboard assembly, you have to understand these things for a moment.
m68k is a nice design, all in all, and the doc is one of the best, it is much easier to read and understand than the intel one.
Just, some things are counter-intuitive, or not very coherent.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 8349
  • Country: fi
    • My home page and email address
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #42 on: May 29, 2025, 02:17:30 pm »
You CAN NOT wave any of those away as a mere documentation convention, the bit ordering is baked into the hardware -- all the more so with the M88k when you can compute the width:offset pair at runtime.
I know of similar bit-level "unpack" and "pack" instructions in other ISAs, yes.

In my opinion, such instructions are not enough of a reason to claim bit labeling is somehow subordinate or tied to bit order.  Even if the hardware labels the bits in a specific order, you can document the assembly mnemonic and the parameter values using a different labeling method.  For example, bit \$b\$ in "least significant bit is bit zero" is bit \$2^{N-b-1}\$ in "most significant bit is bit zero in an \$N\$-bit unsigned integer".  You can say it doesn't look nice, but it is equivalent: the same bits will be affected either way.

It is not like the binary instruction encoding has to reflect the logical definition of the instruction, is it?  At least I know of several ISAs where many instructions do not.

So, I DO still claim that bit labeling is not inherently coupled to bit order or byte order, even if some architectures do so implicitly.  And I do still claim that you can change the bit labeling, although you do need to also redefine the documentation for at least the machine instructions (assembly mnemonics) relying on a specific bit labeling.

For example, many ISAs have instructions for counting leading and trailing zero bits.  Instead of describing clz and ctz as such, you could describe them as count most significant zero bits and count least significant zero bits (these definitions applying regardless of what bit labeling scheme one uses, although which is which depends on how the ISA mnemonic names were chosen), and only mentioning as a side note that the actual mnemonic comes from a specific bit labeling scheme.  Similarly for any bit-slicing/offset:width instruction encodings, even if the values involve two subtractions.
« Last Edit: May 29, 2025, 02:21:02 pm by Nominal Animal »
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
  • Retired, now restoring antique test equipment
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #43 on: May 29, 2025, 02:48:21 pm »
Latin and Arabic numbers,
one is from left to right and the other is from right to left, but both are still the same.

Western numerals (1, 2, 3, etc.) are called “Arabic” to distinguish them from “Roman” (I, II, III, IV, etc.), and they are derived from actual Arabic numerals.
I first encountered real Arabic numerals in a hotel in Saudi Arabia.  Leaving the elevator, there was a normal sign indicating directions for ranges of room numbers in both systems.  It was easy to correlate the two values by inspection.
However:  in both systems, a three-digit number read left to right.  Following normal Arabic word order (right to left) the range (two numbers) was written right to left, while the Western range read left to right.

 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 6354
  • Country: gb
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #44 on: May 29, 2025, 06:27:44 pm »
This "endianness" discussion gleefully mixes three distinct concepts:
  • Bit order in a sequence, for example in serial communications
  • Byte order
  • Bit labeling
Some people assume "big-endian" and "little-endian" defines all three at once, but that's just a common convention, not a necessity.

It's hurting my head.  My own fault though, but I was purely thinking bit order.

Byte order is another thing again, but before we could get there we need to discuss words.  Not words like "endian" either.

128, 64, 32, 16, 8, 4, 2,1 - Little endian?

By the way.  This is not a new thing for me.  I did my entire GCSE "Computer Science" exam in Big Endian.

The only reason I got a B overall was because I had shown my working out, including what I was using for bit placeholders.  Even my 2's compliment was perfectly fine, just backwards.
"What could possibly go wrong?"
Current Open Projects:  68000 Self Build computer + OS.
 

Offline paulcaTopic starter

  • Super Contributor
  • ***
  • Posts: 6354
  • Country: gb
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #45 on: May 29, 2025, 06:34:36 pm »
Latin and Arabic numbers,
one is from left to right and the other is from right to left, but both are still the same.

The matrix is a lot more complicated than that.

Western use Arabic numerals.  In today's Arabic world most of them use Hindi numerals, but IIRC their numeric may still be written left to right, while sentences run right to left.

It's been quite a while since I had to deal with Arabic locales... thankfully, so this may be off.


Anyway.  Your point is taken.  The "decimal values" of the bits are only really relevant to us.... OR if you want to convert them to other bases.

10 is always 10 in all bases.
« Last Edit: May 29, 2025, 06:36:39 pm by paulca »
"What could possibly go wrong?"
Current Open Projects:  68000 Self Build computer + OS.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
  • Retired, now restoring antique test equipment
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #46 on: May 29, 2025, 06:41:25 pm »
See my Reply #43 above.
 

Offline AntiProtonBoy

  • Frequent Contributor
  • **
  • Posts: 991
  • Country: au
  • I think I passed the Voight-Kampff test.
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #47 on: June 15, 2025, 06:35:31 am »

WHICH "END" are your referring to, it has TWO?

It's a complete miss-statement.  An invalid logical construct.  Exception: "END" is not defined.
I realise i'm late the the party, but I want to say there is nothing illogical about it. "End" is always interpreted relative to the pen and paper notation, written from left to right. So the "end" implies the last digit of a binary number on the right. Litte endian would use notation such that the most significant digit is written on the left and the least significant bit is written on the right, i.e. at the "end" of the binary digit sequence (much like how we use decimal notation on pen and paper). Big endian would have a sequence such that the most significant bit on the right.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 3459
  • Country: fi
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #48 on: June 17, 2025, 06:36:50 pm »
Actually it's how processors are fetching data from memory.
Or what end is peeking out first.
Or Latin vs. Arabic numbers.

Latin number is from left to right and MSD first.
Arabic number is from right to left and LSD first.

So Arabic number is logical, for example number 3 is always that, if 4 is added beside it 3 is still 3.
So calculation can start when first digit is fetched.

So it defines how to treat beginning and end, but it doesn't define very accurately where those beginning and end actually are.
So for memory access little endianness ends big, but first comes out little, like from a morning egg.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Precision-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-OR-X-REO-Schneider-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-Tritron-YFE
(plus work shop of the world unknowns)
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 11887
  • Country: us
  • Retired, now restoring antique test equipment
Re: Little/Big-Endian the most stupid term ever conceived.
« Reply #49 on: June 17, 2025, 06:51:53 pm »
Actually it's how processors are fetching data from memory.
Or what end is peeking out first.
Or Latin vs. Arabic numbers.

Latin number is from left to right and MSD first.
Arabic number is from right to left and LSD first.

So Arabic number is logical, for example number 3 is always that, if 4 is added beside it 3 is still 3.
So calculation can start when first digit is fetched.

So it defines how to treat beginning and end, but it doesn't define very accurately where those beginning and end actually are.
So for memory access little endianness ends big, but first comes out little, like from a morning egg.

As I pointed out above, in Arabia the traditional Arabic numerals (similar to the Western “Arabic” numerals derived from them that replaced Roman numerals) are placed within multi-digit numbers in the same order used in the West.
  However,  I saw Arabic and Western word order used with sequences in Saudi Arabia.
Specifically, Western “{ABC} — {XYZ}” and Arabic “{XYZ} — {ABC}” for directions to hotel rooms posted at the elevator, where the digit symbols were Western “Arabic” and Arabic “Arabic”, respectively.
To clarify, by {ABC} and {XYZ}, I mean three-digit positive integers (room numbers), where {ABC} < {XYZ}, and the digits are Western or Arabic, as specified.
« Last Edit: June 17, 2025, 08:14:52 pm by TimFox »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf