wiki/2020-07-10-23-30-27.org
Gabriel Arazas 25dafd751c Make revisions on the skill-related notes
In this case, it's mostly about the additional perspectives on how
learning works from the act of managing your information through various
note-taking methods.

I also restructured the note on org-babel and moved as its own note on
the hierarchical notebook. I think summarizing a tool and giving my own
comments about it is a nicer way of describing it. Plus, I can freely
link between any other types of note so I figured it would be better.

That said, I should be picky on how to make org-roam entries. And also
org-roam v2 is better, after all. :)
2021-05-20 00:13:41 +08:00

1.5 KiB

Endianness

Endianness refers to how bits are read and this depends on the underlying hardware architecture. 1

For example, given the following bit, 11010, this could be read as $(1\times2^{0}) + (1\times2^{1}) + (0\times2^{2}) + (1\times2^{3}) + (0\times2^{4})$ or $11$ with the first bit being the least significant also known as little-endian. On the other hand, this could also be read as $(0\times2^{0}) + (1\times2^{1}) + (0\times2^{2}) + (1\times2^{3}) + (1\times2^{4})$ or $26$ with the last bit being the least significant which we refer to as big-endian. 2

Endianness can have subtle effects on various things — e.g., using binary data formats like FITS and HDF — like having the wrong endianness.

To know the endianness of your machine, you can simply create a test number (preferably in binary) and check for the first few digits if it's little-endian — otherwise, it is big-endian. If you have Python installed, you can simply use sys.byteorder (e.g., python -c 'import sys; print(sys.byteorder)).


1

You can enforce endianness in software but oftentimes, it is not a good idea.

2

Endianness focuses on byte order, not bit order but it is best to give the simplest example.