Extract size Section Representation

Source: Internet
Author: User
3. Arrange data of various types in the stack
Stack growth mode: from high address to low address
 
Data storage method:
For example, the long data stored in the memory is 0x12345678
 
A. High-end method (gig endian)
 
High byte (high) => low address
Low byte (low) => high address
 
       |----------|
0x2003 |    78    | high address
       |----------|
0x2002 |    56    |
       |----------|
0x2001 |    34    | 
       |----------|
0x2000 |    12    | low address
       |----------|
 
 
Array Storage Method (large-end method ):
For example, int A [8];
 
             |----------|
a[7], 0x2017 |    80    | high address
             |----------|
a[6], 0x2016 |    70    |
             |----------|
a[5], 0x2015 |    60    |
             |----------|
a[4], 0x2014 |    50    |
             |----------|
a[3], 0x2013 |    40    |
             |----------|
a[2], 0x2012 |    30    |
             |----------|
a[1], 0x2011 |    20    | 
             |----------|
a[0], 0x2010 |    10    | low address
             |----------|
 
B. little endian)
 
High byte (high) => high address
Low byte (low) => low address
 
       |----------|
0x2003 |    12    | high address
       |----------|
0x2002 |    34    |
       |----------|
0x2001 |    56    | 
       |----------|
0x2000 |    78    | low address
       |----------|

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.