Science, asked by adam2168, 1 year ago

What is Little endian and why is it used?

Answers

Answered by abcxyz12
0
hiiii mate here your answer ✔️ ✔️
_______________________________

There are arguments either way, but one point is that in a little-endian system, the address of a given value in memory, taken as a 32, 16, or 8 bit width, is the same.

In other words, if you have in memory a two byte value:

0x00f0 16 0x00f1 0

taking that '16' as a 16-bit value (c 'short' on most 32-bit systems) or as an 8-bit value (generally c 'char') changes only the fetch instruction you use — not the address you fetch from.

On a big-endian system, with the above layed out as:

0x00f0 0 0x00f1 16

you would need to increment the pointer and then perform the narrower fetch operation on the new value.

So, in short, ‘on little endian systems, casts are a no-op.’

______________________________

❤️⭐I hope you mark as brainlist answer⭐❤️
Similar questions