liveBook · Manning

Big-endian

As explained in JavaScript in Depth

A byte order that stores the most significant byte first.

Which byte comes first?

The 16-bit value 34,375 splits into two bytes: 0x86 and 0x47. In big-endian order, it is stored as 0x86 0x47. In little-endian order, the same value is stored as 0x47 0x86. section 3.1.1

Big-endian, also called network order, puts the most significant byte first. Byte order matters when a number spans multiple bytes: reversing the bytes changes how the stored sequence must be read, not the value being represented. section 3.1.1

Do not assume internal storage order matches transmitted order. Many modern systems store numbers internally in little-endian order but convert them to big-endian for network transmission. section 3.1.1

How JavaScript in Depth covers it

How deep it goes
Defines the order and works through a two-byte value; does not specify a conversion procedure.
Examples
Contrasts 0x86 0x47 with 0x47 0x86 as representations of 34,375.
What it assumes
Builds on binary place value while introducing significance and byte order through a 16-bit example.
What you can do after
Evaluate/understand whether a multibyte value places its most significant byte first.
How it connects
Connects byte order to significant bytes, hexadecimal notation, little-endian storage, and network order.

Also explained in

Compare how 3 books explain big-endian →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of JavaScript in Depth. The section links point to the parts of the book it draws on.