Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Can somebody share difference between big and little endian
Can somebody share difference between big and little endian
Hi all,
I had read about big and little endian and did read http://www.cs.umd.edu/class/sum2003/cms ... ndian.html but didn't understand anything.
The gist I got though is that information which is in one format cannot be transferred to other without some sort of conversion.
Unfortunately the link/page didn't do a good page explaining it to those (like me) whose understanding of memory and array is very weak. Can somebody take a stab at it.
Also does anybody know of any programs in Debian which do this sort of conversion ?
Another thing, where does amd64 come into the picture ? is 386 and amd64 little endian or big endian ?
Looking forward to know more.
I had read about big and little endian and did read http://www.cs.umd.edu/class/sum2003/cms ... ndian.html but didn't understand anything.
The gist I got though is that information which is in one format cannot be transferred to other without some sort of conversion.
Unfortunately the link/page didn't do a good page explaining it to those (like me) whose understanding of memory and array is very weak. Can somebody take a stab at it.
Also does anybody know of any programs in Debian which do this sort of conversion ?
Another thing, where does amd64 come into the picture ? is 386 and amd64 little endian or big endian ?
Looking forward to know more.
Intel Dual-Core CPU E5400 (soc 775) @ 2.70GHz, onboard Intel G33, Asus MB P5KPL-AM IN (Intel G31), D-Link 2750u modem+router, 64-bit Debian Testing, Mate 1.26
-
- Posts: 959
- Joined: 2006-07-15 12:08
Re: Can somebody share difference between big and little end
Here's what wikipedia says about it:
Big-endian systems store the most significant byte of a word in the smallest address and the least significant byte is stored in the largest address.
Little-endian systems, in contrast, store the least significant byte in the smallest address.
So if you have a 2 byte integer containing the value 32766, or 7ffe in hex, a big endian system would store it as fe7f while little endian would store it as 7ffe. Where this matters is when a big endian system is transmitting data to a little endian system. The protocol would have to take that into consideration.
Big-endian systems store the most significant byte of a word in the smallest address and the least significant byte is stored in the largest address.
Little-endian systems, in contrast, store the least significant byte in the smallest address.
So if you have a 2 byte integer containing the value 32766, or 7ffe in hex, a big endian system would store it as fe7f while little endian would store it as 7ffe. Where this matters is when a big endian system is transmitting data to a little endian system. The protocol would have to take that into consideration.
Re: Can somebody share difference between big and little end
You just posted the same link the OP posted, where he explicitly indicated that he did not understand it.hakerdefo wrote:The following article describes the difference in the easiest way,
Big and Little Endian
Cheers!!!
Your point is?
Re: Can somebody share difference between big and little end
I didn't check the link Shirish posted and searched the internet for a good article on big & little Endian and after going through many articles on the subject I posted the link to what I thought to be the best and easiest article.reinob wrote:You just posted the same link the OP posted, where he explicitly indicated that he did not understand it.
Your point is?
Weird, ain't it?!?
Cheers!!!
Re: Can somebody share difference between big and little end
Indeedhakerdefo wrote:I didn't check the link Shirish posted and searched the internet for a good article on big & little Endian and after going through many articles on the subject I posted the link to what I thought to be the best and easiest article.reinob wrote:You just posted the same link the OP posted, where he explicitly indicated that he did not understand it.
Your point is?
Weird, ain't it?!?
Cheers!!!
@shirish,
In case you still have not found an answer to your questions..
Let's say you have a memory, which is an array (sequence) of 8-bit bytes, each one having an address from 0 (zero) to 1024 (for example).Unfortunately the link/page didn't do a good page explaining it to those (like me) whose understanding of memory and array is very weak. Can somebody take a stab at it.
You want to store a 16-bit number, e.g. 4660 (in decimal). That number is 0x1234 in hexadecimal (the "0x" prefix serves to clarify that).
Now you could store it this way:
FIRST MEMORY BYTE: 0x12
SECOND MEMORY BYTE: 0x34
or
FIRST MEMORY BYTE: 0x34
SECOND MEMORY BYTE: 0x12
If you do it the first way then you're "big endian" (~ straightforward, intuitive). If you do it the second way you're "little endian" (~ swapped, weird, counter-intuitive: used by all x86 processors .
Clear?
If so, you can now imagine what happens when you store a 32-bit number (i.e. using 4 8-bit memory bytes) or even a 64-bit number, but first you need to confirm that you've understood the case for 16-bit.
You should never need to do this, unless you happen to have a binary file where you want to swap bytes. Please ask again if you really need this (you could program it yourself as an excercise -- then you'll understand clearly the endianness topic).Also does anybody know of any programs in Debian which do this sort of conversion ?
little.Another thing, where does amd64 come into the picture ? is 386 and amd64 little endian or big endian ?
Re: Can somebody share difference between big and little end
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
Re: Can somebody share difference between big and little end
llivv, I've a feeling we're not in Kansas anymorellivv wrote:Dorothy, are you still in Kansas?
Another good article on the subject,
http://www.ietf.org/rfc/ien/ien137.txt
Cheers!!!
Re: Can somebody share difference between big and little end
For me it'shakerdefo wrote:llivv, I've a feeling we're not in Kansas anymore
"More than a Feeling"
search youtube if the qoute doesn't spark any memories.
thanks for the link http://www.ietf.org/rfc/ien/ien137.txt
paragraph 7 reads
"Computer memory may be viewed as a linear sequence of bits, divided into
bytes, words, pages and so on. Each unit is a subunit of the next
level. This is, obviously, a hierarchical organization."
currently, The ultimate assembly line, in our ever increasing world of assembly lines.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
Re: Can somebody share difference between big and little end
Listened to them a lot in the old days when my parents used to think I was a wayword son.llivv wrote:For me it's
"More than a Feeling"
search youtube if the qoute doesn't spark any memories.
Haven't listened to their music in recent times but wayword son I still am
Cheers!!!
Re: Can somebody share difference between big and little end
The way I remember it, the issue of big endian vs. little endian came up often when code on PC compatible computers with AMD or Intel processors was being modified to run on Apple computers with Motorola processors.BowCatShot wrote:So if you have a 2 byte integer containing the value 32766, or 7ffe in hex, a big endian system would store it as fe7f while little endian would store it as 7ffe. Where this matters is when a big endian system is transmitting data to a little endian system. The protocol would have to take that into consideration.
Now that Apple is using Intel compatible processors, the issue is less likely to come up.
WinXP Compaq Presario overwritten with Wheezy.
WinVista laptop sometimes runs DebianLive. (Hoping to setup a USB HD with persistence.)
WinVista laptop sometimes runs DebianLive. (Hoping to setup a USB HD with persistence.)