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
6800 / 6801, the
6809 and the
68000 series of processors use the big-endian format. Solely big-endian architectures include the IBM z/Architecture and
OpenRISC. The
PDP-11 minicomputer, however, uses little-endian byte order, as does its
VAX successor. The
Datapoint 2200 used simple bit-serial logic with little-endian to facilitate
carry propagation. When Intel developed the
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
8086 and its
x86 successors, including
IA-32 and
x86-64 processors. The
MOS Technology 6502 family (including
Western Design Center 65802 and
65C816), the Zilog
Z80 (including
Z180 and
eZ80), the
Altera Nios II, the
Atmel AVR, the
Andes Technology NDS32, the
Qualcomm Hexagon, 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, instructions store the return address onto the stack in little-endian format.
Bi-endianness Some instruction set architectures feature a setting which allows for switchable endianness in data fetches and stores, instruction fetches, or both; those instruction set architectures are referred to as
bi-endian. Architectures that support switchable endianness include
PowerPC/
Power ISA,
SPARC V9,
ARM versions 3 and above,
DEC Alpha,
MIPS,
Intel i860,
PA-RISC,
SuperH SH-4,
IA-64,
C-Sky, and
RISC-V. 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., Alpha, which runs only in big-endian mode on the
Cray T3E).
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. 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. 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
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. 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. 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
Atom), 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 that 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. There are
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
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. 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 systems using special floating-point formats may be another matter, however.
Variable-length data Most instructions considered so far contain the size (lengths) of their
operands 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. Such an approach allows operand lengths up to 256 bytes or larger. The data types of such operands are character strings or
BCD. Machines able to manipulate such data with one instruction (e.g. compare, add) include the
IBM 1401,
1410,
1620,
System/360,
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 is primarily 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 compiler used the same format for 32-bit long integers. This ordering is known as
PDP-endian. 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 , but on the Series/1 it printed instead. 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. == Software ==