Tuesday 8 November 2011

What is meant by high-order and low-order bytes?in C programming

What is meant by high-order and low-order bytes?

We generally write numbers from left to right, with the most significant digit first. To understand what is
meant by the “significance” of a digit, think of how much happier you would be if the first digit of your
paycheck was increased by one compared to the last digit being increased by one.

The bits in a byte of computer memory can be considered digits of a number written in base 2. That means
the least significant bit represents one, the next bit represents 2´1, or 2, the next bit represents 2´2´1, or
4, and so on. If you consider two bytes of memory as representing a single 16-bit number, one byte will hold
the least significant 8 bits, and the other will hold the most significant 8 bits. Figure X.5 shows the bits arranged into two bytes. The byte holding the least significant 8 bits is called the least significant byte, or
low-order byte. The byte containing the most significant 8 bits is the most significant byte, or highorder
byte.




Cross Reference:

X.6: How are 16- and 32-bit numbers stored?

No comments:

Post a Comment