Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How the string "Hello" is placed in memory

Tags:

mips

I'm new in mips and i have read some about Big endian and little endian. I'm wondering how the string "Hello" is placed in memory in mips processor?

like image 563
Jan Avatar asked Oct 14 '25 15:10

Jan


1 Answers

Big endian the most significant byte is placed on the lowest memory address, and least significant byte is placed on the highest memory address.

The little endian is just the opposite.

"Hello" is 6 bytes including the null, here is the the "Hello" in hex 0x48 65 6C 6C 6F 21 00 and it's organized in so since every two character is one byte so it will be placed in memory in with the the most significant byte also 0x48 in the lowest memory address in MIPS.

like image 200
Listy L Avatar answered Oct 18 '25 07:10

Listy L