Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
403 views
in Technique[技术] by (71.8m points)

endianness - What are the benefits of the different endiannesses?

Why did some processor manifacturers decide to use

  • Little endian
  • Big endian
  • Middle endian
  • Any others?

?

I've heard that with big endian one can find out faster, if a number is negative or positive, because that bit is the first one. (This doesn't matter on modern CPUs, as individual bit can't be accessed anymore.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The benefit of little endianness is that a variable can be read as any length using the same address.

For example a 32 bit variable can be read as an 8 bit or 16 bit variable without changing the address. This may have limited benefit these days, but in the days of assembler and limited memory it could be a significant advantage


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...