Post
Topic
Board Services
Re: A simple bitcoin Q/A. Learn new and interesting stuff about bitcoin.
by
pugman
on 11/05/2018, 21:43:27 UTC
That's like going back to uni class CS101, anyway

Endianness is ordering the bytes (or bits) in the memory, there two notations, big-endian (most significant bit) or or little-endian the (least significant bit).
So in simple words little-endian means saving the bits in reverse order.

Bitcoin use litte-endian notation.

Bitcoin is using SHA-256 algorithm for Block hashing -> it produces hash in little-endian (leading x number zeros)

For example ,this is the latest block Block #522238, below is hash and it is shown in big-endian notation:
Code:
Hash 0000000000000000001ea8f72b5af531257e061085973ff12cde30e882d57ce4

and in little-endian notation (Swap the bytes):
Code:
Hash e47cd528e830cd12ff3f978510067e2531f55a2bf7a81e000000000000000000
Please ignore any typo as I typed in reverse manually

Now why litte-endian for blockchain its arguable, there are computational advantages in using little-endian but on the bigger picture there is no difference.
I understood a little,but what is its purpose,especially in blockchain? I don't know a lot/anything about it.

As for : Why is little Endian  used in blockchain , well it's because the dev team chose to Cheesy , (*) -> and also because the majority of new generation computers use little Endian so that's why i consider it as an optimization .
Why do they use Endian? I am worse than a noob at this,so do pardon me.