Correct understanding of the number in memory high in high, low in low

Source: Internet
Author: User

Look at the example below
Char Szdword[4] = {0x01,0x02,0x03,0x04};
DWORD *PDW = (DWORD *) Szdword;
Array Szdword Four number of permutations of 0x01,0x02,0x03,0x04, their address order from low to high, converted to DWORD *, PDW memory real value is what?
Because the value in memory is high in the high, low in the low, so 0x01 is actually at the far right of the value, because when we read, the right side is the low 0x04 on the left, that is, each byte should be reversed, so pDW the real value is 0x04030201, And they are in memory from low to high order is 0x01,0x02,0x03,0x04

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.