little endian processor and big endian processor - save number to memory
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.