ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Image:Endianessmap.jpg - Wikipedia, the free encyclopedia

Image:Endianessmap.jpg

From Wikipedia, the free encyclopedia

Contents

[edit] Explanation

This article describes how to apply the diagram Endianessmap.jpg that is shown and cited in Endianness and moved here for clarification.

Here is an example:

[edit] Big

In Big-Endian: Say you would want to:

  • write "0x12345678" 32 bit into memory at addr "0"
  • read back 16 bit from address "2"

You would take the parts of the diagram for 32 bit and Big-Endian:

 Value in register:
 12345678
  A B C D  
 Register:
 |------->
  A B C D  32 bit access

 Memory:
 | A B C D  32 bit access address 0
 ---------
   0 1 2 3
   ^
   |-> map 0 here
   A B C D  
 Result in memory: 
 | 12345678  
 ---------
   0 1 2 3
   

Now you would want to read back 16 bit from address "2" in Big-Endian: Then you would use:

 Value in memory: 
 | 12345678  
 ---------
   0 1 2 3
 Memory:
 | A B C D  16 bit access 2
 ---------
   0 1 2 3
       ^
       |-> map 2 here
       |--->
       C D  

 Register:
    |-->|
 A B C D  16 bit access 
 Result in register: 
 | 00005678  
 ---------
   0 1 2 3

[edit] Little

In Little-Endian: Say you would want to :

  • write your "0x12345678" 32 bit into memory at addr "0"
  • read back 16 bit from address "2"

You would take the parts of the diagram for 32 bit and Little-Endian:

 Value in register:
 12345678
  A B C D  
 Register:
  A B C D  32 bit access
 <-------

 Memory:
  A B C D |  32 bit access 0
 ---------
  3 2 1 0
        ^
      <-| map 0 here
  A B C D  
 Result in memory: 
  12345678|  
 ---------
   3 2 1 0
   

Now you would want to read back 16 bit from address "2" in Little-Endian: Then you would use:

 Value in memory: 
  12345678 |
 -----------
   3 2 1 0
 Memory:
  A B C D |  32 bit access address 2
 ---------
  3 2 1 0
    ^
  <-| map 2 here
  C D  

 Register:
 A B C D  16 bit access
    |<--|
 Result in register: 
  00001234  
 ---------
   3 2 1 0

[edit] Licensing


I, the copyright holder of this work, hereby publish it under the following licenses:
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeDimensionsUserComment
current09:04, 23 August 2007264×372 (21 KB)Eiselekd (Talk | contribs) (Konrad Eisele, created with xfig.)

No pages on the English Wikipedia link to this file. (Pages on other projects are not counted.)


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -