Jump to content

Edit filter log

Details for log entry 36736145

00:20, 9 January 2024: 2a02:cb80:407a:9729:3934:70dd:93be:f033 (talk) triggered filter 30, performing the action "edit" on Endianness. Actions taken: Warn; Filter description: Large deletion from article by new editors (examine)

Changes made in edit

{{Short description|Order of bytes in a computer word}}
{{Redirect2|Big-endian|Little-endian|the conflicting ideologies in ''Gulliver's Travels''|Lilliput and Blefuscu#History and politics}}
{{For|the specific use of endianness in date formats|Calendar date}}
{{refimprove|date=July 2020}}
[[file:Gullivers_travels.jpg|thumb|''[[Gulliver's Travels]]'' by [[Jonathan Swift]], the novel from which the term was coined]]

In [[computing]], '''endianness''' is the order or sequence of [[byte]]s of a [[word (data type)|word]] of digital data in [[computer memory]] or [[data communication]] which is identified by describing the impact of the "first" bytes, meaning at the smallest address or sent first. Endianness is primarily expressed as '''big-endian''' (BE) or '''little-endian''' (LE), terms introduced by [[Danny Cohen (computer scientist)|Danny Cohen]] into computer science for data ordering in an [[Internet Experiment Note]] published in 1980.<ref name="HOLY">{{cite IETF | title = On Holy Wars and a Plea for Peace | ien = 137 | last = Cohen |first = Danny | author-link = Danny Cohen (computer scientist) | date = 1980-04-01 | url = http://www.ietf.org/rfc/ien/ien137.txt | publisher = [[Internet Engineering Task Force|IETF]] }} Also published at ''[[IEEE Computer]]'', [https://ieeexplore.ieee.org/document/1667115 October 1981 issue].</ref> The adjective ''endian'' has its origin in the writings of 18th century Anglo-Irish writer [[Jonathan Swift]]. In the 1726 novel ''[[Gulliver's Travels]]'', he portrays the conflict between sects of Lilliputians divided into those breaking the shell of a [[boiled egg]] from the big end or from the little end.<ref>{{cite book | first = Jonathan |last =Swift | title = Gulliver's Travels | chapter = A Voyage to Lilliput, Chapter IV | year = 1726 | chapter-url = https://en.wikisource.org/wiki/The_Works_of_the_Rev._Jonathan_Swift/Volume_6/A_Voyage_to_Lilliput/Chapter_4 }}</ref><ref>{{Citation | last1 = Bryant | first1 = Randal E. | author-link = Randal Bryant | last2 = David | first2 = O'Hallaron | title = Computer Systems: A Programmer's Perspective | publisher = Pearson Education | year = 2016 | edition = 3 | isbn = 978-1-488-67207-1 | page = 79 }}</ref>

Computers store information in various-sized groups of binary bits. Each group is assigned a number, called its ''address'', that the computer uses to access that data. On most modern computers, the smallest data group with an address is eight bits long and is called a byte. Larger groups comprise two or more bytes, for example, a [[32-bit computing|32-bit]] word contains four bytes. There are two possible ways a computer could number the individual bytes in a larger group, starting at either end. Both types of endianness are in widespread use in digital electronic engineering. The initial choice of endianness of a new design is often arbitrary, but later technology revisions and updates perpetuate the existing endianness to maintain [[backward compatibility]].

A big-endian system stores the [[most significant byte]] of a word at the smallest [[memory address]] and the [[least significant byte]] at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.<ref>[https://betterexplained.com/articles/understanding-big-and-little-endian-byte-order/ Understanding big and little endian byte order]</ref><ref>[https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/ByteOrdering.html#//apple_ref/doc/uid/20001150-CJBEJBHH Byte Ordering PPC]</ref><ref>[https://developer.ibm.com/articles/au-endianc/ Writing endian-independent code in C]</ref> Of the two, big-endian is thus closer to the way the digits of numbers are written left-to-right in English, comparing digits to bytes. ''Bi-endianness'' is a feature supported by numerous computer architectures that feature switchable endianness in data fetches and stores or for instruction fetches. Other orderings are generically called ''middle-endian'' or ''mixed-endian''.<ref>{{cite web |title = Internet Hall of Fame Pioneer |url = http://internethalloffame.org/inductees/danny-cohen |website = [[Internet Hall of Fame]] |publisher = [[The Internet Society]] }}</ref><ref>{{cite web | first = David |last = Cary | title = Endian FAQ | url = http://david.carybros.com/html/endian_faq.html | access-date = 2010-10-11 }}</ref><ref>{{cite journal | last = James |first = David V. | title = Multiplexed buses: the endian wars continue | journal = [[IEEE Micro]] | date = June 1990 | volume = 10 | issue = 3 | pages = 9–21 | doi = 10.1109/40.56322 | s2cid = 24291134 | issn = 0272-1732 }}</ref><ref>{{cite web | last1 = Blanc |first1 = Bertrand | last2 = Maaraoui |first2 = Bob | title = Endianness or Where is Byte 0? | date = December 2005 | url = http://3bc.bertrand-blanc.com/endianness05.pdf | access-date = 2008-12-21 }}</ref>

Big-endianness is the dominant ordering in networking protocols, such as in the [[Internet protocol suite]], where it is referred to as ''network order'', transmitting the most significant byte first. Conversely, little-endianness is the dominant ordering for processor architectures ([[x86]], most [[ARM architecture|ARM]] implementations, base [[RISC-V]] implementations) and their associated memory. [[File format]]s can use either ordering; some formats use a mixture of both or contain an indicator of which ordering is used throughout the file.<ref>{{Cite IETF|date=April 1992|rfc=1314|title=A File Format for the Exchange of Images in the Internet|page=7|access-date=2021-08-16 }}</ref>

== Characteristics ==
== Characteristics ==
[[file:32bit-Endianess.svg|thumb|upright=2|Diagram demonstrating big- versus little-endianness]]
[[file:32bit-Endianess.svg|thumb|upright=2|Diagram demonstrating big- versus little-endianness]]

Action parameters

VariableValue
Edit count of the user (user_editcount)
null
Name of the user account (user_name)
'2A02:CB80:407A:9729:3934:70DD:93BE:F033'
Age of the user account (user_age)
0
Groups (including implicit) the user is in (user_groups)
[ 0 => '*' ]
Rights that the user has (user_rights)
[ 0 => 'createaccount', 1 => 'read', 2 => 'edit', 3 => 'createtalk', 4 => 'writeapi', 5 => 'viewmyprivateinfo', 6 => 'editmyprivateinfo', 7 => 'editmyoptions', 8 => 'abusefilter-log-detail', 9 => 'urlshortener-create-url', 10 => 'centralauth-merge', 11 => 'abusefilter-view', 12 => 'abusefilter-log', 13 => 'vipsscaler-test' ]
Whether the user is editing from mobile app (user_app)
false
Whether or not a user is editing through the mobile interface (user_mobile)
true
Page ID (page_id)
43026
Page namespace (page_namespace)
0
Page title without namespace (page_title)
'Endianness'
Full page title (page_prefixedtitle)
'Endianness'
Edit protection level of the page (page_restrictions_edit)
[]
Last ten users to contribute to the page (page_recent_contributors)
[ 0 => 'Wavelet transformer', 1 => 'Thumperward', 2 => '119.234.7.52', 3 => 'Nsaintarnaud', 4 => 'AnomieBOT', 5 => '72.68.206.93', 6 => 'SilverbackNet', 7 => 'Bernhardmgruber', 8 => 'Aeroid', 9 => '209.166.123.115' ]
Page age in seconds (page_age)
689358036
Action (action)
'edit'
Edit summary/reason (summary)
''
Old content model (old_content_model)
'wikitext'
New content model (new_content_model)
'wikitext'
Old page wikitext, before the edit (old_wikitext)
'{{Short description|Order of bytes in a computer word}} {{Redirect2|Big-endian|Little-endian|the conflicting ideologies in ''Gulliver's Travels''|Lilliput and Blefuscu#History and politics}} {{For|the specific use of endianness in date formats|Calendar date}} {{refimprove|date=July 2020}} [[file:Gullivers_travels.jpg|thumb|''[[Gulliver's Travels]]'' by [[Jonathan Swift]], the novel from which the term was coined]] In [[computing]], '''endianness''' is the order or sequence of [[byte]]s of a [[word (data type)|word]] of digital data in [[computer memory]] or [[data communication]] which is identified by describing the impact of the "first" bytes, meaning at the smallest address or sent first. Endianness is primarily expressed as '''big-endian''' (BE) or '''little-endian''' (LE), terms introduced by [[Danny Cohen (computer scientist)|Danny Cohen]] into computer science for data ordering in an [[Internet Experiment Note]] published in 1980.<ref name="HOLY">{{cite IETF | title = On Holy Wars and a Plea for Peace | ien = 137 | last = Cohen |first = Danny | author-link = Danny Cohen (computer scientist) | date = 1980-04-01 | url = http://www.ietf.org/rfc/ien/ien137.txt | publisher = [[Internet Engineering Task Force|IETF]] }} Also published at ''[[IEEE Computer]]'', [https://ieeexplore.ieee.org/document/1667115 October 1981 issue].</ref> The adjective ''endian'' has its origin in the writings of 18th century Anglo-Irish writer [[Jonathan Swift]]. In the 1726 novel ''[[Gulliver's Travels]]'', he portrays the conflict between sects of Lilliputians divided into those breaking the shell of a [[boiled egg]] from the big end or from the little end.<ref>{{cite book | first = Jonathan |last =Swift | title = Gulliver's Travels | chapter = A Voyage to Lilliput, Chapter IV | year = 1726 | chapter-url = https://en.wikisource.org/wiki/The_Works_of_the_Rev._Jonathan_Swift/Volume_6/A_Voyage_to_Lilliput/Chapter_4 }}</ref><ref>{{Citation | last1 = Bryant | first1 = Randal E. | author-link = Randal Bryant | last2 = David | first2 = O'Hallaron | title = Computer Systems: A Programmer's Perspective | publisher = Pearson Education | year = 2016 | edition = 3 | isbn = 978-1-488-67207-1 | page = 79 }}</ref> Computers store information in various-sized groups of binary bits. Each group is assigned a number, called its ''address'', that the computer uses to access that data. On most modern computers, the smallest data group with an address is eight bits long and is called a byte. Larger groups comprise two or more bytes, for example, a [[32-bit computing|32-bit]] word contains four bytes. There are two possible ways a computer could number the individual bytes in a larger group, starting at either end. Both types of endianness are in widespread use in digital electronic engineering. The initial choice of endianness of a new design is often arbitrary, but later technology revisions and updates perpetuate the existing endianness to maintain [[backward compatibility]]. A big-endian system stores the [[most significant byte]] of a word at the smallest [[memory address]] and the [[least significant byte]] at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.<ref>[https://betterexplained.com/articles/understanding-big-and-little-endian-byte-order/ Understanding big and little endian byte order]</ref><ref>[https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/ByteOrdering.html#//apple_ref/doc/uid/20001150-CJBEJBHH Byte Ordering PPC]</ref><ref>[https://developer.ibm.com/articles/au-endianc/ Writing endian-independent code in C]</ref> Of the two, big-endian is thus closer to the way the digits of numbers are written left-to-right in English, comparing digits to bytes. ''Bi-endianness'' is a feature supported by numerous computer architectures that feature switchable endianness in data fetches and stores or for instruction fetches. Other orderings are generically called ''middle-endian'' or ''mixed-endian''.<ref>{{cite web |title = Internet Hall of Fame Pioneer |url = http://internethalloffame.org/inductees/danny-cohen |website = [[Internet Hall of Fame]] |publisher = [[The Internet Society]] }}</ref><ref>{{cite web | first = David |last = Cary | title = Endian FAQ | url = http://david.carybros.com/html/endian_faq.html | access-date = 2010-10-11 }}</ref><ref>{{cite journal | last = James |first = David V. | title = Multiplexed buses: the endian wars continue | journal = [[IEEE Micro]] | date = June 1990 | volume = 10 | issue = 3 | pages = 9–21 | doi = 10.1109/40.56322 | s2cid = 24291134 | issn = 0272-1732 }}</ref><ref>{{cite web | last1 = Blanc |first1 = Bertrand | last2 = Maaraoui |first2 = Bob | title = Endianness or Where is Byte 0? | date = December 2005 | url = http://3bc.bertrand-blanc.com/endianness05.pdf | access-date = 2008-12-21 }}</ref> Big-endianness is the dominant ordering in networking protocols, such as in the [[Internet protocol suite]], where it is referred to as ''network order'', transmitting the most significant byte first. Conversely, little-endianness is the dominant ordering for processor architectures ([[x86]], most [[ARM architecture|ARM]] implementations, base [[RISC-V]] implementations) and their associated memory. [[File format]]s can use either ordering; some formats use a mixture of both or contain an indicator of which ordering is used throughout the file.<ref>{{Cite IETF|date=April 1992|rfc=1314|title=A File Format for the Exchange of Images in the Internet|page=7|access-date=2021-08-16 }}</ref> == Characteristics == [[file:32bit-Endianess.svg|thumb|upright=2|Diagram demonstrating big- versus little-endianness]] [[Computer memory]] consists of a sequence of storage cells (smallest [[address space|addressable]] units); in machines that support [[byte addressing]], those units are called ''[[byte]]s''. Each byte is identified and accessed in hardware and software by its [[memory address]]. If the total number of bytes in memory is ''n'', then addresses are enumerated from 0 to ''n''&nbsp;−&nbsp;1. Computer programs often use data structures or [[Field (computer science)|fields]] that may consist of more data than can be stored in one byte. In the context of this article where its type cannot be arbitrarily complicated, a "field" consists of a consecutive sequence of bytes and represents a "simple data value" which – at least potentially – can be manipulated by ''one'' single [[Instruction set architecture|hardware instruction]]. On most systems, the address of a multi-byte simple data value is the address of its first byte (the byte with the lowest address). An exception to this rule is e.g. the Add instruction of the [[IBM 1401]] which addresses variable-length fields at their low-order (highest-addressed) position with their lengths being defined by a [[Word mark (computer hardware)|word mark]] set at their high-order (lowest-addressed) position. When an operation such as addition is performed, the processor begins at the low-order positions at the high addresses of the two fields and works its way down to the high-order.{{cn|date=November 2023}} Another important attribute of a byte being part of a "field" is its "significance". These attributes of the parts of a field play an important role in the sequence the bytes are accessed by the computer hardware, more precisely: by the low-level algorithms contributing to the results of a computer instruction. === Numbers === [[Positional notation|Positional number systems]] (mostly base 2, or less often base 10) are the predominant way of representing and particularly of manipulating [[Integer (computer science)|integer data]] by computers. In pure form this is valid for moderate sized non-negative integers, e.g. of C data type <code>[[Data type#Numeric types|unsigned]]</code>. In such a number system, the ''value'' of a digit which it contributes to the whole number is determined not only by its value as a single digit, but also by the position it holds in the complete number, called its significance. These positions can be mapped to memory mainly in two ways:<ref name="TanenbaumAustin2012">{{cite book |first1 = Andrew S. |last1 = Tanenbaum |first2 = Todd M. |last2 = Austin |title = Structured Computer Organization |url = https://books.google.com/books?id=m0HHygAACAAJ |access-date = 18 May 2013 |date = 4 August 2012 |publisher = Prentice Hall PTR |isbn = 978-0-13-291652-3 }}</ref> * Decreasing numeric significance with increasing memory addresses (or increasing time), known as ''big-endian'' and * Increasing numeric significance with increasing memory addresses (or increasing time), known as ''little-endian''. In these expressions, the term "end" is meant as the extremity where the ''big'' resp. ''little'' significance is written ''first'', namely where the field ''starts''. The integer data that are directly supported by the [[Arithmetic logic unit|computer hardware]] have a fixed width of a low power of 2, e.g. 8 bits ≙ 1 byte, 16 bits ≙ 2 bytes, 32 bits ≙ 4 bytes, 64 bits ≙ 8 bytes, 128 bits ≙ 16 bytes. The low-level access sequence to the bytes of such a field depends on the operation to be performed. The least-significant byte is accessed first for [[addition]], [[subtraction]] and [[multiplication]]. The most-significant byte is accessed first for [[Division (mathematics)|division]] and [[Natural number#Order|comparison]]. See {{section link||Calculation order}}. === Text === When character (text) strings are to be compared with one another, e.g. in order to support some mechanism like [[Sorting algorithm|sorting]], this is very frequently done [[Lexicographical order|lexicographically]] where a single positional element (character) also has a positional value. Lexicographical comparison means almost everywhere: first character ranks highest – as in the telephone book. Almost all machines which can do this using a single instruction are big-endian or at least mixed-endian.{{cn|date=November 2023}} Integer numbers written as text are always represented most significant digit first in memory, which is similar to big-endian, independently of [[text direction]]. === Byte addressing === {{See also|Byte addressing}} When memory bytes are printed sequentially from left to right (e.g. in a [[hex dump]]), little-endian representation of integers has the significance increasing from left to right. In other words, it appears backwards when visualized, which can be counter-intuitive. This behavior arises, for example, in [[FourCC]] or similar techniques that involve packing characters into an integer, so that it becomes a sequences of specific characters in memory. For example, take the string "JOHN", stored in hexadecimal [[ASCII]]. On big-endian machines, the value appears left-to-right, coinciding with the correct string order for reading the result ("J O H N"). But on a little-endian machine, one would see "N H O J". Middle-endian machines complicate this even further; for example, on the [[PDP-11]], the 32-bit value is stored as two 16-bit words "JO" "HN" in big-endian, with the characters in the 16-bit words being stored in little-endian, resulting in "O J N H".{{cn|date=November 2023}} === Byte swapping === Byte-swapping consists of rearranging bytes to change endianness. Many compilers provide [[Intrinsic function|built-ins]] that are likely to be compiled into native processor instructions ({{code|bswap}}/{{code|movbe}}), such as {{code|__builtin_bswap32}}. Software interfaces for swapping include: * Standard [[#Networking|network endianness]] functions (from/to BE, up to 32-bit).<ref>{{man|3|byteorder|Linux}}</ref> Windows has a 64-bit extension in {{code|winsock2.h}}. * BSD and Glibc {{code|endian.h}} functions (from/to BE and LE, up to 64-bit).<ref>{{man|3|endian|Linux}}</ref> * [[macOS]] {{code|OSByteOrder.h}} macros (from/to BE and LE, up to 64-bit). * The {{code|std::byteswap}} function in [[C++23]].<ref>{{cite web |title=std::byteswap |url=https://en.cppreference.com/w/cpp/numeric/byteswap |website=en.cppreference.com |access-date=3 October 2023}}</ref> Some [[CPU]] instruction sets provide native support for endian byte swapping, such as {{code|bswap}}<ref>{{cite web|url=http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf |archive-date=2022-10-09 |url-status=live|title=Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z|at=p. 3–112|publisher=Intel|date=September 2016|access-date=2017-02-05}}</ref> ([[x86]] - [[Intel 80486|486]] and later), and {{code|rev}}<ref>{{cite web|url=http://infocenter.arm.com/help/topic/com.arm.doc.ddi0487a.k_10775/index.html|title=ARMv8-A Reference Manual|publisher=[[ARM Holdings]]}}</ref> ([[ARM architecture|ARMv6]] and later). Some [[compiler]]s have built-in facilities for byte swapping. For example, the [[Intel]] [[Fortran]] compiler supports the non-standard {{code|CONVERT}} specifier when opening a file, e.g.: {{code|1=OPEN(unit, CONVERT='BIG_ENDIAN',...)|2=fortran|class=nowrap}}. Other compilers have options for generating code that globally enables the conversion for all file IO operations. This permits the reuse of code on a system with the opposite endianness without code modification. == Considerations == === Simplified access to part of a field === On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address); little-endian systems of that type have the property that, for sufficiently low data values, the same value can be read from memory at different lengths without using different addresses (even when [[byte alignment|alignment]] restrictions are imposed). For example, a 32-bit memory location with content {{code|4A 00 00 00|class=nowrap}} can be read at the same address as either [[8-bit computing|8-bit]] (value = 4A), [[16-bit computing|16-bit]] (004A), [[24-bit computing|24-bit]] (00004A), or [[32-bit computing|32-bit]] (0000004A), all of which retain the same numeric value. Although this little-endian property is rarely used directly by high-level programmers, it is occasionally employed by code optimizers as well as by [[assembly language]] programmers. While not allowed by C++, such [[type punning]] code is allowed as "implementation-defined" by the C11 standard<ref>{{cite web |title = C11 standard |url = https://www.iso.org/standard/57853.html |publisher = ISO |access-date=15 August 2018 |at = Section 6.5.2.3 "Structure and Union members", §3 and footnote 95 }}</ref> and commonly used<ref>{{cite web |title=3.10 Options That Control Optimization: -fstrict-aliasing |url=https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type-punning |website=GNU Compiler Collection (GCC) |publisher=Free Software Foundation |access-date=15 August 2018}}</ref> in code interacting with hardware.<ref>{{cite mailing list |first=Linus |last=Torvalds |title=[GIT PULL] Device properties framework update for v4.18-rc1 |url=https://lkml.org/lkml/2018/6/5/769 |mailing-list=Linux Kernel|access-date=15 August 2018 | date=5 Jun 2018 }}</ref> === Calculation order === Some operations in [[positional number system]]s have a natural or preferred order in which the elementary steps are to be executed. This order may affect their performance on small-scale byte-addressable processors and [[microcontroller]]s. However, high-performance processors usually fetch multi-byte operands from memory in the same amount of time they would have fetched a single byte, so the complexity of the hardware is not affected by the byte ordering. Addition, subtraction, and multiplication start at the least significant digit position and [[Adder (electronics)|propagate the carry]] to the subsequent more significant position. On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address). The implementation of these operations is marginally simpler using little-endian machines where this first byte contains the least significant digit. Comparison and division start at the most significant digit and propagate a possible carry to the subsequent less significant digits. For fixed-length numerical values (typically of length 1,2,4,8,16), the implementation of these operations is marginally simpler on big-endian machines. Some big-endian processors (e.g. the IBM System/360 and its successors) contain hardware instructions for lexicographically comparing varying length character strings. The normal data transport by an [[Assignment (computer science)|assignment]] statement is in principle independent of the endianness of the processor. == Hardware == Many historical and extant processors use a big-endian memory representation, either exclusively or as a design option. The [[IBM System/360]] uses big-endian byte order, as do its successors [[System/370]], [[ESA/390]], and [[z/Architecture]]. The [[PDP-10]] uses big-endian addressing for byte-oriented instructions. The [[IBM Series/1]] minicomputer uses big-endian byte order. The Motorola [[Motorola 6800|6800]] / 6801, the [[6809]] and the [[Motorola 68000 series|68000 series]] of processors use the big-endian format. Solely big-endian architectures include the IBM [[z/Architecture]] and [[OpenRISC]]. The [[Datapoint 2200]] used simple bit-serial logic with little-endian to facilitate [[carry propagation]]. When Intel developed the [[Intel 8008|8008]] microprocessor for Datapoint, they used little-endian for compatibility. However, as Intel was unable to deliver the 8008 in time, Datapoint used a [[medium-scale integration]] equivalent, but the little-endianness was retained in most Intel designs, including the [[MCS-48]] and the [[Intel 8086|8086]] and its [[x86]] successors.<ref>{{cite web|last=House|first=David|title=Oral History Panel on the Development and Promotion of the Intel 8008 Microprocessor |url = http://archive.computerhistory.org/resources/text/Oral_History/Intel_8008/Intel_8008_1.oral_history.2006.102657982.pdf#page=5 |publisher=[[Computer History Museum]] |access-date=23 April 2014 |author2=Faggin, Federico |author3=Feeney, Hal |author4=Gelbach, Ed |author5=Hoff, Ted |author6=Mazor, Stan |author7= Smith, Hank |page =b5 |date=2006-09-21 }}</ref><ref name="Lunde2009">{{cite book |first = Ken |last = Lunde |title = CJKV Information Processing |url = https://books.google.com/books?id=SA92uQqTB-AC&pg=PA29 |access-date=21 May 2013 |date = 13 January 2009 |publisher = O'Reilly Media, Inc. |isbn = 978-0-596-51447-1 |page = 29 }}</ref> The [[DEC Alpha]], [[Atmel AVR]], [[VAX]], the [[MOS Technology 6502]] family (including [[Western Design Center]] [[65802]] and [[65C816]]), the Zilog [[Z80]] (including [[Z180]] and [[eZ80]]), the [[Altera]] [[Nios II]], and many other processors and processor families are also little-endian. The Intel [[8051]], unlike other Intel processors, expects 16-bit addresses for LJMP and LCALL in big-endian format; however, xCALL instructions store the return address onto the stack in little-endian format.<ref>{{cite web|url=http://www.keil.com/support/man/docs/c51/c51_xe.htm|title=Cx51 User's Guide: E. Byte Ordering|website=keil.com}}</ref> The [[IA-32]] and [[x86-64]] instruction set architectures use the little-endian format. Other instruction set architectures that follow this convention, allowing only little-endian mode, include [[Nios II]], [[Andes Technology]] NDS32, and [[Qualcomm Hexagon]]. Some instruction set architectures are "bi-endian" and allow running software of either endianness; these include [[Power ISA]], [[SPARC]], ARM [[AArch64]], [[C-Sky]], and [[RISC-V]]. [[IBM AIX]] and [[IBM i]] run in big-endian mode on bi-endian Power ISA; [[Linux]] originally ran in big-endian mode, but by 2019, IBM had transitioned to little-endian mode for Linux to ease the porting of Linux software from x86 to Power.<ref>{{cite web |title=Little endian and Linux on IBM Power Systems |url=https://developer.ibm.com/articles/l-power-little-endian-faq-trs/ |date=2016-06-16 |website=IBM |author=Jeff Scheel |access-date=2022-03-27}}</ref><ref>{{cite web |last1=Timothy Prickett Morgan |title=The Transition To RHEL 8 Begins On Power Systems |url=https://www.itjungle.com/2019/06/10/the-transition-to-rhel-8-begins-on-power-systems/ |website=ITJungle |date=10 June 2019 |access-date=26 March 2022}}</ref> SPARC has no relevant little-endian deployment, as both [[Oracle Solaris]] and Linux run in big-endian mode on bi-endian SPARC systems, and can be considered big-endian in practice. ARM, C-Sky, and RISC-V have no relevant big-endian deployments, and can be considered little-endian in practice. === Bi-endianness === Some instruction sets feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word ''bi-endian'', when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. Some architectures (including [[ARM architecture|ARM]] versions 3 and above, [[PowerPC]], [[DEC Alpha|Alpha]], [[SPARC]] V9, [[MIPS architecture|MIPS]], [[Intel i860]], [[PA-RISC]], [[SuperH|SuperH SH-4]] and [[IA-64]]) feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word ''bi-endian'', when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. Many of these architectures can be switched via software to default to a specific endian format (usually done when the computer starts up); however, on some systems, the default endianness is selected by hardware on the motherboard and cannot be changed via software (e.g. the Alpha, which runs only in big-endian mode on the [[Cray T3E]]). The term ''bi-endian'' refers primarily to how a processor treats data accesses. Instruction accesses (fetches of instruction words) on a given processor may still assume a fixed endianness, even if data accesses are fully bi-endian, though this is not always the case, such as on Intel's [[IA-64]]-based Itanium CPU, which allows both. Some nominally bi-endian CPUs require motherboard help to fully switch endianness. For instance, the 32-bit desktop-oriented [[PowerPC]] processors in little-endian mode act as little-endian from the point of view of the executing programs, but they require the motherboard to perform a 64-bit swap across all 8 byte lanes to ensure that the little-endian view of things will apply to [[Input/Output|I/O]] devices. In the absence of this unusual motherboard hardware, device driver software must write to different addresses to undo the incomplete transformation and also must perform a normal byte swap.{{or|date=November 2023}} Some CPUs, such as many PowerPC processors intended for embedded use and almost all SPARC processors, allow per-page choice of endianness. SPARC processors since the late 1990s (SPARC v9 compliant processors) allow data endianness to be chosen with each individual instruction that loads from or stores to memory. The [[ARM architecture]] supports two big-endian modes, called ''BE-8'' and ''BE-32''.<ref>{{cite web|title=Differences between BE-32 and BE-8 buses|url=http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0290g/ch06s05s01.html}}</ref> CPUs up to ARMv5 only support BE-32 or word-invariant mode. Here any naturally aligned 32-bit access works like in little-endian mode, but access to a byte or 16-bit word is redirected to the corresponding address and unaligned access is not allowed. ARMv6 introduces BE-8 or byte-invariant mode, where access to a single byte works as in little-endian mode, but accessing a 16-bit, 32-bit or (starting with ARMv8) 64-bit word results in a byte swap of the data. This simplifies unaligned memory access as well as memory-mapped access to registers other than 32 bit. Many processors have instructions to convert a word in a register to the opposite endianness, that is, they swap the order of the bytes in a 16-, 32- or 64-bit word. Recent Intel x86 and x86-64 architecture CPUs have a MOVBE instruction ([[Intel Core]] since generation 4, after [[Intel Atom|Atom]]),<ref>{{cite web |title = How to detect New Instruction support in the 4th generation Intel® Core™ processor family |url = https://software.intel.com/sites/default/files/article/405250/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf |access-date = 2 May 2017 }}</ref> which fetches a big-endian format word from memory or writes a word into memory in big-endian format. These processors are otherwise thoroughly little-endian. There are also devices which use different formats in different places. For instance, the BQ27421 [[Texas Instruments]] battery gauge uses the little-endian format for its registers and the big-endian format for its [[random-access memory]]. [[SPARC]] historically used big-endian until version 9, which is bi-endian. Similarly early IBM POWER processors were big-endian, but the [[PowerPC]] and [[Power ISA]] descendants are now bi-endian. The [[ARM architecture]] was little-endian before version 3 when it became bi-endian. === Floating point === Although many processors use little-endian storage for all types of data (integer, floating point), there are a number of hardware architectures where [[floating-point]] numbers are represented in big-endian form while integers are represented in little-endian form.<ref>{{citation |title=Floating-Point Formats |author-first=John J. G. |author-last=Savard |date=2018 |orig-year=2005 |work=quadibloc |url=http://www.quadibloc.com/comp/cp0201.htm |access-date=2018-07-16 |url-status=live |archive-url=https://web.archive.org/web/20180703001709/http://www.quadibloc.com/comp/cp0201.htm |archive-date=2018-07-03}}</ref> There are [[ARM architecture|ARM]] processors that have mixed-endian floating-point representation for double-precision numbers: each of the two 32-bit words is stored as little-endian, but the most significant word is stored first. [[VAX]] floating point stores little-endian 16-bit words in big-endian order. Because there have been many floating-point formats with no network standard representation for them, the [[External Data Representation|XDR]] standard uses big-endian IEEE 754 as its representation. It may therefore appear strange that the widespread [[IEEE 754]] floating-point standard does not specify endianness.<ref>{{cite web |title = pack – convert a list into a binary representation |url = http://www.perl.com/doc/manual/html/pod/perlfunc/pack.html }}</ref> Theoretically, this means that even standard IEEE floating-point data written by one machine might not be readable by another. However, on modern standard computers (i.e., implementing IEEE 754), one may safely assume that the endianness is the same for floating-point numbers as for integers, making the conversion straightforward regardless of data type. Small [[embedded system]]s using special floating-point formats may be another matter, however. === Variable-length data === Most instructions considered so far contain the size (lengths) of their [[operand]]s within the [[operation code]]. Frequently available operand lengths are 1, 2, 4, 8, or 16 bytes. But there are also architectures where the length of an operand may be held in a separate field of the instruction or with the operand itself, e.g. by means of a [[word mark (computer hardware)|word mark]]. Such an approach allows operand lengths up to 256 bytes or larger. The data types of such operands are [[string (computer science)|character strings]] or [[binary-coded decimal|BCD]]. Machines able to manipulate such data with one instruction (e.g. compare, add) include the [[IBM 1401]], [[IBM 1410|1410]], [[IBM 1620|1620]], [[IBM System/360|System/360]], [[IBM System/370|System/370]], [[ESA/390]], and [[z/Architecture]], all of them of type big-endian. === Middle-endian === Numerous other orderings, generically called ''middle-endian'' or ''mixed-endian'', are possible. The PDP-11 architecture is little-endian within its native 16-bit words, but stores 32-bit data as an unusual big-endian word pairs. [[Unix]] was one of the first systems to allow the same code to be compiled for platforms with different internal representations. One of the first programs converted was supposed to print out {{code|Unix}}, but on the Series/1 it printed {{code|nUxi}} instead.<ref>{{cite journal |last1=Jalics|first1=Paul J. |last2=Heines|first2=Thomas S. |title = Transporting a portable operating system: UNIX to an IBM minicomputer |journal=Communications of the ACM|date=1 December 1983|volume=26|issue=12|pages=1066–1072|doi=10.1145/358476.358504|s2cid=15558835 |doi-access=free}}</ref> The [[PDP-11]] is in principle a 16-bit little-endian system. The instructions to convert between floating-point and integer values in the optional floating-point processor of the PDP-11/45, PDP-11/70, and in some later processors, stored 32-bit "double precision integer long" values with the 16-bit halves swapped from the expected little-endian order. The [[UNIX]] [[C (programming language)|C]] compiler used the same format for 32-bit long integers. This ordering is known as ''PDP-endian''.<ref>{{cite book|url=http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf |archive-date=2022-10-09 |url-status=live|title=PDP-11/45 Processor Handbook|page=165|year=1973|publisher=[[Digital Equipment Corporation]]}}</ref> A way to interpret this endianness is that it stores a 32-bit integer as two little-endian 16-bit words, with a big-endian word ordering. [[Segment descriptors]] of [[IA-32]] and compatible processors keep a 32-bit base address of the segment stored in little-endian order, but in four nonconsecutive bytes, at relative positions 2, 3, 4 and 7 of the descriptor start.<ref>{{Cite tech report|title=AMD64 Architecture Programmer's Manual Volume 2: System Programming|page=80|url=http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf|year=2013|archiveurl=https://web.archive.org/web/20180218024045/http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf|archivedate=2018-02-18}}</ref> == Software == === Logic design === [[Hardware description language]]s (HDLs) used to express digital logic often support arbitrary endianness, with arbitrary granularity. For example, in [[SystemVerilog]], a word can be defined as little-endian or big-endian.{{cn|date=November 2023}} === Files and filesystems === The recognition of endianness is important when reading a file or filesystem created on a computer with different endianness. Fortran sequential unformatted files created with one endianness usually cannot be read on a system using the other endianness because Fortran usually implements a [[storage record|record]] (defined as the data written by a single Fortran statement) as data preceded and succeeded by count fields, which are integers equal to the number of bytes in the data. An attempt to read such a file using Fortran on a system of the other endianness results in a run-time error, because the count fields are incorrect. [[Unicode]] text can optionally start with a [[byte order mark]] (BOM) to signal the endianness of the file or stream. Its code point is U+FEFF. In [[UTF-32]] for example, a big-endian file should start with {{code|00 00 FE FF|class=nowrap}}; a little-endian should start with {{code|FF FE 00 00|class=nowrap}}. Application binary data formats, such as [[MATLAB]] ''.mat'' files, or the ''.bil'' data format, used in topography, are usually endianness-independent. This is achieved by storing the data always in one fixed endianness or carrying with the data a switch to indicate the endianness. An example of the former is the binary [[XLS file]] format that is portable between Windows and Mac systems and always little-endian, requiring the Mac application to swap the bytes on load and save when running on a big-endian Motorola 68K or PowerPC processor.<ref>{{cite web |url=http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/Excel97-2007BinaryFileFormat(xls)Specification.xps |title=Microsoft Office Excel 97 - 2007 Binary File Format Specification (*.xls 97-2007 format) |year=2007 |publisher=Microsoft Corporation }}</ref> [[TIFF]] image files are an example of the second strategy, whose header instructs the application about the endianness of their internal binary integers. If a file starts with the signature {{code|MM}} it means that integers are represented as big-endian, while {{code|II}} means little-endian. Those signatures need a single 16-bit word each, and they are [[palindrome]]s, so they are endianness independent. {{code|I}} stands for [[Intel]] and {{code|M}} stands for [[Motorola]]. Intel CPUs are little-endian, while Motorola 680x0 CPUs are big-endian. This explicit signature allows a TIFF reader program to swap bytes if necessary when a given file was generated by a TIFF writer program running on a computer with a different endianness. As a consequence of its original implementation on the Intel 8080 platform, the operating system-independent [[File Allocation Table]] (FAT) file system is defined with little-endian byte ordering, even on platforms using another endianness natively, necessitating byte-swap operations for maintaining the FAT on these platforms. [[ZFS]], which combines a [[filesystem]] and a [[Logical volume management|logical volume manager]], is known to provide adaptive endianness and to work with both big-endian and little-endian systems.<ref>{{cite AV media |url=http://open-zfs.org/wiki/Documentation/Read_Write_Lecture |title=FreeBSD Kernel Internals: An Intensive Code Walkthrough |author=Matt Ahrens |year=2016 |publisher=OpenZFS Documentation/Read Write Lecture }}</ref> === Networking === Many [[IETF RFC]]s use the term ''network order'', meaning the order of transmission for bytes ''over the wire'' in [[network protocols]]. Among others, the historic {{IETF RFC|1700|link=no}} defines the network order for protocols in the [[Internet protocol suite]] to be big-endian.<ref>{{ cite IETF | title = Assigned Numbers | rfc = 1700 | std = 2 | sectionname = Data Notations | page = 3 | last1 = Reynolds | first1 = J. | author-link1 = Joyce K. Reynolds | last2 = Postel | first2 = J. | author-link2 = Jon Postel | date=October 1994 | publisher = [[Internet Engineering Task Force|IETF]] | access-date = 2012-03-02 }}</ref> However, not all protocols use big-endian byte order as the network order. The [[Server Message Block]] (SMB) protocol uses little-endian byte order. In [[CANopen]], multi-byte parameters are always sent [[least significant byte]] first (little-endian). The same is true for [[Ethernet Powerlink]].<ref>Ethernet POWERLINK Standardisation Group (2012), ''EPSG Working Draft Proposal 301: Ethernet POWERLINK Communication Profile Specification Version 1.1.4'', chapter 6.1.1.</ref> The [[Berkeley sockets]] [[application programming interface|API]] defines a set of functions to convert 16- and 32-bit integers to and from network byte order: the {{code|htons}} (host-to-network-short) and {{code|htonl}} (host-to-network-long) functions convert 16- and 32-bit values respectively from machine (''host'') to network order; the {{code|ntohs}} and {{code|ntohl}} functions convert from network to host order.<ref>{{ cite book | title = The Open Group Base Specifications Issue 7 | author = IEEE and The Open Group | date = 2018 | volume = 2 | chapter = 3. System Interfaces | page = 1120 | url = https://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html | access-date = 2021-04-09 }}</ref><ref>{{Cite web|title=htonl(3) - Linux man page|url=https://linux.die.net/man/3/htonl|access-date=2021-04-09|website=linux.die.net}}</ref> These functions may be a [[no-op]] on a big-endian system. While the high-level network protocols usually consider the byte (mostly meant as ''[[octet (computing)|octet]]'') as their atomic unit, the lowest layers of a [[network stack]] may deal with ordering of bits within a byte. == See also == * {{annotated link|Bit order}} == References == {{refs}} == External links == * {{Wiktionary-inline}} [[Category:Computer memory]] [[Category:Data transmission]] [[Category:Metaphors]] [[Category:Software wars]]'
New page wikitext, after the edit (new_wikitext)
'== Characteristics == [[file:32bit-Endianess.svg|thumb|upright=2|Diagram demonstrating big- versus little-endianness]] [[Computer memory]] consists of a sequence of storage cells (smallest [[address space|addressable]] units); in machines that support [[byte addressing]], those units are called ''[[byte]]s''. Each byte is identified and accessed in hardware and software by its [[memory address]]. If the total number of bytes in memory is ''n'', then addresses are enumerated from 0 to ''n''&nbsp;−&nbsp;1. Computer programs often use data structures or [[Field (computer science)|fields]] that may consist of more data than can be stored in one byte. In the context of this article where its type cannot be arbitrarily complicated, a "field" consists of a consecutive sequence of bytes and represents a "simple data value" which – at least potentially – can be manipulated by ''one'' single [[Instruction set architecture|hardware instruction]]. On most systems, the address of a multi-byte simple data value is the address of its first byte (the byte with the lowest address). An exception to this rule is e.g. the Add instruction of the [[IBM 1401]] which addresses variable-length fields at their low-order (highest-addressed) position with their lengths being defined by a [[Word mark (computer hardware)|word mark]] set at their high-order (lowest-addressed) position. When an operation such as addition is performed, the processor begins at the low-order positions at the high addresses of the two fields and works its way down to the high-order.{{cn|date=November 2023}} Another important attribute of a byte being part of a "field" is its "significance". These attributes of the parts of a field play an important role in the sequence the bytes are accessed by the computer hardware, more precisely: by the low-level algorithms contributing to the results of a computer instruction. === Numbers === [[Positional notation|Positional number systems]] (mostly base 2, or less often base 10) are the predominant way of representing and particularly of manipulating [[Integer (computer science)|integer data]] by computers. In pure form this is valid for moderate sized non-negative integers, e.g. of C data type <code>[[Data type#Numeric types|unsigned]]</code>. In such a number system, the ''value'' of a digit which it contributes to the whole number is determined not only by its value as a single digit, but also by the position it holds in the complete number, called its significance. These positions can be mapped to memory mainly in two ways:<ref name="TanenbaumAustin2012">{{cite book |first1 = Andrew S. |last1 = Tanenbaum |first2 = Todd M. |last2 = Austin |title = Structured Computer Organization |url = https://books.google.com/books?id=m0HHygAACAAJ |access-date = 18 May 2013 |date = 4 August 2012 |publisher = Prentice Hall PTR |isbn = 978-0-13-291652-3 }}</ref> * Decreasing numeric significance with increasing memory addresses (or increasing time), known as ''big-endian'' and * Increasing numeric significance with increasing memory addresses (or increasing time), known as ''little-endian''. In these expressions, the term "end" is meant as the extremity where the ''big'' resp. ''little'' significance is written ''first'', namely where the field ''starts''. The integer data that are directly supported by the [[Arithmetic logic unit|computer hardware]] have a fixed width of a low power of 2, e.g. 8 bits ≙ 1 byte, 16 bits ≙ 2 bytes, 32 bits ≙ 4 bytes, 64 bits ≙ 8 bytes, 128 bits ≙ 16 bytes. The low-level access sequence to the bytes of such a field depends on the operation to be performed. The least-significant byte is accessed first for [[addition]], [[subtraction]] and [[multiplication]]. The most-significant byte is accessed first for [[Division (mathematics)|division]] and [[Natural number#Order|comparison]]. See {{section link||Calculation order}}. === Text === When character (text) strings are to be compared with one another, e.g. in order to support some mechanism like [[Sorting algorithm|sorting]], this is very frequently done [[Lexicographical order|lexicographically]] where a single positional element (character) also has a positional value. Lexicographical comparison means almost everywhere: first character ranks highest – as in the telephone book. Almost all machines which can do this using a single instruction are big-endian or at least mixed-endian.{{cn|date=November 2023}} Integer numbers written as text are always represented most significant digit first in memory, which is similar to big-endian, independently of [[text direction]]. === Byte addressing === {{See also|Byte addressing}} When memory bytes are printed sequentially from left to right (e.g. in a [[hex dump]]), little-endian representation of integers has the significance increasing from left to right. In other words, it appears backwards when visualized, which can be counter-intuitive. This behavior arises, for example, in [[FourCC]] or similar techniques that involve packing characters into an integer, so that it becomes a sequences of specific characters in memory. For example, take the string "JOHN", stored in hexadecimal [[ASCII]]. On big-endian machines, the value appears left-to-right, coinciding with the correct string order for reading the result ("J O H N"). But on a little-endian machine, one would see "N H O J". Middle-endian machines complicate this even further; for example, on the [[PDP-11]], the 32-bit value is stored as two 16-bit words "JO" "HN" in big-endian, with the characters in the 16-bit words being stored in little-endian, resulting in "O J N H".{{cn|date=November 2023}} === Byte swapping === Byte-swapping consists of rearranging bytes to change endianness. Many compilers provide [[Intrinsic function|built-ins]] that are likely to be compiled into native processor instructions ({{code|bswap}}/{{code|movbe}}), such as {{code|__builtin_bswap32}}. Software interfaces for swapping include: * Standard [[#Networking|network endianness]] functions (from/to BE, up to 32-bit).<ref>{{man|3|byteorder|Linux}}</ref> Windows has a 64-bit extension in {{code|winsock2.h}}. * BSD and Glibc {{code|endian.h}} functions (from/to BE and LE, up to 64-bit).<ref>{{man|3|endian|Linux}}</ref> * [[macOS]] {{code|OSByteOrder.h}} macros (from/to BE and LE, up to 64-bit). * The {{code|std::byteswap}} function in [[C++23]].<ref>{{cite web |title=std::byteswap |url=https://en.cppreference.com/w/cpp/numeric/byteswap |website=en.cppreference.com |access-date=3 October 2023}}</ref> Some [[CPU]] instruction sets provide native support for endian byte swapping, such as {{code|bswap}}<ref>{{cite web|url=http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf |archive-date=2022-10-09 |url-status=live|title=Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2 (2A, 2B & 2C): Instruction Set Reference, A-Z|at=p. 3–112|publisher=Intel|date=September 2016|access-date=2017-02-05}}</ref> ([[x86]] - [[Intel 80486|486]] and later), and {{code|rev}}<ref>{{cite web|url=http://infocenter.arm.com/help/topic/com.arm.doc.ddi0487a.k_10775/index.html|title=ARMv8-A Reference Manual|publisher=[[ARM Holdings]]}}</ref> ([[ARM architecture|ARMv6]] and later). Some [[compiler]]s have built-in facilities for byte swapping. For example, the [[Intel]] [[Fortran]] compiler supports the non-standard {{code|CONVERT}} specifier when opening a file, e.g.: {{code|1=OPEN(unit, CONVERT='BIG_ENDIAN',...)|2=fortran|class=nowrap}}. Other compilers have options for generating code that globally enables the conversion for all file IO operations. This permits the reuse of code on a system with the opposite endianness without code modification. == Considerations == === Simplified access to part of a field === On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address); little-endian systems of that type have the property that, for sufficiently low data values, the same value can be read from memory at different lengths without using different addresses (even when [[byte alignment|alignment]] restrictions are imposed). For example, a 32-bit memory location with content {{code|4A 00 00 00|class=nowrap}} can be read at the same address as either [[8-bit computing|8-bit]] (value = 4A), [[16-bit computing|16-bit]] (004A), [[24-bit computing|24-bit]] (00004A), or [[32-bit computing|32-bit]] (0000004A), all of which retain the same numeric value. Although this little-endian property is rarely used directly by high-level programmers, it is occasionally employed by code optimizers as well as by [[assembly language]] programmers. While not allowed by C++, such [[type punning]] code is allowed as "implementation-defined" by the C11 standard<ref>{{cite web |title = C11 standard |url = https://www.iso.org/standard/57853.html |publisher = ISO |access-date=15 August 2018 |at = Section 6.5.2.3 "Structure and Union members", §3 and footnote 95 }}</ref> and commonly used<ref>{{cite web |title=3.10 Options That Control Optimization: -fstrict-aliasing |url=https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type-punning |website=GNU Compiler Collection (GCC) |publisher=Free Software Foundation |access-date=15 August 2018}}</ref> in code interacting with hardware.<ref>{{cite mailing list |first=Linus |last=Torvalds |title=[GIT PULL] Device properties framework update for v4.18-rc1 |url=https://lkml.org/lkml/2018/6/5/769 |mailing-list=Linux Kernel|access-date=15 August 2018 | date=5 Jun 2018 }}</ref> === Calculation order === Some operations in [[positional number system]]s have a natural or preferred order in which the elementary steps are to be executed. This order may affect their performance on small-scale byte-addressable processors and [[microcontroller]]s. However, high-performance processors usually fetch multi-byte operands from memory in the same amount of time they would have fetched a single byte, so the complexity of the hardware is not affected by the byte ordering. Addition, subtraction, and multiplication start at the least significant digit position and [[Adder (electronics)|propagate the carry]] to the subsequent more significant position. On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address). The implementation of these operations is marginally simpler using little-endian machines where this first byte contains the least significant digit. Comparison and division start at the most significant digit and propagate a possible carry to the subsequent less significant digits. For fixed-length numerical values (typically of length 1,2,4,8,16), the implementation of these operations is marginally simpler on big-endian machines. Some big-endian processors (e.g. the IBM System/360 and its successors) contain hardware instructions for lexicographically comparing varying length character strings. The normal data transport by an [[Assignment (computer science)|assignment]] statement is in principle independent of the endianness of the processor. == Hardware == Many historical and extant processors use a big-endian memory representation, either exclusively or as a design option. The [[IBM System/360]] uses big-endian byte order, as do its successors [[System/370]], [[ESA/390]], and [[z/Architecture]]. The [[PDP-10]] uses big-endian addressing for byte-oriented instructions. The [[IBM Series/1]] minicomputer uses big-endian byte order. The Motorola [[Motorola 6800|6800]] / 6801, the [[6809]] and the [[Motorola 68000 series|68000 series]] of processors use the big-endian format. Solely big-endian architectures include the IBM [[z/Architecture]] and [[OpenRISC]]. The [[Datapoint 2200]] used simple bit-serial logic with little-endian to facilitate [[carry propagation]]. When Intel developed the [[Intel 8008|8008]] microprocessor for Datapoint, they used little-endian for compatibility. However, as Intel was unable to deliver the 8008 in time, Datapoint used a [[medium-scale integration]] equivalent, but the little-endianness was retained in most Intel designs, including the [[MCS-48]] and the [[Intel 8086|8086]] and its [[x86]] successors.<ref>{{cite web|last=House|first=David|title=Oral History Panel on the Development and Promotion of the Intel 8008 Microprocessor |url = http://archive.computerhistory.org/resources/text/Oral_History/Intel_8008/Intel_8008_1.oral_history.2006.102657982.pdf#page=5 |publisher=[[Computer History Museum]] |access-date=23 April 2014 |author2=Faggin, Federico |author3=Feeney, Hal |author4=Gelbach, Ed |author5=Hoff, Ted |author6=Mazor, Stan |author7= Smith, Hank |page =b5 |date=2006-09-21 }}</ref><ref name="Lunde2009">{{cite book |first = Ken |last = Lunde |title = CJKV Information Processing |url = https://books.google.com/books?id=SA92uQqTB-AC&pg=PA29 |access-date=21 May 2013 |date = 13 January 2009 |publisher = O'Reilly Media, Inc. |isbn = 978-0-596-51447-1 |page = 29 }}</ref> The [[DEC Alpha]], [[Atmel AVR]], [[VAX]], the [[MOS Technology 6502]] family (including [[Western Design Center]] [[65802]] and [[65C816]]), the Zilog [[Z80]] (including [[Z180]] and [[eZ80]]), the [[Altera]] [[Nios II]], and many other processors and processor families are also little-endian. The Intel [[8051]], unlike other Intel processors, expects 16-bit addresses for LJMP and LCALL in big-endian format; however, xCALL instructions store the return address onto the stack in little-endian format.<ref>{{cite web|url=http://www.keil.com/support/man/docs/c51/c51_xe.htm|title=Cx51 User's Guide: E. Byte Ordering|website=keil.com}}</ref> The [[IA-32]] and [[x86-64]] instruction set architectures use the little-endian format. Other instruction set architectures that follow this convention, allowing only little-endian mode, include [[Nios II]], [[Andes Technology]] NDS32, and [[Qualcomm Hexagon]]. Some instruction set architectures are "bi-endian" and allow running software of either endianness; these include [[Power ISA]], [[SPARC]], ARM [[AArch64]], [[C-Sky]], and [[RISC-V]]. [[IBM AIX]] and [[IBM i]] run in big-endian mode on bi-endian Power ISA; [[Linux]] originally ran in big-endian mode, but by 2019, IBM had transitioned to little-endian mode for Linux to ease the porting of Linux software from x86 to Power.<ref>{{cite web |title=Little endian and Linux on IBM Power Systems |url=https://developer.ibm.com/articles/l-power-little-endian-faq-trs/ |date=2016-06-16 |website=IBM |author=Jeff Scheel |access-date=2022-03-27}}</ref><ref>{{cite web |last1=Timothy Prickett Morgan |title=The Transition To RHEL 8 Begins On Power Systems |url=https://www.itjungle.com/2019/06/10/the-transition-to-rhel-8-begins-on-power-systems/ |website=ITJungle |date=10 June 2019 |access-date=26 March 2022}}</ref> SPARC has no relevant little-endian deployment, as both [[Oracle Solaris]] and Linux run in big-endian mode on bi-endian SPARC systems, and can be considered big-endian in practice. ARM, C-Sky, and RISC-V have no relevant big-endian deployments, and can be considered little-endian in practice. === Bi-endianness === Some instruction sets feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word ''bi-endian'', when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. Some architectures (including [[ARM architecture|ARM]] versions 3 and above, [[PowerPC]], [[DEC Alpha|Alpha]], [[SPARC]] V9, [[MIPS architecture|MIPS]], [[Intel i860]], [[PA-RISC]], [[SuperH|SuperH SH-4]] and [[IA-64]]) feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word ''bi-endian'', when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. Many of these architectures can be switched via software to default to a specific endian format (usually done when the computer starts up); however, on some systems, the default endianness is selected by hardware on the motherboard and cannot be changed via software (e.g. the Alpha, which runs only in big-endian mode on the [[Cray T3E]]). The term ''bi-endian'' refers primarily to how a processor treats data accesses. Instruction accesses (fetches of instruction words) on a given processor may still assume a fixed endianness, even if data accesses are fully bi-endian, though this is not always the case, such as on Intel's [[IA-64]]-based Itanium CPU, which allows both. Some nominally bi-endian CPUs require motherboard help to fully switch endianness. For instance, the 32-bit desktop-oriented [[PowerPC]] processors in little-endian mode act as little-endian from the point of view of the executing programs, but they require the motherboard to perform a 64-bit swap across all 8 byte lanes to ensure that the little-endian view of things will apply to [[Input/Output|I/O]] devices. In the absence of this unusual motherboard hardware, device driver software must write to different addresses to undo the incomplete transformation and also must perform a normal byte swap.{{or|date=November 2023}} Some CPUs, such as many PowerPC processors intended for embedded use and almost all SPARC processors, allow per-page choice of endianness. SPARC processors since the late 1990s (SPARC v9 compliant processors) allow data endianness to be chosen with each individual instruction that loads from or stores to memory. The [[ARM architecture]] supports two big-endian modes, called ''BE-8'' and ''BE-32''.<ref>{{cite web|title=Differences between BE-32 and BE-8 buses|url=http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0290g/ch06s05s01.html}}</ref> CPUs up to ARMv5 only support BE-32 or word-invariant mode. Here any naturally aligned 32-bit access works like in little-endian mode, but access to a byte or 16-bit word is redirected to the corresponding address and unaligned access is not allowed. ARMv6 introduces BE-8 or byte-invariant mode, where access to a single byte works as in little-endian mode, but accessing a 16-bit, 32-bit or (starting with ARMv8) 64-bit word results in a byte swap of the data. This simplifies unaligned memory access as well as memory-mapped access to registers other than 32 bit. Many processors have instructions to convert a word in a register to the opposite endianness, that is, they swap the order of the bytes in a 16-, 32- or 64-bit word. Recent Intel x86 and x86-64 architecture CPUs have a MOVBE instruction ([[Intel Core]] since generation 4, after [[Intel Atom|Atom]]),<ref>{{cite web |title = How to detect New Instruction support in the 4th generation Intel® Core™ processor family |url = https://software.intel.com/sites/default/files/article/405250/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf |access-date = 2 May 2017 }}</ref> which fetches a big-endian format word from memory or writes a word into memory in big-endian format. These processors are otherwise thoroughly little-endian. There are also devices which use different formats in different places. For instance, the BQ27421 [[Texas Instruments]] battery gauge uses the little-endian format for its registers and the big-endian format for its [[random-access memory]]. [[SPARC]] historically used big-endian until version 9, which is bi-endian. Similarly early IBM POWER processors were big-endian, but the [[PowerPC]] and [[Power ISA]] descendants are now bi-endian. The [[ARM architecture]] was little-endian before version 3 when it became bi-endian. === Floating point === Although many processors use little-endian storage for all types of data (integer, floating point), there are a number of hardware architectures where [[floating-point]] numbers are represented in big-endian form while integers are represented in little-endian form.<ref>{{citation |title=Floating-Point Formats |author-first=John J. G. |author-last=Savard |date=2018 |orig-year=2005 |work=quadibloc |url=http://www.quadibloc.com/comp/cp0201.htm |access-date=2018-07-16 |url-status=live |archive-url=https://web.archive.org/web/20180703001709/http://www.quadibloc.com/comp/cp0201.htm |archive-date=2018-07-03}}</ref> There are [[ARM architecture|ARM]] processors that have mixed-endian floating-point representation for double-precision numbers: each of the two 32-bit words is stored as little-endian, but the most significant word is stored first. [[VAX]] floating point stores little-endian 16-bit words in big-endian order. Because there have been many floating-point formats with no network standard representation for them, the [[External Data Representation|XDR]] standard uses big-endian IEEE 754 as its representation. It may therefore appear strange that the widespread [[IEEE 754]] floating-point standard does not specify endianness.<ref>{{cite web |title = pack – convert a list into a binary representation |url = http://www.perl.com/doc/manual/html/pod/perlfunc/pack.html }}</ref> Theoretically, this means that even standard IEEE floating-point data written by one machine might not be readable by another. However, on modern standard computers (i.e., implementing IEEE 754), one may safely assume that the endianness is the same for floating-point numbers as for integers, making the conversion straightforward regardless of data type. Small [[embedded system]]s using special floating-point formats may be another matter, however. === Variable-length data === Most instructions considered so far contain the size (lengths) of their [[operand]]s within the [[operation code]]. Frequently available operand lengths are 1, 2, 4, 8, or 16 bytes. But there are also architectures where the length of an operand may be held in a separate field of the instruction or with the operand itself, e.g. by means of a [[word mark (computer hardware)|word mark]]. Such an approach allows operand lengths up to 256 bytes or larger. The data types of such operands are [[string (computer science)|character strings]] or [[binary-coded decimal|BCD]]. Machines able to manipulate such data with one instruction (e.g. compare, add) include the [[IBM 1401]], [[IBM 1410|1410]], [[IBM 1620|1620]], [[IBM System/360|System/360]], [[IBM System/370|System/370]], [[ESA/390]], and [[z/Architecture]], all of them of type big-endian. === Middle-endian === Numerous other orderings, generically called ''middle-endian'' or ''mixed-endian'', are possible. The PDP-11 architecture is little-endian within its native 16-bit words, but stores 32-bit data as an unusual big-endian word pairs. [[Unix]] was one of the first systems to allow the same code to be compiled for platforms with different internal representations. One of the first programs converted was supposed to print out {{code|Unix}}, but on the Series/1 it printed {{code|nUxi}} instead.<ref>{{cite journal |last1=Jalics|first1=Paul J. |last2=Heines|first2=Thomas S. |title = Transporting a portable operating system: UNIX to an IBM minicomputer |journal=Communications of the ACM|date=1 December 1983|volume=26|issue=12|pages=1066–1072|doi=10.1145/358476.358504|s2cid=15558835 |doi-access=free}}</ref> The [[PDP-11]] is in principle a 16-bit little-endian system. The instructions to convert between floating-point and integer values in the optional floating-point processor of the PDP-11/45, PDP-11/70, and in some later processors, stored 32-bit "double precision integer long" values with the 16-bit halves swapped from the expected little-endian order. The [[UNIX]] [[C (programming language)|C]] compiler used the same format for 32-bit long integers. This ordering is known as ''PDP-endian''.<ref>{{cite book|url=http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf |archive-url=https://ghostarchive.org/archive/20221009/http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf |archive-date=2022-10-09 |url-status=live|title=PDP-11/45 Processor Handbook|page=165|year=1973|publisher=[[Digital Equipment Corporation]]}}</ref> A way to interpret this endianness is that it stores a 32-bit integer as two little-endian 16-bit words, with a big-endian word ordering. [[Segment descriptors]] of [[IA-32]] and compatible processors keep a 32-bit base address of the segment stored in little-endian order, but in four nonconsecutive bytes, at relative positions 2, 3, 4 and 7 of the descriptor start.<ref>{{Cite tech report|title=AMD64 Architecture Programmer's Manual Volume 2: System Programming|page=80|url=http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf|year=2013|archiveurl=https://web.archive.org/web/20180218024045/http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf|archivedate=2018-02-18}}</ref> == Software == === Logic design === [[Hardware description language]]s (HDLs) used to express digital logic often support arbitrary endianness, with arbitrary granularity. For example, in [[SystemVerilog]], a word can be defined as little-endian or big-endian.{{cn|date=November 2023}} === Files and filesystems === The recognition of endianness is important when reading a file or filesystem created on a computer with different endianness. Fortran sequential unformatted files created with one endianness usually cannot be read on a system using the other endianness because Fortran usually implements a [[storage record|record]] (defined as the data written by a single Fortran statement) as data preceded and succeeded by count fields, which are integers equal to the number of bytes in the data. An attempt to read such a file using Fortran on a system of the other endianness results in a run-time error, because the count fields are incorrect. [[Unicode]] text can optionally start with a [[byte order mark]] (BOM) to signal the endianness of the file or stream. Its code point is U+FEFF. In [[UTF-32]] for example, a big-endian file should start with {{code|00 00 FE FF|class=nowrap}}; a little-endian should start with {{code|FF FE 00 00|class=nowrap}}. Application binary data formats, such as [[MATLAB]] ''.mat'' files, or the ''.bil'' data format, used in topography, are usually endianness-independent. This is achieved by storing the data always in one fixed endianness or carrying with the data a switch to indicate the endianness. An example of the former is the binary [[XLS file]] format that is portable between Windows and Mac systems and always little-endian, requiring the Mac application to swap the bytes on load and save when running on a big-endian Motorola 68K or PowerPC processor.<ref>{{cite web |url=http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/Excel97-2007BinaryFileFormat(xls)Specification.xps |title=Microsoft Office Excel 97 - 2007 Binary File Format Specification (*.xls 97-2007 format) |year=2007 |publisher=Microsoft Corporation }}</ref> [[TIFF]] image files are an example of the second strategy, whose header instructs the application about the endianness of their internal binary integers. If a file starts with the signature {{code|MM}} it means that integers are represented as big-endian, while {{code|II}} means little-endian. Those signatures need a single 16-bit word each, and they are [[palindrome]]s, so they are endianness independent. {{code|I}} stands for [[Intel]] and {{code|M}} stands for [[Motorola]]. Intel CPUs are little-endian, while Motorola 680x0 CPUs are big-endian. This explicit signature allows a TIFF reader program to swap bytes if necessary when a given file was generated by a TIFF writer program running on a computer with a different endianness. As a consequence of its original implementation on the Intel 8080 platform, the operating system-independent [[File Allocation Table]] (FAT) file system is defined with little-endian byte ordering, even on platforms using another endianness natively, necessitating byte-swap operations for maintaining the FAT on these platforms. [[ZFS]], which combines a [[filesystem]] and a [[Logical volume management|logical volume manager]], is known to provide adaptive endianness and to work with both big-endian and little-endian systems.<ref>{{cite AV media |url=http://open-zfs.org/wiki/Documentation/Read_Write_Lecture |title=FreeBSD Kernel Internals: An Intensive Code Walkthrough |author=Matt Ahrens |year=2016 |publisher=OpenZFS Documentation/Read Write Lecture }}</ref> === Networking === Many [[IETF RFC]]s use the term ''network order'', meaning the order of transmission for bytes ''over the wire'' in [[network protocols]]. Among others, the historic {{IETF RFC|1700|link=no}} defines the network order for protocols in the [[Internet protocol suite]] to be big-endian.<ref>{{ cite IETF | title = Assigned Numbers | rfc = 1700 | std = 2 | sectionname = Data Notations | page = 3 | last1 = Reynolds | first1 = J. | author-link1 = Joyce K. Reynolds | last2 = Postel | first2 = J. | author-link2 = Jon Postel | date=October 1994 | publisher = [[Internet Engineering Task Force|IETF]] | access-date = 2012-03-02 }}</ref> However, not all protocols use big-endian byte order as the network order. The [[Server Message Block]] (SMB) protocol uses little-endian byte order. In [[CANopen]], multi-byte parameters are always sent [[least significant byte]] first (little-endian). The same is true for [[Ethernet Powerlink]].<ref>Ethernet POWERLINK Standardisation Group (2012), ''EPSG Working Draft Proposal 301: Ethernet POWERLINK Communication Profile Specification Version 1.1.4'', chapter 6.1.1.</ref> The [[Berkeley sockets]] [[application programming interface|API]] defines a set of functions to convert 16- and 32-bit integers to and from network byte order: the {{code|htons}} (host-to-network-short) and {{code|htonl}} (host-to-network-long) functions convert 16- and 32-bit values respectively from machine (''host'') to network order; the {{code|ntohs}} and {{code|ntohl}} functions convert from network to host order.<ref>{{ cite book | title = The Open Group Base Specifications Issue 7 | author = IEEE and The Open Group | date = 2018 | volume = 2 | chapter = 3. System Interfaces | page = 1120 | url = https://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html | access-date = 2021-04-09 }}</ref><ref>{{Cite web|title=htonl(3) - Linux man page|url=https://linux.die.net/man/3/htonl|access-date=2021-04-09|website=linux.die.net}}</ref> These functions may be a [[no-op]] on a big-endian system. While the high-level network protocols usually consider the byte (mostly meant as ''[[octet (computing)|octet]]'') as their atomic unit, the lowest layers of a [[network stack]] may deal with ordering of bits within a byte. == See also == * {{annotated link|Bit order}} == References == {{refs}} == External links == * {{Wiktionary-inline}} [[Category:Computer memory]] [[Category:Data transmission]] [[Category:Metaphors]] [[Category:Software wars]]'
Unified diff of changes made by edit (edit_diff)
'@@ -1,16 +1,2 @@ -{{Short description|Order of bytes in a computer word}} -{{Redirect2|Big-endian|Little-endian|the conflicting ideologies in ''Gulliver's Travels''|Lilliput and Blefuscu#History and politics}} -{{For|the specific use of endianness in date formats|Calendar date}} -{{refimprove|date=July 2020}} -[[file:Gullivers_travels.jpg|thumb|''[[Gulliver's Travels]]'' by [[Jonathan Swift]], the novel from which the term was coined]] - -In [[computing]], '''endianness''' is the order or sequence of [[byte]]s of a [[word (data type)|word]] of digital data in [[computer memory]] or [[data communication]] which is identified by describing the impact of the "first" bytes, meaning at the smallest address or sent first. Endianness is primarily expressed as '''big-endian''' (BE) or '''little-endian''' (LE), terms introduced by [[Danny Cohen (computer scientist)|Danny Cohen]] into computer science for data ordering in an [[Internet Experiment Note]] published in 1980.<ref name="HOLY">{{cite IETF | title = On Holy Wars and a Plea for Peace | ien = 137 | last = Cohen |first = Danny | author-link = Danny Cohen (computer scientist) | date = 1980-04-01 | url = http://www.ietf.org/rfc/ien/ien137.txt | publisher = [[Internet Engineering Task Force|IETF]] }} Also published at ''[[IEEE Computer]]'', [https://ieeexplore.ieee.org/document/1667115 October 1981 issue].</ref> The adjective ''endian'' has its origin in the writings of 18th century Anglo-Irish writer [[Jonathan Swift]]. In the 1726 novel ''[[Gulliver's Travels]]'', he portrays the conflict between sects of Lilliputians divided into those breaking the shell of a [[boiled egg]] from the big end or from the little end.<ref>{{cite book | first = Jonathan |last =Swift | title = Gulliver's Travels | chapter = A Voyage to Lilliput, Chapter IV | year = 1726 | chapter-url = https://en.wikisource.org/wiki/The_Works_of_the_Rev._Jonathan_Swift/Volume_6/A_Voyage_to_Lilliput/Chapter_4 }}</ref><ref>{{Citation | last1 = Bryant | first1 = Randal E. | author-link = Randal Bryant | last2 = David | first2 = O'Hallaron | title = Computer Systems: A Programmer's Perspective | publisher = Pearson Education | year = 2016 | edition = 3 | isbn = 978-1-488-67207-1 | page = 79 }}</ref> - -Computers store information in various-sized groups of binary bits. Each group is assigned a number, called its ''address'', that the computer uses to access that data. On most modern computers, the smallest data group with an address is eight bits long and is called a byte. Larger groups comprise two or more bytes, for example, a [[32-bit computing|32-bit]] word contains four bytes. There are two possible ways a computer could number the individual bytes in a larger group, starting at either end. Both types of endianness are in widespread use in digital electronic engineering. The initial choice of endianness of a new design is often arbitrary, but later technology revisions and updates perpetuate the existing endianness to maintain [[backward compatibility]]. - -A big-endian system stores the [[most significant byte]] of a word at the smallest [[memory address]] and the [[least significant byte]] at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.<ref>[https://betterexplained.com/articles/understanding-big-and-little-endian-byte-order/ Understanding big and little endian byte order]</ref><ref>[https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/ByteOrdering.html#//apple_ref/doc/uid/20001150-CJBEJBHH Byte Ordering PPC]</ref><ref>[https://developer.ibm.com/articles/au-endianc/ Writing endian-independent code in C]</ref> Of the two, big-endian is thus closer to the way the digits of numbers are written left-to-right in English, comparing digits to bytes. ''Bi-endianness'' is a feature supported by numerous computer architectures that feature switchable endianness in data fetches and stores or for instruction fetches. Other orderings are generically called ''middle-endian'' or ''mixed-endian''.<ref>{{cite web |title = Internet Hall of Fame Pioneer |url = http://internethalloffame.org/inductees/danny-cohen |website = [[Internet Hall of Fame]] |publisher = [[The Internet Society]] }}</ref><ref>{{cite web | first = David |last = Cary | title = Endian FAQ | url = http://david.carybros.com/html/endian_faq.html | access-date = 2010-10-11 }}</ref><ref>{{cite journal | last = James |first = David V. | title = Multiplexed buses: the endian wars continue | journal = [[IEEE Micro]] | date = June 1990 | volume = 10 | issue = 3 | pages = 9–21 | doi = 10.1109/40.56322 | s2cid = 24291134 | issn = 0272-1732 }}</ref><ref>{{cite web | last1 = Blanc |first1 = Bertrand | last2 = Maaraoui |first2 = Bob | title = Endianness or Where is Byte 0? | date = December 2005 | url = http://3bc.bertrand-blanc.com/endianness05.pdf | access-date = 2008-12-21 }}</ref> - -Big-endianness is the dominant ordering in networking protocols, such as in the [[Internet protocol suite]], where it is referred to as ''network order'', transmitting the most significant byte first. Conversely, little-endianness is the dominant ordering for processor architectures ([[x86]], most [[ARM architecture|ARM]] implementations, base [[RISC-V]] implementations) and their associated memory. [[File format]]s can use either ordering; some formats use a mixture of both or contain an indicator of which ordering is used throughout the file.<ref>{{Cite IETF|date=April 1992|rfc=1314|title=A File Format for the Exchange of Images in the Internet|page=7|access-date=2021-08-16 }}</ref> - == Characteristics == [[file:32bit-Endianess.svg|thumb|upright=2|Diagram demonstrating big- versus little-endianness]] '
New page size (new_size)
31478
Old page size (old_size)
37086
Size change in edit (edit_delta)
-5608
Lines added in edit (added_lines)
[]
Lines removed in edit (removed_lines)
[ 0 => '{{Short description|Order of bytes in a computer word}}', 1 => '{{Redirect2|Big-endian|Little-endian|the conflicting ideologies in ''Gulliver's Travels''|Lilliput and Blefuscu#History and politics}}', 2 => '{{For|the specific use of endianness in date formats|Calendar date}}', 3 => '{{refimprove|date=July 2020}}', 4 => '[[file:Gullivers_travels.jpg|thumb|''[[Gulliver's Travels]]'' by [[Jonathan Swift]], the novel from which the term was coined]]', 5 => '', 6 => 'In [[computing]], '''endianness''' is the order or sequence of [[byte]]s of a [[word (data type)|word]] of digital data in [[computer memory]] or [[data communication]] which is identified by describing the impact of the "first" bytes, meaning at the smallest address or sent first. Endianness is primarily expressed as '''big-endian''' (BE) or '''little-endian''' (LE), terms introduced by [[Danny Cohen (computer scientist)|Danny Cohen]] into computer science for data ordering in an [[Internet Experiment Note]] published in 1980.<ref name="HOLY">{{cite IETF | title = On Holy Wars and a Plea for Peace | ien = 137 | last = Cohen |first = Danny | author-link = Danny Cohen (computer scientist) | date = 1980-04-01 | url = http://www.ietf.org/rfc/ien/ien137.txt | publisher = [[Internet Engineering Task Force|IETF]] }} Also published at ''[[IEEE Computer]]'', [https://ieeexplore.ieee.org/document/1667115 October 1981 issue].</ref> The adjective ''endian'' has its origin in the writings of 18th century Anglo-Irish writer [[Jonathan Swift]]. In the 1726 novel ''[[Gulliver's Travels]]'', he portrays the conflict between sects of Lilliputians divided into those breaking the shell of a [[boiled egg]] from the big end or from the little end.<ref>{{cite book | first = Jonathan |last =Swift | title = Gulliver's Travels | chapter = A Voyage to Lilliput, Chapter IV | year = 1726 | chapter-url = https://en.wikisource.org/wiki/The_Works_of_the_Rev._Jonathan_Swift/Volume_6/A_Voyage_to_Lilliput/Chapter_4 }}</ref><ref>{{Citation | last1 = Bryant | first1 = Randal E. | author-link = Randal Bryant | last2 = David | first2 = O'Hallaron | title = Computer Systems: A Programmer's Perspective | publisher = Pearson Education | year = 2016 | edition = 3 | isbn = 978-1-488-67207-1 | page = 79 }}</ref>', 7 => '', 8 => 'Computers store information in various-sized groups of binary bits. Each group is assigned a number, called its ''address'', that the computer uses to access that data. On most modern computers, the smallest data group with an address is eight bits long and is called a byte. Larger groups comprise two or more bytes, for example, a [[32-bit computing|32-bit]] word contains four bytes. There are two possible ways a computer could number the individual bytes in a larger group, starting at either end. Both types of endianness are in widespread use in digital electronic engineering. The initial choice of endianness of a new design is often arbitrary, but later technology revisions and updates perpetuate the existing endianness to maintain [[backward compatibility]].', 9 => '', 10 => 'A big-endian system stores the [[most significant byte]] of a word at the smallest [[memory address]] and the [[least significant byte]] at the largest. A little-endian system, in contrast, stores the least-significant byte at the smallest address.<ref>[https://betterexplained.com/articles/understanding-big-and-little-endian-byte-order/ Understanding big and little endian byte order]</ref><ref>[https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/ByteOrdering.html#//apple_ref/doc/uid/20001150-CJBEJBHH Byte Ordering PPC]</ref><ref>[https://developer.ibm.com/articles/au-endianc/ Writing endian-independent code in C]</ref> Of the two, big-endian is thus closer to the way the digits of numbers are written left-to-right in English, comparing digits to bytes. ''Bi-endianness'' is a feature supported by numerous computer architectures that feature switchable endianness in data fetches and stores or for instruction fetches. Other orderings are generically called ''middle-endian'' or ''mixed-endian''.<ref>{{cite web |title = Internet Hall of Fame Pioneer |url = http://internethalloffame.org/inductees/danny-cohen |website = [[Internet Hall of Fame]] |publisher = [[The Internet Society]] }}</ref><ref>{{cite web | first = David |last = Cary | title = Endian FAQ | url = http://david.carybros.com/html/endian_faq.html | access-date = 2010-10-11 }}</ref><ref>{{cite journal | last = James |first = David V. | title = Multiplexed buses: the endian wars continue | journal = [[IEEE Micro]] | date = June 1990 | volume = 10 | issue = 3 | pages = 9–21 | doi = 10.1109/40.56322 | s2cid = 24291134 | issn = 0272-1732 }}</ref><ref>{{cite web | last1 = Blanc |first1 = Bertrand | last2 = Maaraoui |first2 = Bob | title = Endianness or Where is Byte 0? | date = December 2005 | url = http://3bc.bertrand-blanc.com/endianness05.pdf | access-date = 2008-12-21 }}</ref>', 11 => '', 12 => 'Big-endianness is the dominant ordering in networking protocols, such as in the [[Internet protocol suite]], where it is referred to as ''network order'', transmitting the most significant byte first. Conversely, little-endianness is the dominant ordering for processor architectures ([[x86]], most [[ARM architecture|ARM]] implementations, base [[RISC-V]] implementations) and their associated memory. [[File format]]s can use either ordering; some formats use a mixture of both or contain an indicator of which ordering is used throughout the file.<ref>{{Cite IETF|date=April 1992|rfc=1314|title=A File Format for the Exchange of Images in the Internet|page=7|access-date=2021-08-16 }}</ref>', 13 => '' ]
Parsed HTML source of the new revision (new_html)
'<div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div id="toc" class="toc" role="navigation" aria-labelledby="mw-toc-heading"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2 id="mw-toc-heading">Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div> <ul> <li class="toclevel-1 tocsection-1"><a href="#Characteristics"><span class="tocnumber">1</span> <span class="toctext">Characteristics</span></a> <ul> <li class="toclevel-2 tocsection-2"><a href="#Numbers"><span class="tocnumber">1.1</span> <span class="toctext">Numbers</span></a></li> <li class="toclevel-2 tocsection-3"><a href="#Text"><span class="tocnumber">1.2</span> <span class="toctext">Text</span></a></li> <li class="toclevel-2 tocsection-4"><a href="#Byte_addressing"><span class="tocnumber">1.3</span> <span class="toctext">Byte addressing</span></a></li> <li class="toclevel-2 tocsection-5"><a href="#Byte_swapping"><span class="tocnumber">1.4</span> <span class="toctext">Byte swapping</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-6"><a href="#Considerations"><span class="tocnumber">2</span> <span class="toctext">Considerations</span></a> <ul> <li class="toclevel-2 tocsection-7"><a href="#Simplified_access_to_part_of_a_field"><span class="tocnumber">2.1</span> <span class="toctext">Simplified access to part of a field</span></a></li> <li class="toclevel-2 tocsection-8"><a href="#Calculation_order"><span class="tocnumber">2.2</span> <span class="toctext">Calculation order</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-9"><a href="#Hardware"><span class="tocnumber">3</span> <span class="toctext">Hardware</span></a> <ul> <li class="toclevel-2 tocsection-10"><a href="#Bi-endianness"><span class="tocnumber">3.1</span> <span class="toctext">Bi-endianness</span></a></li> <li class="toclevel-2 tocsection-11"><a href="#Floating_point"><span class="tocnumber">3.2</span> <span class="toctext">Floating point</span></a></li> <li class="toclevel-2 tocsection-12"><a href="#Variable-length_data"><span class="tocnumber">3.3</span> <span class="toctext">Variable-length data</span></a></li> <li class="toclevel-2 tocsection-13"><a href="#Middle-endian"><span class="tocnumber">3.4</span> <span class="toctext">Middle-endian</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-14"><a href="#Software"><span class="tocnumber">4</span> <span class="toctext">Software</span></a> <ul> <li class="toclevel-2 tocsection-15"><a href="#Logic_design"><span class="tocnumber">4.1</span> <span class="toctext">Logic design</span></a></li> <li class="toclevel-2 tocsection-16"><a href="#Files_and_filesystems"><span class="tocnumber">4.2</span> <span class="toctext">Files and filesystems</span></a></li> <li class="toclevel-2 tocsection-17"><a href="#Networking"><span class="tocnumber">4.3</span> <span class="toctext">Networking</span></a></li> </ul> </li> <li class="toclevel-1 tocsection-18"><a href="#See_also"><span class="tocnumber">5</span> <span class="toctext">See also</span></a></li> <li class="toclevel-1 tocsection-19"><a href="#References"><span class="tocnumber">6</span> <span class="toctext">References</span></a></li> <li class="toclevel-1 tocsection-20"><a href="#External_links"><span class="tocnumber">7</span> <span class="toctext">External links</span></a></li> </ul> </div> <h2><span class="mw-headline" id="Characteristics">Characteristics</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=1"title="Edit section: Characteristics" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <figure class="mw-default-size" typeof="mw:File/Thumb"><a href="/https/en.wikipedia.org/wiki/File:32bit-Endianess.svg" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/5/5d/32bit-Endianess.svg/440px-32bit-Endianess.svg.png" decoding="async" width="440" height="220" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/5/5d/32bit-Endianess.svg/660px-32bit-Endianess.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/5/5d/32bit-Endianess.svg/880px-32bit-Endianess.svg.png 2x" data-file-width="1000" data-file-height="500" /></a><figcaption>Diagram demonstrating big- versus little-endianness</figcaption></figure> <p><a href="/https/en.wikipedia.org/wiki/Computer_memory" title="Computer memory">Computer memory</a> consists of a sequence of storage cells (smallest <a href="/https/en.wikipedia.org/wiki/Address_space" title="Address space">addressable</a> units); in machines that support <a href="/https/en.wikipedia.org/wiki/Byte_addressing" title="Byte addressing">byte addressing</a>, those units are called <i><a href="/https/en.wikipedia.org/wiki/Byte" title="Byte">bytes</a></i>. Each byte is identified and accessed in hardware and software by its <a href="/https/en.wikipedia.org/wiki/Memory_address" title="Memory address">memory address</a>. If the total number of bytes in memory is <i>n</i>, then addresses are enumerated from 0 to <i>n</i>&#160;−&#160;1. </p><p>Computer programs often use data structures or <a href="/https/en.wikipedia.org/wiki/Field_(computer_science)" title="Field (computer science)">fields</a> that may consist of more data than can be stored in one byte. In the context of this article where its type cannot be arbitrarily complicated, a "field" consists of a consecutive sequence of bytes and represents a "simple data value" which – at least potentially – can be manipulated by <i>one</i> single <a href="/https/en.wikipedia.org/wiki/Instruction_set_architecture" title="Instruction set architecture">hardware instruction</a>. On most systems, the address of a multi-byte simple data value is the address of its first byte (the byte with the lowest address). An exception to this rule is e.g. the Add instruction of the <a href="/https/en.wikipedia.org/wiki/IBM_1401" title="IBM 1401">IBM 1401</a> which addresses variable-length fields at their low-order (highest-addressed) position with their lengths being defined by a <a href="/https/en.wikipedia.org/wiki/Word_mark_(computer_hardware)" title="Word mark (computer hardware)">word mark</a> set at their high-order (lowest-addressed) position. When an operation such as addition is performed, the processor begins at the low-order positions at the high addresses of the two fields and works its way down to the high-order.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/https/en.wikipedia.org/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2023)">citation needed</span></a></i>&#93;</sup> </p><p>Another important attribute of a byte being part of a "field" is its "significance". These attributes of the parts of a field play an important role in the sequence the bytes are accessed by the computer hardware, more precisely: by the low-level algorithms contributing to the results of a computer instruction. </p> <h3><span class="mw-headline" id="Numbers">Numbers</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=2"title="Edit section: Numbers" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p><a href="/https/en.wikipedia.org/wiki/Positional_notation" title="Positional notation">Positional number systems</a> (mostly base 2, or less often base 10) are the predominant way of representing and particularly of manipulating <a href="/https/en.wikipedia.org/wiki/Integer_(computer_science)" title="Integer (computer science)">integer data</a> by computers. In pure form this is valid for moderate sized non-negative integers, e.g. of C data type <code><a href="/https/en.wikipedia.org/wiki/Data_type#Numeric_types" title="Data type">unsigned</a></code>. In such a number system, the <i>value</i> of a digit which it contributes to the whole number is determined not only by its value as a single digit, but also by the position it holds in the complete number, called its significance. These positions can be mapped to memory mainly in two ways:<sup id="cite_ref-TanenbaumAustin2012_1-0" class="reference"><a href="#cite_note-TanenbaumAustin2012-1">&#91;1&#93;</a></sup> </p> <ul><li>Decreasing numeric significance with increasing memory addresses (or increasing time), known as <i>big-endian</i> and</li> <li>Increasing numeric significance with increasing memory addresses (or increasing time), known as <i>little-endian</i>.</li></ul> <p>In these expressions, the term "end" is meant as the extremity where the <i>big</i> resp. <i>little</i> significance is written <i>first</i>, namely where the field <i>starts</i>. </p><p>The integer data that are directly supported by the <a href="/https/en.wikipedia.org/wiki/Arithmetic_logic_unit" title="Arithmetic logic unit">computer hardware</a> have a fixed width of a low power of 2, e.g. 8 bits ≙ 1 byte, 16 bits ≙ 2 bytes, 32 bits ≙ 4 bytes, 64 bits ≙ 8 bytes, 128 bits ≙ 16 bytes. The low-level access sequence to the bytes of such a field depends on the operation to be performed. The least-significant byte is accessed first for <a href="/https/en.wikipedia.org/wiki/Addition" title="Addition">addition</a>, <a href="/https/en.wikipedia.org/wiki/Subtraction" title="Subtraction">subtraction</a> and <a href="/https/en.wikipedia.org/wiki/Multiplication" title="Multiplication">multiplication</a>. The most-significant byte is accessed first for <a href="/https/en.wikipedia.org/wiki/Division_(mathematics)" title="Division (mathematics)">division</a> and <a href="/https/en.wikipedia.org/wiki/Natural_number#Order" title="Natural number">comparison</a>. See <a href="#Calculation_order">§&#160;Calculation order</a>. </p> <h3><span class="mw-headline" id="Text">Text</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=3"title="Edit section: Text" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>When character (text) strings are to be compared with one another, e.g. in order to support some mechanism like <a href="/https/en.wikipedia.org/wiki/Sorting_algorithm" title="Sorting algorithm">sorting</a>, this is very frequently done <a href="/https/en.wikipedia.org/wiki/Lexicographical_order" class="mw-redirect" title="Lexicographical order">lexicographically</a> where a single positional element (character) also has a positional value. Lexicographical comparison means almost everywhere: first character ranks highest – as in the telephone book. Almost all machines which can do this using a single instruction are big-endian or at least mixed-endian.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/https/en.wikipedia.org/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2023)">citation needed</span></a></i>&#93;</sup> </p><p>Integer numbers written as text are always represented most significant digit first in memory, which is similar to big-endian, independently of <a href="/https/en.wikipedia.org/wiki/Text_direction" class="mw-redirect" title="Text direction">text direction</a>. </p> <h3><span class="mw-headline" id="Byte_addressing">Byte addressing</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=4"title="Edit section: Byte addressing" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <style data-mw-deduplicate="TemplateStyles:r1033289096">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}</style><div role="note" class="hatnote navigation-not-searchable">See also: <a href="/https/en.wikipedia.org/wiki/Byte_addressing" title="Byte addressing">Byte addressing</a></div> <p>When memory bytes are printed sequentially from left to right (e.g. in a <a href="/https/en.wikipedia.org/wiki/Hex_dump" title="Hex dump">hex dump</a>), little-endian representation of integers has the significance increasing from left to right. In other words, it appears backwards when visualized, which can be counter-intuitive. </p><p>This behavior arises, for example, in <a href="/https/en.wikipedia.org/wiki/FourCC" title="FourCC">FourCC</a> or similar techniques that involve packing characters into an integer, so that it becomes a sequences of specific characters in memory. For example, take the string "JOHN", stored in hexadecimal <a href="/https/en.wikipedia.org/wiki/ASCII" title="ASCII">ASCII</a>. On big-endian machines, the value appears left-to-right, coinciding with the correct string order for reading the result ("J O H N"). But on a little-endian machine, one would see "N H O J". Middle-endian machines complicate this even further; for example, on the <a href="/https/en.wikipedia.org/wiki/PDP-11" title="PDP-11">PDP-11</a>, the 32-bit value is stored as two 16-bit words "JO" "HN" in big-endian, with the characters in the 16-bit words being stored in little-endian, resulting in "O J N H".<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/https/en.wikipedia.org/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2023)">citation needed</span></a></i>&#93;</sup> </p> <h3><span class="mw-headline" id="Byte_swapping">Byte swapping</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=5"title="Edit section: Byte swapping" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Byte-swapping consists of rearranging bytes to change endianness. Many compilers provide <a href="/https/en.wikipedia.org/wiki/Intrinsic_function" title="Intrinsic function">built-ins</a> that are likely to be compiled into native processor instructions (<code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">bswap</code>/<code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">movbe</code>), such as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">__builtin_bswap32</code>. Software interfaces for swapping include: </p> <ul><li>Standard <a href="#Networking">network endianness</a> functions (from/to BE, up to 32-bit).<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">&#91;2&#93;</a></sup> Windows has a 64-bit extension in <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">winsock2.h</code>.</li> <li>BSD and Glibc <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">endian.h</code> functions (from/to BE and LE, up to 64-bit).<sup id="cite_ref-3" class="reference"><a href="#cite_note-3">&#91;3&#93;</a></sup></li> <li><a href="/https/en.wikipedia.org/wiki/MacOS" title="MacOS">macOS</a> <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">OSByteOrder.h</code> macros (from/to BE and LE, up to 64-bit).</li> <li>The <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">std::byteswap</code> function in <a href="/https/en.wikipedia.org/wiki/C%2B%2B23" title="C++23">C++23</a>.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4">&#91;4&#93;</a></sup></li></ul> <p>Some <a href="/https/en.wikipedia.org/wiki/CPU" class="mw-redirect" title="CPU">CPU</a> instruction sets provide native support for endian byte swapping, such as <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">bswap</code><sup id="cite_ref-5" class="reference"><a href="#cite_note-5">&#91;5&#93;</a></sup> (<a href="/https/en.wikipedia.org/wiki/X86" title="X86">x86</a> - <a href="/https/en.wikipedia.org/wiki/Intel_80486" class="mw-redirect" title="Intel 80486">486</a> and later), and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">rev</code><sup id="cite_ref-6" class="reference"><a href="#cite_note-6">&#91;6&#93;</a></sup> (<a href="/https/en.wikipedia.org/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARMv6</a> and later). </p><p>Some <a href="/https/en.wikipedia.org/wiki/Compiler" title="Compiler">compilers</a> have built-in facilities for byte swapping. For example, the <a href="/https/en.wikipedia.org/wiki/Intel" title="Intel">Intel</a> <a href="/https/en.wikipedia.org/wiki/Fortran" title="Fortran">Fortran</a> compiler supports the non-standard <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">CONVERT</code> specifier when opening a file, e.g.: <code class="nowrap mw-highlight mw-highlight-lang-fortran mw-content-ltr" id="" style="" dir="ltr"><span class="k">OPEN</span><span class="p">(</span><span class="n">unit</span><span class="p">,</span><span class="w"> </span><span class="n">CONVERT</span><span class="o">=</span><span class="s1">&#39;BIG_ENDIAN&#39;</span><span class="p">,...)</span></code>. Other compilers have options for generating code that globally enables the conversion for all file IO operations. This permits the reuse of code on a system with the opposite endianness without code modification. </p> <h2><span class="mw-headline" id="Considerations">Considerations</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=6"title="Edit section: Considerations" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <h3><span class="mw-headline" id="Simplified_access_to_part_of_a_field">Simplified access to part of a field</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=7"title="Edit section: Simplified access to part of a field" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address); little-endian systems of that type have the property that, for sufficiently low data values, the same value can be read from memory at different lengths without using different addresses (even when <a href="/https/en.wikipedia.org/wiki/Byte_alignment" class="mw-redirect" title="Byte alignment">alignment</a> restrictions are imposed). For example, a 32-bit memory location with content <code class="nowrap mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">4A 00 00 00</code> can be read at the same address as either <a href="/https/en.wikipedia.org/wiki/8-bit_computing" title="8-bit computing">8-bit</a> (value = 4A), <a href="/https/en.wikipedia.org/wiki/16-bit_computing" title="16-bit computing">16-bit</a> (004A), <a href="/https/en.wikipedia.org/wiki/24-bit_computing" title="24-bit computing">24-bit</a> (00004A), or <a href="/https/en.wikipedia.org/wiki/32-bit_computing" title="32-bit computing">32-bit</a> (0000004A), all of which retain the same numeric value. Although this little-endian property is rarely used directly by high-level programmers, it is occasionally employed by code optimizers as well as by <a href="/https/en.wikipedia.org/wiki/Assembly_language" title="Assembly language">assembly language</a> programmers. While not allowed by C++, such <a href="/https/en.wikipedia.org/wiki/Type_punning" title="Type punning">type punning</a> code is allowed as "implementation-defined" by the C11 standard<sup id="cite_ref-7" class="reference"><a href="#cite_note-7">&#91;7&#93;</a></sup> and commonly used<sup id="cite_ref-8" class="reference"><a href="#cite_note-8">&#91;8&#93;</a></sup> in code interacting with hardware.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9">&#91;9&#93;</a></sup> </p> <h3><span class="mw-headline" id="Calculation_order">Calculation order</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=8"title="Edit section: Calculation order" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Some operations in <a href="/https/en.wikipedia.org/wiki/Positional_number_system" class="mw-redirect" title="Positional number system">positional number systems</a> have a natural or preferred order in which the elementary steps are to be executed. This order may affect their performance on small-scale byte-addressable processors and <a href="/https/en.wikipedia.org/wiki/Microcontroller" title="Microcontroller">microcontrollers</a>. However, high-performance processors usually fetch multi-byte operands from memory in the same amount of time they would have fetched a single byte, so the complexity of the hardware is not affected by the byte ordering. </p><p>Addition, subtraction, and multiplication start at the least significant digit position and <a href="/https/en.wikipedia.org/wiki/Adder_(electronics)" title="Adder (electronics)">propagate the carry</a> to the subsequent more significant position. On most systems, the address of a multi-byte value is the address of its first byte (the byte with the lowest address). The implementation of these operations is marginally simpler using little-endian machines where this first byte contains the least significant digit. </p><p>Comparison and division start at the most significant digit and propagate a possible carry to the subsequent less significant digits. For fixed-length numerical values (typically of length 1,2,4,8,16), the implementation of these operations is marginally simpler on big-endian machines. </p><p>Some big-endian processors (e.g. the IBM System/360 and its successors) contain hardware instructions for lexicographically comparing varying length character strings. </p><p>The normal data transport by an <a href="/https/en.wikipedia.org/wiki/Assignment_(computer_science)" title="Assignment (computer science)">assignment</a> statement is in principle independent of the endianness of the processor. </p> <h2><span class="mw-headline" id="Hardware">Hardware</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=9"title="Edit section: Hardware" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <p>Many historical and extant processors use a big-endian memory representation, either exclusively or as a design option. The <a href="/https/en.wikipedia.org/wiki/IBM_System/360" title="IBM System/360">IBM System/360</a> uses big-endian byte order, as do its successors <a href="/https/en.wikipedia.org/wiki/System/370" class="mw-redirect" title="System/370">System/370</a>, <a href="/https/en.wikipedia.org/wiki/ESA/390" class="mw-redirect" title="ESA/390">ESA/390</a>, and <a href="/https/en.wikipedia.org/wiki/Z/Architecture" title="Z/Architecture">z/Architecture</a>. The <a href="/https/en.wikipedia.org/wiki/PDP-10" title="PDP-10">PDP-10</a> uses big-endian addressing for byte-oriented instructions. The <a href="/https/en.wikipedia.org/wiki/IBM_Series/1" title="IBM Series/1">IBM Series/1</a> minicomputer uses big-endian byte order. The Motorola <a href="/https/en.wikipedia.org/wiki/Motorola_6800" title="Motorola 6800">6800</a> / 6801, the <a href="/https/en.wikipedia.org/wiki/6809" class="mw-redirect" title="6809">6809</a> and the <a href="/https/en.wikipedia.org/wiki/Motorola_68000_series" title="Motorola 68000 series">68000 series</a> of processors use the big-endian format. Solely big-endian architectures include the IBM <a href="/https/en.wikipedia.org/wiki/Z/Architecture" title="Z/Architecture">z/Architecture</a> and <a href="/https/en.wikipedia.org/wiki/OpenRISC" title="OpenRISC">OpenRISC</a>. </p><p>The <a href="/https/en.wikipedia.org/wiki/Datapoint_2200" title="Datapoint 2200">Datapoint 2200</a> used simple bit-serial logic with little-endian to facilitate <a href="/https/en.wikipedia.org/wiki/Carry_propagation" class="mw-redirect" title="Carry propagation">carry propagation</a>. When Intel developed the <a href="/https/en.wikipedia.org/wiki/Intel_8008" title="Intel 8008">8008</a> microprocessor for Datapoint, they used little-endian for compatibility. However, as Intel was unable to deliver the 8008 in time, Datapoint used a <a href="/https/en.wikipedia.org/wiki/Medium-scale_integration" class="mw-redirect" title="Medium-scale integration">medium-scale integration</a> equivalent, but the little-endianness was retained in most Intel designs, including the <a href="/https/en.wikipedia.org/wiki/MCS-48" class="mw-redirect" title="MCS-48">MCS-48</a> and the <a href="/https/en.wikipedia.org/wiki/Intel_8086" title="Intel 8086">8086</a> and its <a href="/https/en.wikipedia.org/wiki/X86" title="X86">x86</a> successors.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10">&#91;10&#93;</a></sup><sup id="cite_ref-Lunde2009_11-0" class="reference"><a href="#cite_note-Lunde2009-11">&#91;11&#93;</a></sup> The <a href="/https/en.wikipedia.org/wiki/DEC_Alpha" title="DEC Alpha">DEC Alpha</a>, <a href="/https/en.wikipedia.org/wiki/Atmel_AVR" class="mw-redirect" title="Atmel AVR">Atmel AVR</a>, <a href="/https/en.wikipedia.org/wiki/VAX" title="VAX">VAX</a>, the <a href="/https/en.wikipedia.org/wiki/MOS_Technology_6502" title="MOS Technology 6502">MOS Technology 6502</a> family (including <a href="/https/en.wikipedia.org/wiki/Western_Design_Center" title="Western Design Center">Western Design Center</a> <a href="/https/en.wikipedia.org/wiki/65802" class="mw-redirect" title="65802">65802</a> and <a href="/https/en.wikipedia.org/wiki/65C816" class="mw-redirect" title="65C816">65C816</a>), the Zilog <a href="/https/en.wikipedia.org/wiki/Z80" class="mw-redirect" title="Z80">Z80</a> (including <a href="/https/en.wikipedia.org/wiki/Z180" class="mw-redirect" title="Z180">Z180</a> and <a href="/https/en.wikipedia.org/wiki/EZ80" class="mw-redirect" title="EZ80">eZ80</a>), the <a href="/https/en.wikipedia.org/wiki/Altera" title="Altera">Altera</a> <a href="/https/en.wikipedia.org/wiki/Nios_II" title="Nios II">Nios II</a>, and many other processors and processor families are also little-endian. </p><p>The Intel <a href="/https/en.wikipedia.org/wiki/8051" class="mw-redirect" title="8051">8051</a>, unlike other Intel processors, expects 16-bit addresses for LJMP and LCALL in big-endian format; however, xCALL instructions store the return address onto the stack in little-endian format.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12">&#91;12&#93;</a></sup> </p><p>The <a href="/https/en.wikipedia.org/wiki/IA-32" title="IA-32">IA-32</a> and <a href="/https/en.wikipedia.org/wiki/X86-64" title="X86-64">x86-64</a> instruction set architectures use the little-endian format. Other instruction set architectures that follow this convention, allowing only little-endian mode, include <a href="/https/en.wikipedia.org/wiki/Nios_II" title="Nios II">Nios II</a>, <a href="/https/en.wikipedia.org/wiki/Andes_Technology" title="Andes Technology">Andes Technology</a> NDS32, and <a href="/https/en.wikipedia.org/wiki/Qualcomm_Hexagon" title="Qualcomm Hexagon">Qualcomm Hexagon</a>. </p><p>Some instruction set architectures are "bi-endian" and allow running software of either endianness; these include <a href="/https/en.wikipedia.org/wiki/Power_ISA" title="Power ISA">Power ISA</a>, <a href="/https/en.wikipedia.org/wiki/SPARC" title="SPARC">SPARC</a>, ARM <a href="/https/en.wikipedia.org/wiki/AArch64" title="AArch64">AArch64</a>, <a href="/https/en.wikipedia.org/w/index.php?title=C-Sky&amp;action=edit&amp;redlink=1" class="new" title="C-Sky (page does not exist)">C-Sky</a>, and <a href="/https/en.wikipedia.org/wiki/RISC-V" title="RISC-V">RISC-V</a>. <a href="/https/en.wikipedia.org/wiki/IBM_AIX" title="IBM AIX">IBM AIX</a> and <a href="/https/en.wikipedia.org/wiki/IBM_i" title="IBM i">IBM i</a> run in big-endian mode on bi-endian Power ISA; <a href="/https/en.wikipedia.org/wiki/Linux" title="Linux">Linux</a> originally ran in big-endian mode, but by 2019, IBM had transitioned to little-endian mode for Linux to ease the porting of Linux software from x86 to Power.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13">&#91;13&#93;</a></sup><sup id="cite_ref-14" class="reference"><a href="#cite_note-14">&#91;14&#93;</a></sup> SPARC has no relevant little-endian deployment, as both <a href="/https/en.wikipedia.org/wiki/Oracle_Solaris" title="Oracle Solaris">Oracle Solaris</a> and Linux run in big-endian mode on bi-endian SPARC systems, and can be considered big-endian in practice. ARM, C-Sky, and RISC-V have no relevant big-endian deployments, and can be considered little-endian in practice. </p> <h3><span class="mw-headline" id="Bi-endianness">Bi-endianness</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=10"title="Edit section: Bi-endianness" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Some instruction sets feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word <i>bi-endian</i>, when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. </p><p>Some architectures (including <a href="/https/en.wikipedia.org/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM</a> versions 3 and above, <a href="/https/en.wikipedia.org/wiki/PowerPC" title="PowerPC">PowerPC</a>, <a href="/https/en.wikipedia.org/wiki/DEC_Alpha" title="DEC Alpha">Alpha</a>, <a href="/https/en.wikipedia.org/wiki/SPARC" title="SPARC">SPARC</a> V9, <a href="/https/en.wikipedia.org/wiki/MIPS_architecture" title="MIPS architecture">MIPS</a>, <a href="/https/en.wikipedia.org/wiki/Intel_i860" title="Intel i860">Intel i860</a>, <a href="/https/en.wikipedia.org/wiki/PA-RISC" title="PA-RISC">PA-RISC</a>, <a href="/https/en.wikipedia.org/wiki/SuperH" title="SuperH">SuperH SH-4</a> and <a href="/https/en.wikipedia.org/wiki/IA-64" title="IA-64">IA-64</a>) feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both. This feature can improve performance or simplify the logic of networking devices and software. The word <i>bi-endian</i>, when said of hardware, denotes the capability of the machine to compute or pass data in either endian format. </p><p>Many of these architectures can be switched via software to default to a specific endian format (usually done when the computer starts up); however, on some systems, the default endianness is selected by hardware on the motherboard and cannot be changed via software (e.g. the Alpha, which runs only in big-endian mode on the <a href="/https/en.wikipedia.org/wiki/Cray_T3E" title="Cray T3E">Cray T3E</a>). </p><p>The term <i>bi-endian</i> refers primarily to how a processor treats data accesses. Instruction accesses (fetches of instruction words) on a given processor may still assume a fixed endianness, even if data accesses are fully bi-endian, though this is not always the case, such as on Intel's <a href="/https/en.wikipedia.org/wiki/IA-64" title="IA-64">IA-64</a>-based Itanium CPU, which allows both. </p><p>Some nominally bi-endian CPUs require motherboard help to fully switch endianness. For instance, the 32-bit desktop-oriented <a href="/https/en.wikipedia.org/wiki/PowerPC" title="PowerPC">PowerPC</a> processors in little-endian mode act as little-endian from the point of view of the executing programs, but they require the motherboard to perform a 64-bit swap across all 8 byte lanes to ensure that the little-endian view of things will apply to <a href="/https/en.wikipedia.org/wiki/Input/Output" class="mw-redirect" title="Input/Output">I/O</a> devices. In the absence of this unusual motherboard hardware, device driver software must write to different addresses to undo the incomplete transformation and also must perform a normal byte swap.<sup class="noprint Inline-Template" style="white-space:nowrap;">&#91;<i><a href="/https/en.wikipedia.org/wiki/Wikipedia:No_original_research" title="Wikipedia:No original research"><span title="The material near this tag possibly contains original research. (November 2023)">original research?</span></a></i>&#93;</sup> </p><p>Some CPUs, such as many PowerPC processors intended for embedded use and almost all SPARC processors, allow per-page choice of endianness. </p><p>SPARC processors since the late 1990s (SPARC v9 compliant processors) allow data endianness to be chosen with each individual instruction that loads from or stores to memory. </p><p>The <a href="/https/en.wikipedia.org/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM architecture</a> supports two big-endian modes, called <i>BE-8</i> and <i>BE-32</i>.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15">&#91;15&#93;</a></sup> CPUs up to ARMv5 only support BE-32 or word-invariant mode. Here any naturally aligned 32-bit access works like in little-endian mode, but access to a byte or 16-bit word is redirected to the corresponding address and unaligned access is not allowed. ARMv6 introduces BE-8 or byte-invariant mode, where access to a single byte works as in little-endian mode, but accessing a 16-bit, 32-bit or (starting with ARMv8) 64-bit word results in a byte swap of the data. This simplifies unaligned memory access as well as memory-mapped access to registers other than 32 bit. </p><p>Many processors have instructions to convert a word in a register to the opposite endianness, that is, they swap the order of the bytes in a 16-, 32- or 64-bit word. </p><p>Recent Intel x86 and x86-64 architecture CPUs have a MOVBE instruction (<a href="/https/en.wikipedia.org/wiki/Intel_Core" title="Intel Core">Intel Core</a> since generation 4, after <a href="/https/en.wikipedia.org/wiki/Intel_Atom" title="Intel Atom">Atom</a>),<sup id="cite_ref-16" class="reference"><a href="#cite_note-16">&#91;16&#93;</a></sup> which fetches a big-endian format word from memory or writes a word into memory in big-endian format. These processors are otherwise thoroughly little-endian. </p><p>There are also devices which use different formats in different places. For instance, the BQ27421 <a href="/https/en.wikipedia.org/wiki/Texas_Instruments" title="Texas Instruments">Texas Instruments</a> battery gauge uses the little-endian format for its registers and the big-endian format for its <a href="/https/en.wikipedia.org/wiki/Random-access_memory" title="Random-access memory">random-access memory</a>. </p><p><a href="/https/en.wikipedia.org/wiki/SPARC" title="SPARC">SPARC</a> historically used big-endian until version 9, which is bi-endian. Similarly early IBM POWER processors were big-endian, but the <a href="/https/en.wikipedia.org/wiki/PowerPC" title="PowerPC">PowerPC</a> and <a href="/https/en.wikipedia.org/wiki/Power_ISA" title="Power ISA">Power ISA</a> descendants are now bi-endian. The <a href="/https/en.wikipedia.org/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM architecture</a> was little-endian before version 3 when it became bi-endian. </p> <h3><span class="mw-headline" id="Floating_point">Floating point</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=11"title="Edit section: Floating point" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Although many processors use little-endian storage for all types of data (integer, floating point), there are a number of hardware architectures where <a href="/https/en.wikipedia.org/wiki/Floating-point" class="mw-redirect" title="Floating-point">floating-point</a> numbers are represented in big-endian form while integers are represented in little-endian form.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17">&#91;17&#93;</a></sup> There are <a href="/https/en.wikipedia.org/wiki/ARM_architecture" class="mw-redirect" title="ARM architecture">ARM</a> processors that have mixed-endian floating-point representation for double-precision numbers: each of the two 32-bit words is stored as little-endian, but the most significant word is stored first. <a href="/https/en.wikipedia.org/wiki/VAX" title="VAX">VAX</a> floating point stores little-endian 16-bit words in big-endian order. Because there have been many floating-point formats with no network standard representation for them, the <a href="/https/en.wikipedia.org/wiki/External_Data_Representation" title="External Data Representation">XDR</a> standard uses big-endian IEEE 754 as its representation. It may therefore appear strange that the widespread <a href="/https/en.wikipedia.org/wiki/IEEE_754" title="IEEE 754">IEEE 754</a> floating-point standard does not specify endianness.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18">&#91;18&#93;</a></sup> Theoretically, this means that even standard IEEE floating-point data written by one machine might not be readable by another. However, on modern standard computers (i.e., implementing IEEE 754), one may safely assume that the endianness is the same for floating-point numbers as for integers, making the conversion straightforward regardless of data type. Small <a href="/https/en.wikipedia.org/wiki/Embedded_system" title="Embedded system">embedded systems</a> using special floating-point formats may be another matter, however. </p> <h3><span class="mw-headline" id="Variable-length_data">Variable-length data</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=12"title="Edit section: Variable-length data" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Most instructions considered so far contain the size (lengths) of their <a href="/https/en.wikipedia.org/wiki/Operand" title="Operand">operands</a> within the <a href="/https/en.wikipedia.org/wiki/Operation_code" class="mw-redirect" title="Operation code">operation code</a>. Frequently available operand lengths are 1, 2, 4, 8, or 16 bytes. But there are also architectures where the length of an operand may be held in a separate field of the instruction or with the operand itself, e.g. by means of a <a href="/https/en.wikipedia.org/wiki/Word_mark_(computer_hardware)" title="Word mark (computer hardware)">word mark</a>. Such an approach allows operand lengths up to 256 bytes or larger. The data types of such operands are <a href="/https/en.wikipedia.org/wiki/String_(computer_science)" title="String (computer science)">character strings</a> or <a href="/https/en.wikipedia.org/wiki/Binary-coded_decimal" title="Binary-coded decimal">BCD</a>. Machines able to manipulate such data with one instruction (e.g. compare, add) include the <a href="/https/en.wikipedia.org/wiki/IBM_1401" title="IBM 1401">IBM 1401</a>, <a href="/https/en.wikipedia.org/wiki/IBM_1410" title="IBM 1410">1410</a>, <a href="/https/en.wikipedia.org/wiki/IBM_1620" title="IBM 1620">1620</a>, <a href="/https/en.wikipedia.org/wiki/IBM_System/360" title="IBM System/360">System/360</a>, <a href="/https/en.wikipedia.org/wiki/IBM_System/370" title="IBM System/370">System/370</a>, <a href="/https/en.wikipedia.org/wiki/ESA/390" class="mw-redirect" title="ESA/390">ESA/390</a>, and <a href="/https/en.wikipedia.org/wiki/Z/Architecture" title="Z/Architecture">z/Architecture</a>, all of them of type big-endian. </p> <h3><span class="mw-headline" id="Middle-endian">Middle-endian</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=13"title="Edit section: Middle-endian" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Numerous other orderings, generically called <i>middle-endian</i> or <i>mixed-endian</i>, are possible. </p><p>The PDP-11 architecture is little-endian within its native 16-bit words, but stores 32-bit data as an unusual big-endian word pairs. <a href="/https/en.wikipedia.org/wiki/Unix" title="Unix">Unix</a> was one of the first systems to allow the same code to be compiled for platforms with different internal representations. One of the first programs converted was supposed to print out <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">Unix</code>, but on the Series/1 it printed <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">nUxi</code> instead.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19">&#91;19&#93;</a></sup> </p><p>The <a href="/https/en.wikipedia.org/wiki/PDP-11" title="PDP-11">PDP-11</a> is in principle a 16-bit little-endian system. The instructions to convert between floating-point and integer values in the optional floating-point processor of the PDP-11/45, PDP-11/70, and in some later processors, stored 32-bit "double precision integer long" values with the 16-bit halves swapped from the expected little-endian order. The <a href="/https/en.wikipedia.org/wiki/UNIX" class="mw-redirect" title="UNIX">UNIX</a> <a href="/https/en.wikipedia.org/wiki/C_(programming_language)" title="C (programming language)">C</a> compiler used the same format for 32-bit long integers. This ordering is known as <i>PDP-endian</i>.<sup id="cite_ref-20" class="reference"><a href="#cite_note-20">&#91;20&#93;</a></sup> </p><p>A way to interpret this endianness is that it stores a 32-bit integer as two little-endian 16-bit words, with a big-endian word ordering. </p><p><a href="/https/en.wikipedia.org/wiki/Segment_descriptors" class="mw-redirect" title="Segment descriptors">Segment descriptors</a> of <a href="/https/en.wikipedia.org/wiki/IA-32" title="IA-32">IA-32</a> and compatible processors keep a 32-bit base address of the segment stored in little-endian order, but in four nonconsecutive bytes, at relative positions 2, 3, 4 and 7 of the descriptor start.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21">&#91;21&#93;</a></sup> </p> <h2><span class="mw-headline" id="Software">Software</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=14"title="Edit section: Software" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <h3><span class="mw-headline" id="Logic_design">Logic design</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=15"title="Edit section: Logic design" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p><a href="/https/en.wikipedia.org/wiki/Hardware_description_language" title="Hardware description language">Hardware description languages</a> (HDLs) used to express digital logic often support arbitrary endianness, with arbitrary granularity. For example, in <a href="/https/en.wikipedia.org/wiki/SystemVerilog" title="SystemVerilog">SystemVerilog</a>, a word can be defined as little-endian or big-endian.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">&#91;<i><a href="/https/en.wikipedia.org/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (November 2023)">citation needed</span></a></i>&#93;</sup> </p> <h3><span class="mw-headline" id="Files_and_filesystems">Files and filesystems</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=16"title="Edit section: Files and filesystems" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>The recognition of endianness is important when reading a file or filesystem created on a computer with different endianness. </p><p>Fortran sequential unformatted files created with one endianness usually cannot be read on a system using the other endianness because Fortran usually implements a <a href="/https/en.wikipedia.org/wiki/Storage_record" title="Storage record">record</a> (defined as the data written by a single Fortran statement) as data preceded and succeeded by count fields, which are integers equal to the number of bytes in the data. An attempt to read such a file using Fortran on a system of the other endianness results in a run-time error, because the count fields are incorrect. </p><p><a href="/https/en.wikipedia.org/wiki/Unicode" title="Unicode">Unicode</a> text can optionally start with a <a href="/https/en.wikipedia.org/wiki/Byte_order_mark" title="Byte order mark">byte order mark</a> (BOM) to signal the endianness of the file or stream. Its code point is U+FEFF. In <a href="/https/en.wikipedia.org/wiki/UTF-32" title="UTF-32">UTF-32</a> for example, a big-endian file should start with <code class="nowrap mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">00 00 FE FF</code>; a little-endian should start with <code class="nowrap mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">FF FE 00 00</code>. </p><p>Application binary data formats, such as <a href="/https/en.wikipedia.org/wiki/MATLAB" title="MATLAB">MATLAB</a> <i>.mat</i> files, or the <i>.bil</i> data format, used in topography, are usually endianness-independent. This is achieved by storing the data always in one fixed endianness or carrying with the data a switch to indicate the endianness. An example of the former is the binary <a href="/https/en.wikipedia.org/wiki/XLS_file" class="mw-redirect" title="XLS file">XLS file</a> format that is portable between Windows and Mac systems and always little-endian, requiring the Mac application to swap the bytes on load and save when running on a big-endian Motorola 68K or PowerPC processor.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22">&#91;22&#93;</a></sup> </p><p><a href="/https/en.wikipedia.org/wiki/TIFF" title="TIFF">TIFF</a> image files are an example of the second strategy, whose header instructs the application about the endianness of their internal binary integers. If a file starts with the signature <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">MM</code> it means that integers are represented as big-endian, while <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">II</code> means little-endian. Those signatures need a single 16-bit word each, and they are <a href="/https/en.wikipedia.org/wiki/Palindrome" title="Palindrome">palindromes</a>, so they are endianness independent. <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">I</code> stands for <a href="/https/en.wikipedia.org/wiki/Intel" title="Intel">Intel</a> and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">M</code> stands for <a href="/https/en.wikipedia.org/wiki/Motorola" title="Motorola">Motorola</a>. Intel CPUs are little-endian, while Motorola 680x0 CPUs are big-endian. This explicit signature allows a TIFF reader program to swap bytes if necessary when a given file was generated by a TIFF writer program running on a computer with a different endianness. </p><p>As a consequence of its original implementation on the Intel 8080 platform, the operating system-independent <a href="/https/en.wikipedia.org/wiki/File_Allocation_Table" title="File Allocation Table">File Allocation Table</a> (FAT) file system is defined with little-endian byte ordering, even on platforms using another endianness natively, necessitating byte-swap operations for maintaining the FAT on these platforms. </p><p><a href="/https/en.wikipedia.org/wiki/ZFS" title="ZFS">ZFS</a>, which combines a <a href="/https/en.wikipedia.org/wiki/Filesystem" class="mw-redirect" title="Filesystem">filesystem</a> and a <a href="/https/en.wikipedia.org/wiki/Logical_volume_management" title="Logical volume management">logical volume manager</a>, is known to provide adaptive endianness and to work with both big-endian and little-endian systems.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23">&#91;23&#93;</a></sup> </p> <h3><span class="mw-headline" id="Networking">Networking</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=17"title="Edit section: Networking" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h3> <p>Many <a href="/https/en.wikipedia.org/wiki/IETF_RFC" class="mw-redirect" title="IETF RFC">IETF RFCs</a> use the term <i>network order</i>, meaning the order of transmission for bytes <i>over the wire</i> in <a href="/https/en.wikipedia.org/wiki/Network_protocols" class="mw-redirect" title="Network protocols">network protocols</a>. Among others, the historic <style data-mw-deduplicate="TemplateStyles:r1133582631">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free a,.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited a,.mw-parser-output .id-lock-registration a,.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription a,.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:#d33}.mw-parser-output .cs1-visible-error{color:#d33}.mw-parser-output .cs1-maint{display:none;color:#3a3;margin-left:0.3em}.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}</style>RFC&#160;<a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc1700">1700</a> defines the network order for protocols in the <a href="/https/en.wikipedia.org/wiki/Internet_protocol_suite" title="Internet protocol suite">Internet protocol suite</a> to be big-endian.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24">&#91;24&#93;</a></sup> </p><p>However, not all protocols use big-endian byte order as the network order. The <a href="/https/en.wikipedia.org/wiki/Server_Message_Block" title="Server Message Block">Server Message Block</a> (SMB) protocol uses little-endian byte order. In <a href="/https/en.wikipedia.org/wiki/CANopen" title="CANopen">CANopen</a>, multi-byte parameters are always sent <a href="/https/en.wikipedia.org/wiki/Least_significant_byte" class="mw-redirect" title="Least significant byte">least significant byte</a> first (little-endian). The same is true for <a href="/https/en.wikipedia.org/wiki/Ethernet_Powerlink" title="Ethernet Powerlink">Ethernet Powerlink</a>.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25">&#91;25&#93;</a></sup> </p><p>The <a href="/https/en.wikipedia.org/wiki/Berkeley_sockets" title="Berkeley sockets">Berkeley sockets</a> <a href="/https/en.wikipedia.org/wiki/Application_programming_interface" class="mw-redirect" title="Application programming interface">API</a> defines a set of functions to convert 16- and 32-bit integers to and from network byte order: the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">htons</code> (host-to-network-short) and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">htonl</code> (host-to-network-long) functions convert 16- and 32-bit values respectively from machine (<i>host</i>) to network order; the <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">ntohs</code> and <code class="mw-highlight mw-highlight-lang-text mw-content-ltr" id="" style="" dir="ltr">ntohl</code> functions convert from network to host order.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26">&#91;26&#93;</a></sup><sup id="cite_ref-27" class="reference"><a href="#cite_note-27">&#91;27&#93;</a></sup> These functions may be a <a href="/https/en.wikipedia.org/wiki/No-op" class="mw-redirect" title="No-op">no-op</a> on a big-endian system. </p><p>While the high-level network protocols usually consider the byte (mostly meant as <i><a href="/https/en.wikipedia.org/wiki/Octet_(computing)" title="Octet (computing)">octet</a></i>) as their atomic unit, the lowest layers of a <a href="/https/en.wikipedia.org/wiki/Network_stack" class="mw-redirect" title="Network stack">network stack</a> may deal with ordering of bits within a byte. </p> <h2><span class="mw-headline" id="See_also">See also</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=18"title="Edit section: See also" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <ul><li><a href="/https/en.wikipedia.org/wiki/Bit_order" class="mw-redirect" title="Bit order">Bit order</a>&#160;– Convention to identify bit positions<span style="display:none" class="category-annotation-with-redirected-description">Pages displaying short descriptions of redirect targets</span></li></ul> <h2><span class="mw-headline" id="References">References</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=19"title="Edit section: References" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <style data-mw-deduplicate="TemplateStyles:r1011085734">.mw-parser-output .reflist{font-size:90%;margin-bottom:0.5em;list-style-type:decimal}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap mw-references-columns"><ol class="references"> <li id="cite_note-TanenbaumAustin2012-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-TanenbaumAustin2012_1-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFTanenbaumAustin2012" class="citation book cs1">Tanenbaum, Andrew S.; Austin, Todd M. (4 August 2012). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=m0HHygAACAAJ"><i>Structured Computer Organization</i></a>. Prentice Hall PTR. <a href="/https/en.wikipedia.org/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/https/en.wikipedia.org/wiki/Special:BookSources/978-0-13-291652-3" title="Special:BookSources/978-0-13-291652-3"><bdi>978-0-13-291652-3</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">18 May</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=Structured+Computer+Organization&amp;rft.pub=Prentice+Hall+PTR&amp;rft.date=2012-08-04&amp;rft.isbn=978-0-13-291652-3&amp;rft.aulast=Tanenbaum&amp;rft.aufirst=Andrew+S.&amp;rft.au=Austin%2C+Todd+M.&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fbooks.google.com%2Fbooks%3Fid%3Dm0HHygAACAAJ&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><span class="plainlinksneverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/byteorder.3">byteorder(3)</a></code></span>&#160;–&#160;<a href="/https/en.wikipedia.org/wiki/Linux" title="Linux">Linux</a> Programmer's <a href="/https/en.wikipedia.org/wiki/Man_page" title="Man page">Manual</a> – Library Functions</span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><span class="plainlinksneverexpand"><code><a rel="nofollow" class="external text" href="https://manned.org/endian.3">endian(3)</a></code></span>&#160;–&#160;<a href="/https/en.wikipedia.org/wiki/Linux" title="Linux">Linux</a> Programmer's <a href="/https/en.wikipedia.org/wiki/Man_page" title="Man page">Manual</a> – Library Functions</span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://en.cppreference.com/w/cpp/numeric/byteswap">"std::byteswap"</a>. <i>en.cppreference.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">3 October</span> 2023</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=en.cppreference.com&amp;rft.atitle=std%3A%3Abyteswap&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fen.cppreference.com%2Fw%2Fcpp%2Fnumeric%2Fbyteswap&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf">"Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2 (2A, 2B &amp; 2C): Instruction Set Reference, A-Z"</a> <span class="cs1-format">(PDF)</span>. Intel. September 2016. p. 3–112. <a rel="nofollow" class="external text" href="https://ghostarchive.org/archive/20221009/http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2022-10-09<span class="reference-accessdate">. Retrieved <span class="nowrap">2017-02-05</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Intel+64+and+IA-32+Architectures+Software+Developer%27s+Manual+Volume+2+%282A%2C+2B+%26+2C%29%3A+Instruction+Set+Reference%2C+A-Z&amp;rft.pages=p.+3-112&amp;rft.pub=Intel&amp;rft.date=2016-09&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fwww.intel.com%2Fcontent%2Fdam%2Fwww%2Fpublic%2Fus%2Fen%2Fdocuments%2Fmanuals%2F64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://infocenter.arm.com/help/topic/com.arm.doc.ddi0487a.k_10775/index.html">"ARMv8-A Reference Manual"</a>. <a href="/https/en.wikipedia.org/wiki/ARM_Holdings" class="mw-redirect" title="ARM Holdings">ARM Holdings</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=ARMv8-A+Reference+Manual&amp;rft.pub=ARM+Holdings&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Finfocenter.arm.com%2Fhelp%2Ftopic%2Fcom.arm.doc.ddi0487a.k_10775%2Findex.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.iso.org/standard/57853.html">"C11 standard"</a>. ISO. Section 6.5.2.3 "Structure and Union members", §3 and footnote 95<span class="reference-accessdate">. Retrieved <span class="nowrap">15 August</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=C11+standard&amp;rft.pages=Section+6.5.2.3+%22Structure+and+Union+members%22%2C+%C2%A73+and+footnote+95&amp;rft.pub=ISO&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fwww.iso.org%2Fstandard%2F57853.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Type-punning">"3.10 Options That Control Optimization: -fstrict-aliasing"</a>. <i>GNU Compiler Collection (GCC)</i>. Free Software Foundation<span class="reference-accessdate">. Retrieved <span class="nowrap">15 August</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=GNU+Compiler+Collection+%28GCC%29&amp;rft.atitle=3.10+Options+That+Control+Optimization%3A+-fstrict-aliasing&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fgcc.gnu.org%2Fonlinedocs%2Fgcc%2FOptimize-Options.html%23Type-punning&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFTorvalds2018" class="citation mailinglist cs1">Torvalds, Linus (5 Jun 2018). <a rel="nofollow" class="external text" href="https://lkml.org/lkml/2018/6/5/769">"&#91;GIT PULL&#93; Device properties framework update for v4.18-rc1"</a>. <i>Linux Kernel</i> (Mailing list)<span class="reference-accessdate">. Retrieved <span class="nowrap">15 August</span> 2018</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=%5BGIT+PULL%5D+Device+properties+framework+update+for+v4.18-rc1&amp;rft.date=2018-06-05&amp;rft.aulast=Torvalds&amp;rft.aufirst=Linus&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Flkml.org%2Flkml%2F2018%2F6%2F5%2F769&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFHouseFaggin,_FedericoFeeney,_HalGelbach,_Ed2006" class="citation web cs1">House, David; Faggin, Federico; Feeney, Hal; Gelbach, Ed; Hoff, Ted; Mazor, Stan; Smith, Hank (2006-09-21). <a rel="nofollow" class="external text" href="http://archive.computerhistory.org/resources/text/Oral_History/Intel_8008/Intel_8008_1.oral_history.2006.102657982.pdf#page=5">"Oral History Panel on the Development and Promotion of the Intel 8008 Microprocessor"</a> <span class="cs1-format">(PDF)</span>. <a href="/https/en.wikipedia.org/wiki/Computer_History_Museum" title="Computer History Museum">Computer History Museum</a>. p.&#160;b5<span class="reference-accessdate">. Retrieved <span class="nowrap">23 April</span> 2014</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Oral+History+Panel+on+the+Development+and+Promotion+of+the+Intel+8008+Microprocessor&amp;rft.pages=b5&amp;rft.pub=Computer+History+Museum&amp;rft.date=2006-09-21&amp;rft.aulast=House&amp;rft.aufirst=David&amp;rft.au=Faggin%2C+Federico&amp;rft.au=Feeney%2C+Hal&amp;rft.au=Gelbach%2C+Ed&amp;rft.au=Hoff%2C+Ted&amp;rft.au=Mazor%2C+Stan&amp;rft.au=Smith%2C+Hank&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Farchive.computerhistory.org%2Fresources%2Ftext%2FOral_History%2FIntel_8008%2FIntel_8008_1.oral_history.2006.102657982.pdf%23page%3D5&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-Lunde2009-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-Lunde2009_11-0">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFLunde2009" class="citation book cs1">Lunde, Ken (13 January 2009). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=SA92uQqTB-AC&amp;pg=PA29"><i>CJKV Information Processing</i></a>. O'Reilly Media, Inc. p.&#160;29. <a href="/https/en.wikipedia.org/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&#160;<a href="/https/en.wikipedia.org/wiki/Special:BookSources/978-0-596-51447-1" title="Special:BookSources/978-0-596-51447-1"><bdi>978-0-596-51447-1</bdi></a><span class="reference-accessdate">. Retrieved <span class="nowrap">21 May</span> 2013</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=CJKV+Information+Processing&amp;rft.pages=29&amp;rft.pub=O%27Reilly+Media%2C+Inc.&amp;rft.date=2009-01-13&amp;rft.isbn=978-0-596-51447-1&amp;rft.aulast=Lunde&amp;rft.aufirst=Ken&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fbooks.google.com%2Fbooks%3Fid%3DSA92uQqTB-AC%26pg%3DPA29&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.keil.com/support/man/docs/c51/c51_xe.htm">"Cx51 User's Guide: E. Byte Ordering"</a>. <i>keil.com</i>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=keil.com&amp;rft.atitle=Cx51+User%27s+Guide%3A+E.+Byte+Ordering&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fwww.keil.com%2Fsupport%2Fman%2Fdocs%2Fc51%2Fc51_xe.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFJeff_Scheel2016" class="citation web cs1">Jeff Scheel (2016-06-16). <a rel="nofollow" class="external text" href="https://developer.ibm.com/articles/l-power-little-endian-faq-trs/">"Little endian and Linux on IBM Power Systems"</a>. <i>IBM</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2022-03-27</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=IBM&amp;rft.atitle=Little+endian+and+Linux+on+IBM+Power+Systems&amp;rft.date=2016-06-16&amp;rft.au=Jeff+Scheel&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fdeveloper.ibm.com%2Farticles%2Fl-power-little-endian-faq-trs%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFTimothy_Prickett_Morgan2019" class="citation web cs1">Timothy Prickett Morgan (10 June 2019). <a rel="nofollow" class="external text" href="https://www.itjungle.com/2019/06/10/the-transition-to-rhel-8-begins-on-power-systems/">"The Transition To RHEL 8 Begins On Power Systems"</a>. <i>ITJungle</i><span class="reference-accessdate">. Retrieved <span class="nowrap">26 March</span> 2022</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=ITJungle&amp;rft.atitle=The+Transition+To+RHEL+8+Begins+On+Power+Systems&amp;rft.date=2019-06-10&amp;rft.au=Timothy+Prickett+Morgan&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fwww.itjungle.com%2F2019%2F06%2F10%2Fthe-transition-to-rhel-8-begins-on-power-systems%2F&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0290g/ch06s05s01.html">"Differences between BE-32 and BE-8 buses"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Differences+between+BE-32+and+BE-8+buses&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Finfocenter.arm.com%2Fhelp%2Findex.jsp%3Ftopic%3D%2Fcom.arm.doc.ddi0290g%2Fch06s05s01.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://software.intel.com/sites/default/files/article/405250/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf">"How to detect New Instruction support in the 4th generation Intel® Core™ processor family"</a> <span class="cs1-format">(PDF)</span><span class="reference-accessdate">. Retrieved <span class="nowrap">2 May</span> 2017</span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=How+to+detect+New+Instruction+support+in+the+4th+generation+Intel%C2%AE+Core%E2%84%A2+processor+family&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fsoftware.intel.com%2Fsites%2Fdefault%2Ffiles%2Farticle%2F405250%2Fhow-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFSavard2018" class="citation cs2">Savard, John J. G. (2018) [2005], <a rel="nofollow" class="external text" href="http://www.quadibloc.com/comp/cp0201.htm">"Floating-Point Formats"</a>, <i>quadibloc</i>, <a rel="nofollow" class="external text" href="https://web.archive.org/web/20180703001709/http://www.quadibloc.com/comp/cp0201.htm">archived</a> from the original on 2018-07-03<span class="reference-accessdate">, retrieved <span class="nowrap">2018-07-16</span></span></cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=quadibloc&amp;rft.atitle=Floating-Point+Formats&amp;rft.date=2018&amp;rft.aulast=Savard&amp;rft.aufirst=John+J.+G.&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fwww.quadibloc.com%2Fcomp%2Fcp0201.htm&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.perl.com/doc/manual/html/pod/perlfunc/pack.html">"pack – convert a list into a binary representation"</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=pack+%E2%80%93+convert+a+list+into+a+binary+representation&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fwww.perl.com%2Fdoc%2Fmanual%2Fhtml%2Fpod%2Fperlfunc%2Fpack.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFJalicsHeines1983" class="citation journal cs1">Jalics, Paul J.; Heines, Thomas S. (1 December 1983). <a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F358476.358504">"Transporting a portable operating system: UNIX to an IBM minicomputer"</a>. <i>Communications of the ACM</i>. <b>26</b> (12): 1066–1072. <a href="/https/en.wikipedia.org/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="cs1-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F358476.358504">10.1145/358476.358504</a></span>. <a href="/https/en.wikipedia.org/wiki/S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&#160;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:15558835">15558835</a>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=article&amp;rft.jtitle=Communications+of+the+ACM&amp;rft.atitle=Transporting+a+portable+operating+system%3A+UNIX+to+an+IBM+minicomputer&amp;rft.volume=26&amp;rft.issue=12&amp;rft.pages=1066-1072&amp;rft.date=1983-12-01&amp;rft_id=info%3Adoi%2F10.1145%2F358476.358504&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fapi.semanticscholar.org%2FCorpusID%3A15558835%23id-name%3DS2CID&amp;rft.aulast=Jalics&amp;rft.aufirst=Paul+J.&amp;rft.au=Heines%2C+Thomas+S.&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fdoi.org%2F10.1145%252F358476.358504&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation book cs1"><a rel="nofollow" class="external text" href="http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf"><i>PDP-11/45 Processor Handbook</i></a> <span class="cs1-format">(PDF)</span>. <a href="/https/en.wikipedia.org/wiki/Digital_Equipment_Corporation" title="Digital Equipment Corporation">Digital Equipment Corporation</a>. 1973. p.&#160;165. <a rel="nofollow" class="external text" href="https://ghostarchive.org/archive/20221009/http://bitsavers.org/pdf/dec/pdp11/handbooks/PDP1145_Handbook_1973.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2022-10-09.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=book&amp;rft.btitle=PDP-11%2F45+Processor+Handbook&amp;rft.pages=165&amp;rft.pub=Digital+Equipment+Corporation&amp;rft.date=1973&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fbitsavers.org%2Fpdf%2Fdec%2Fpdp11%2Fhandbooks%2FPDP1145_Handbook_1973.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation techreport cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20180218024045/http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf"><i>AMD64 Architecture Programmer's Manual Volume 2: System Programming</i></a> <span class="cs1-format">(PDF)</span> (Technical report). 2013. p.&#160;80. Archived from <a rel="nofollow" class="external text" href="http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/24593_APM_v21.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2018-02-18.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=report&amp;rft.btitle=AMD64+Architecture+Programmer%27s+Manual+Volume+2%3A+System+Programming&amp;rft.pages=80&amp;rft.date=2013&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Famd-dev.wpengine.netdna-cdn.com%2Fwordpress%2Fmedia%2F2012%2F10%2F24593_APM_v21.pdf&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://download.microsoft.com/download/0/B/E/0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886/Excel97-2007BinaryFileFormat(xls)Specification.xps">"Microsoft Office Excel 97 - 2007 Binary File Format Specification (*.xls 97-2007 format)"</a>. Microsoft Corporation. 2007.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=Microsoft+Office+Excel+97+-+2007+Binary+File+Format+Specification+%28%2A.xls+97-2007+format%29&amp;rft.pub=Microsoft+Corporation&amp;rft.date=2007&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fdownload.microsoft.com%2Fdownload%2F0%2FB%2FE%2F0BE8BDD7-E5E8-422A-ABFD-4342ED7AD886%2FExcel97-2007BinaryFileFormat%28xls%29Specification.xps&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFMatt_Ahrens2016" class="citation audio-visual cs1">Matt Ahrens (2016). <a rel="nofollow" class="external text" href="http://open-zfs.org/wiki/Documentation/Read_Write_Lecture"><i>FreeBSD Kernel Internals: An Intensive Code Walkthrough</i></a>. OpenZFS Documentation/Read Write Lecture.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=unknown&amp;rft.btitle=FreeBSD+Kernel+Internals%3A+An+Intensive+Code+Walkthrough&amp;rft.pub=OpenZFS+Documentation%2FRead+Write+Lecture&amp;rft.date=2016&amp;rft.au=Matt+Ahrens&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttp%2Fopen-zfs.org%2Fwiki%2FDocumentation%2FRead_Write_Lecture&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFReynoldsPostel1994" class="citation cs1"><a href="/https/en.wikipedia.org/wiki/Joyce_K._Reynolds" title="Joyce K. Reynolds">Reynolds, J.</a>; <a href="/https/en.wikipedia.org/wiki/Jon_Postel" title="Jon Postel">Postel, J.</a> (October 1994). <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc1700#page-3">"Data Notations"</a>. <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc1700"><i>Assigned Numbers</i></a>. <a href="/https/en.wikipedia.org/wiki/Internet_Engineering_Task_Force" title="Internet Engineering Task Force">IETF</a>. p.&#160;3. <a href="/https/en.wikipedia.org/wiki/Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="cs1-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.17487%2FRFC1700">10.17487/RFC1700</a></span>. STD 2.&#32;<a href="/https/en.wikipedia.org/wiki/Request_for_Comments" title="Request for Comments">RFC</a> <a rel="nofollow" class="external text" href="https://datatracker.ietf.org/doc/html/rfc1700">1700</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2012-03-02</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=Data+Notations&amp;rft.btitle=Assigned+Numbers&amp;rft.pages=p.-3&amp;rft.pub=IETF&amp;rft.date=1994-10&amp;rft_id=info%3Adoi%2F10.17487%2F&#82;FC1700&amp;rft.aulast=Reynolds&amp;rft.aufirst=J.&amp;rft.au=Postel%2C+J.&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Frfc1700%26%23035%3Bpage-3&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text">Ethernet POWERLINK Standardisation Group (2012), <i>EPSG Working Draft Proposal 301: Ethernet POWERLINK Communication Profile Specification Version 1.1.4</i>, chapter 6.1.1.</span> </li> <li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite id="CITEREFIEEE_and_The_Open_Group2018" class="citation book cs1">IEEE and The Open Group (2018). "3. System Interfaces". <a rel="nofollow" class="external text" href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/htonl.html"><i>The Open Group Base Specifications Issue 7</i></a>. Vol.&#160;2. p.&#160;1120<span class="reference-accessdate">. Retrieved <span class="nowrap">2021-04-09</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.genre=bookitem&amp;rft.atitle=3.+System+Interfaces&amp;rft.btitle=The+Open+Group+Base+Specifications+Issue+7&amp;rft.pages=1120&amp;rft.date=2018&amp;rft.au=IEEE+and+The+Open+Group&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Fpubs.opengroup.org%2Fonlinepubs%2F9699919799%2Ffunctions%2Fhtonl.html&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> <li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1133582631"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://linux.die.net/man/3/htonl">"htonl(3) - Linux man page"</a>. <i>linux.die.net</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-04-09</span></span>.</cite><span title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.genre=unknown&amp;rft.jtitle=linux.die.net&amp;rft.atitle=htonl%283%29+-+Linux+man+page&amp;rft_id=https%3A%2F%2F1.800.gay%3A443%2Fhttps%2Flinux.die.net%2Fman%2F3%2Fhtonl&amp;rfr_id=info%3Asid%2Fen.wikipedia.org%3AEndianness" class="Z3988"></span></span> </li> </ol></div></div> <h2><span class="mw-headline" id="External_links">External links</span><span class="mw-editsection"> <a role="button" href="/https/en.wikipedia.org/w/index.php?title=Endianness&amp;action=edit&amp;section=20"title="Edit section: External links" class="cdx-button cdx-button--size-large cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--icon-only cdx-button--weight-quiet "> <span class="minerva-icon minerva-icon--edit"></span> <span>edit</span> </a> </span> </h2> <ul><li><span class="noviewer" typeof="mw:File"><a href="/https/en.wikipedia.org/wiki/File:Wiktionary-logo-en-v2.svg" class="mw-file-description"><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/16px-Wiktionary-logo-en-v2.svg.png" decoding="async" width="16" height="16" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/24px-Wiktionary-logo-en-v2.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/9/99/Wiktionary-logo-en-v2.svg/32px-Wiktionary-logo-en-v2.svg.png 2x" data-file-width="512" data-file-height="512" /></a></span> The dictionary definition of <a href="https://en.wiktionary.org/wiki/Special:Search/endianness" class="extiw" title="wiktionary:Special:Search/endianness"><i>endianness</i></a> at Wiktionary</li></ul></div>'
Whether or not the change was made through a Tor exit node (tor_exit_node)
false
Unix timestamp of change (timestamp)
'1704759624'