0
\$\begingroup\$

Processor save 32 bits number(123456780)_8 at address 1000. We would like to know what values are under addresses 1000 and 10001.
a. little endian processor
b. big endian processor

First of all we must convert number to 16: 0029CBB8.
a.
1000:29 00
1001:B8 CB

b.
1000:00 29
1001:CB B8

Tell me please, if I am right ? If not, where I am wrong ?

\$\endgroup\$
  • \$\begingroup\$ Why are you splitting on 16bit boundaries. Endianness is about byte ordering, regardless of how that ends up being stored in memory words. \$\endgroup\$ – Tom Carpenter Aug 30 '16 at 23:19
0
\$\begingroup\$

You appear to be using the octal value 012345670, which is the same as 0x0029CBB8 in C. This Wikipedia article on Endianness should be helpful; see Illustration.

Are you running on a microcontroller architecture that addresses 16-bit words? Most microprocessors address individual bytes. (See your a/b illustration, it doesn't appear to be byte-addressable.)

Little-endian produces a byte order of B8 CB 29 00 from addresses 0 to 3. I'll leave big-endian up to you to work out.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy