Electrical – little endian processor and big endian processor – save number to memory

computer-architecturemicroprocessor

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 ?

Best Answer

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.