I'll start by highlighting some of the pillars of binary data, hopefully in a breeze. If you find yourself very attracted to these topics, I recommend this book (you can skip the HLA/assembly parts). Also note that it's a bit oldschool (I read that more than 10 years ago but it left quite an impression) so there may be newer and better resources to learn from.
A "computer" word, is a sort of unit of grouping of bits. For example, a word can be 8, 16, 32, 64 etc, bits wide. Typically a word's width is coupled to the CPU's architecture's width (i.e. 64bit CPU) but in our case, we'll treat the meaning of word as "a set of N fixed-size bits" where N is the number of bits.
The term "endian" comes from "end". When you look at a sequence of bytes and want to convert a group of bytes to a plain old number, it stands to denote which end of the number is first; in the case of big endian the first part is the bigger one. In the case of little endian the first part is the little one.
For example, there are two ways to look at the couple of bytes appearing in a binary file:
Read more →