Difference between revisions of "Endianness"

From Data Crystal
Jump to: navigation, search
(corrected myself, plus better explanation)
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Endianness''' or '''byte order''' is the order of [[Binary#Byte|bytes]] in a multi-[[Binary#Byte|byte]] value like a [[Binary#Word|word]].
+
'''Endianness''' or '''byte order''' is the order of [[Binary#Byte|bytes]] in a multi-[[Binary#Byte|byte]] value like a [[Binary#Word|word]]. Architectures may be "big", "little", or "bi-" endian.
  
In the context of romhacking, "endianness" is a misappropriation: its usage has nothing at all to do with actual order of bytes its prefix denotes, but is rather the case of an error of articulation that became standardized, and so obtained a meaning independent of the conventions of language. In romhacking (as internally with respect to the CPUs used in older systems, "little-endian" means the least signficiant byte is ordered first in memory, not last. "Big-endian", conversely, means the most significant byte is first. "Little-endian" is actually "little-firstian" or "little-startian", and "Big-endian" is actually "Big-firstian" or "Big-startian" (only in the context of hacking).
+
In the context of romhacking, "endianness" is a misappropriation: its usage has nothing at all to do with the actual order of bytes its prefix denotes, but is rather the case of an error of articulation that became standardized, and so obtained a meaning independent of the conventions of language. In romhacking (as internally with respect to the CPUs used in older systems, "little-endian" means the least signficiant byte is ordered first in memory, not last. "Big-endian", conversely, means the most significant byte is first. "Little-endian" is actually "little-firstian" or "little-startian", and "Big-endian" is actually "Big-firstian" or "Big-startian" (only in the context of hacking).
  
 
Assemblers and compilers require the use of standard hexidecimal in code, which is little-endian in its truest sense, so the order in which you write the hex nibbles in your code may or may not be the order in which you pull them from memory, depending on the endianness of the architecture. (for example, it's not reversed on Sega Genesis, but is reversed on Nintendo or the Master System/Game Gear, for that matter).  
 
Assemblers and compilers require the use of standard hexidecimal in code, which is little-endian in its truest sense, so the order in which you write the hex nibbles in your code may or may not be the order in which you pull them from memory, depending on the endianness of the architecture. (for example, it's not reversed on Sega Genesis, but is reversed on Nintendo or the Master System/Game Gear, for that matter).  
  
 
Many newer architectures use bi-endianness, in which the endianess varies depending on the context.
 
Many newer architectures use bi-endianness, in which the endianess varies depending on the context.
 
{{moreinfo wikipedia|page=Endianness}}
 
  
 
==Little endian systems==
 
==Little endian systems==
Line 20: Line 18:
 
* [[Sega Genesis]]
 
* [[Sega Genesis]]
 
* Many Internet protocols, such as TCP.
 
* Many Internet protocols, such as TCP.
 +
 +
== See also ==
 +
 +
[https://en.wikipedia.org/wiki/Endianness Wikipedia article on endianness]
  
 
{{stub}}
 
{{stub}}

Latest revision as of 16:16, 6 April 2016

Endianness or byte order is the order of bytes in a multi-byte value like a word. Architectures may be "big", "little", or "bi-" endian.

In the context of romhacking, "endianness" is a misappropriation: its usage has nothing at all to do with the actual order of bytes its prefix denotes, but is rather the case of an error of articulation that became standardized, and so obtained a meaning independent of the conventions of language. In romhacking (as internally with respect to the CPUs used in older systems, "little-endian" means the least signficiant byte is ordered first in memory, not last. "Big-endian", conversely, means the most significant byte is first. "Little-endian" is actually "little-firstian" or "little-startian", and "Big-endian" is actually "Big-firstian" or "Big-startian" (only in the context of hacking).

Assemblers and compilers require the use of standard hexidecimal in code, which is little-endian in its truest sense, so the order in which you write the hex nibbles in your code may or may not be the order in which you pull them from memory, depending on the endianness of the architecture. (for example, it's not reversed on Sega Genesis, but is reversed on Nintendo or the Master System/Game Gear, for that matter).

Many newer architectures use bi-endianness, in which the endianess varies depending on the context.

Little endian systems

Big endian systems

See also

Wikipedia article on endianness