Big Endian

big-endian

When writing a number in a positional notation, the practice of writing the most significant digits (of whatever base) before the smaller ones.

English speakers normally write left to right and so when they write a number using (the usual) hindu-arabic numerals. In Arabic, the writing goes right to left and the least significant digits are written first. However, after they're written, the numbers look the same on the page - whether they are little- or big- endian depends on who reads them.

Big-endian is the chosen NetworkByteOrder for the internet and TcpIp.

CPU instructions to use multi-byte numbers can take a big-endian approach, where the most significant bytes of a multi-byte number have the lowest memory addresses (example: MotorolaSixtyEightKay). Or the approach can be LittleEndian with the least significant bytes first.

A related but distinct problem is the approach chosen for indexing a bit in a register. Some CPU instructions have a 3-bit field that designate what bit of a byte is to be operated on. On some processors, a zero in this field accesses the most significant bit of the byte (as determined by the CPU's other instructions for arithmetic operations). Other processors use 7 to address the most significant bit.

Are there any processors left which address the MSB with zero? I have never seen this.


Contrast with LittleEndian. See also OnHolyWarsAndaPleaForPeace.


EditText of this page (last edited November 9, 2006) or FindPage with title or text search