Originally posted by torsionbar28
View Post
Announcement
Collapse
No announcement yet.
Debian Guts Support For Old MIPS CPUs
Collapse
X
-
- Likes 2
-
Originally posted by coder View PostNo. BE is only used in networking by convention - not because it's actually any better-suited to the task.
LE has the advantage that the numeric value of a byte in memory doesn't change based on the word size you use to read it.
The only real advantage BE has is due to the western convention to write more significant digits to the left. So, when viewing a hex dump, it's easier for silly humans to understand. The better solution is to write better tools. For instance, if you just have your LE hex dump display addresses increasing from right-to-left, that would nullify this advantage of BE.
And the reason we write BE, is because we took arab numbers from a Arabic that writes right-to-left and kept the number right-to-left instead of inverting them to match our left-to-right writing
Though the random coincedence that we write numbers and text with different alignment makes western invoices and budgets better organized since we can align and flush the text fields to the left, and align and flush the numbers to the right. Languages that writes text and numbers in the same direction needs to know the largest number before being able to write the first number in a column on the other side of the paper, and probably wouldn't have invented the notion of flushing numbers to the other side of the paper as it only makes sense when text and numbers are aligned opposingly.Last edited by carewolf; 22 August 2019, 03:47 AM.
- Likes 1
Comment
-
Originally posted by carewolf View PostThat is all correct.
And the reason we write BE, is because we took arab numbers from a Arabic that writes right-to-left and kept the number right-to-left instead of inverting them to match our left-to-right writing
Network Format is BigEndian..
You can try to paint it has you prefer to suit your ego, or Religion( ..but that is YET another thing.. )
This subject is like a religious war, never ending..
Each architecture has its pros and cons..
Number in BE are correctly printed, in hexa, as it his a natural notation for humans.
ie:
0x0123456789
I am using the Arabic Numerology, like we use in the Christian Society, from the left to right..
A number in BE is like that!
On Contrast,
Writing a number in LE, is written like in Arabic Alphabetic Cultures... from Right to Left.
taking the same example, , LE is like this:
8967452301
This is the motive why is more efficient to convert from Binary to Decimal in BE, than in LE..
Its also a lot more efficient to know if a number is positive or negative in BE..
It doesn't meant that LE arch's have not adapted their instruction sets to solve this network problem,
They indeed for sure have made something about it..but even so, it waists energy doing conversions for every single packet, you receive/send..
Usually the user don't feel this problem, because its the operating system that do this low level stuff, with functions like:
htons() - "Host to Network Short"
htonl() - "Host to Network Long"
ntohs() - "Network to Host Short"
ntohl() - "Network to Host Long"
This subject its like religion, for me from a natural human form, hexa format is very appreciated, and for that BE seems better..
But this has nothing to do with x86 vx MIPS vs others...since this stuff is inherent to formats, nor archs..
Ofcourse LE format will fetch first number( 0x89) to the lower significant register used, it will be almost the same( not for hexa readability..has humans tough ).
But the network problem is there for LE..
Comment
-
Originally posted by d4ddi0 View PostNo, you're confused.
Originally posted by d4ddi0 View PostThe process of byteswapping is in theory an inefficiency, but only when sending/receiving across the wire AND a lot of standards specifically denote little endian wire formats these days, since most machines are little endian and have be nigh forever.
Originally posted by d4ddi0 View PostAnd really, either way, modern machines are really fast at doing these conversions, so compared to sending/receiving stuff from memory, or (orders of magnitude more expensive) sending and receiving over the network, the conversions are effectively free.
in BE it fetch the MSB and store it in a MSB significant location,
in LE you fetch the LSB and store it in a LSB significant location.. no advantages here for any one..
Inside each, its the same or almost the same, with advantages to BE in finding faster if the number is positive or negative( for obvious reasons.. ).
But I was not talking about 'archs improvements', but instead about formats..
Comment
-
- Likes 1
Comment
-
Originally posted by coder View PostIt's not inherently more efficient - it's only better if you're serializing to a format that is natively BE. By convention, a lot of network protocols are.
Originally posted by coder View PostIf they were natively LE, then the shoe would be on the other foot.
- Likes 1
Comment
-
Originally posted by carewolf View PostI like the idea that hexidecimal is the most natural notations for humans..
So yes its the best notation for humans, that are dealing with machines..
And its a lot better if it his written correctly has we speak, which means...from left to right..
BE - 0x0123456789
Originally posted by carewolf View PostDon't think it is true, but I like the idea
What is for you the best human readable notation( if not correct hexa )??
Comment
-
Comment