Guiqiang's profileTry out the worldPhotosBlogListsMore Tools Help

Blog


    February 14

    Big-Endian vs Little-Endian

    土了, 这两个概念也会搞混,在此纪念一把.
     
    The adjectives big-endian and little-endian refer to which bytes are most significant in multi-byte data types and describe the order in which a sequence of bytes is stored in a computer's memory.
     
    In a big-endian system, the most significant value in the sequence is stored at the lowest storage address (i.e., first). In a little-endian system, the least significant value in the sequence is stored first.
     
     
    一个例子胜过千言万语:)
    For example, consider the number 1025 (2 to the tenth power plus one) stored in a 4-byte integer:
    00000000 00000000 00000100 00000001
    Address Big-Endian representation of 1025 Little-Endian representation of 1025
    00
    01
    02
    03
    00000000
    00000000
    00000100
    00000001
    00000001
    00000100
    00000000
    00000000
    February 13

    可爱的Java nuke

    ka wa yi!