Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:multiasm:cs:chapter_3_11 [2026/02/27 14:19] – [Table] jtokarzen:multiasm:cs:chapter_3_11 [2026/03/29 18:24] (current) – [Endianness] ktokarz
Line 10: Line 10:
 <table binarynumbers> <table binarynumbers>
 <caption> Integer binary numbers</caption> <caption> Integer binary numbers</caption>
-<fs small>Number of bits</fs>  <fs small>Minimum value (hexadecimal)</fs>  <fs small>Maximum value (hexadecimal)</fs>  <fs small>Minimum value (decimal)</fs>     ^ <fs small>Maximum value (decimal)</fs>     ^ +^ Number of bits  ^ Minimum value (hexadecimal)  ^ Maximum value (hexadecimal)  ^ Minimum value (decimal)     ^ Maximum value (decimal)     ^ 
-<fs small>8</fs>               | <fs small>0x00</fs>                         | <fs small>0xFF</fs>                         | <fs small>0</fs>                           | <fs small>255</fs>                         | +| 8               | 0x00                         | 0xFF                         | 0                           | 255                         | 
-<fs small>8 signed</fs>        <fs small>0x80</fs>                         | <fs small>0x7F</fs>                         | <fs small>-128</fs>                        <fs small>127</fs>                         | +| 8 signed        | 0x80                         | 0x7F                         | -128                        | 127                         | 
-<fs small>16</fs>              <fs small>0x0000</fs>                       | <fs small>0xFFFF</fs>                       | <fs small>0</fs>                           | <fs small>65 535</fs>                      | +| 16              | 0x0000                       | 0xFFFF                       | 0                           | 65 535                      | 
-<fs small>16 signed</fs>       | <fs small>0x8000</fs>                       | <fs small>0x7FFF</fs>                       | <fs small>-32 768</fs>                     | <fs small>32 767</fs>                      | +| 16 signed       | 0x8000                       | 0x7FFF                       | -32 768                     | 32 767                      | 
-<fs small>32</fs>              <fs small>0x0000 0000</fs>                  <fs small>0xFFFF FFFF</fs>                  <fs small>0</fs>                           | <fs small>4 294 967 295</fs>               | +| 32              | 0x0000 0000                  | 0xFFFF FFFF                  | 0                           | 4 294 967 295               | 
-<fs small>32 signed</fs>       | <fs small>0x8000 0000</fs>                  <fs small>0x7FFF FFFF</fs>                  <fs small>-2 147 483 648</fs>              <fs small>2 147 483 647</fs>               | +| 32 signed       | 0x8000 0000                  | 0x7FFF FFFF                  | -2 147 483 648              | 2 147 483 647               | 
-<fs small>64</fs>              <fs small>0x0000 0000 0000 0000</fs>        <fs small>0xFFFF FFFF FFFF FFFF</fs>        <fs small>0</fs>                           | <fs small>18 446 744 073 709 551 615</fs>  | +| 64              | 0x0000 0000 0000 0000        | 0xFFFF FFFF FFFF FFFF        | 0                           | 18 446 744 073 709 551 615  | 
-<fs small>64 signed</fs>       | <fs small>0x8000 0000 0000 0000</fs>        <fs small>0x7FFF FFFF FFFF FFFF</fs>        <fs small>-9 223 372 036 854 775 808</fs>  <fs small>9 223 372 036 854 775 807</fs>   |+| 64 signed       | 0x8000 0000 0000 0000        | 0x7FFF FFFF FFFF FFFF        | -9 223 372 036 854 775 808  | 9 223 372 036 854 775 807   |
 </table> </table>
  
Line 40: Line 40:
 <table realnumbers> <table realnumbers>
 <caption> Floating point numbers</caption> <caption> Floating point numbers</caption>
-<fs small>Precision</fs>        <fs small>Exponent</fs>  <fs small>Mantissa</fs>  <fs small>The smallest</fs>             <fs small>The largest</fs>              +^ Precision        ^ Exponent  ^ Mantissa  ^ The smallest                            ^ The largest                             
-<fs small>Single (32 bit)</fs>  <fs small>8 bits</fs>    <fs small>23 bits</fs>   | {{ :en:multiasm:cs:min_fp_32.png?50 }}  | {{ :en:multiasm:cs:max_fp_32.png?50 }}  | +| Single (32 bit)  | 8 bits    | 23 bits   | {{ :en:multiasm:cs:min_fp_32.png?50 }}  | {{ :en:multiasm:cs:max_fp_32.png?50 }}  | 
-<fs small>Double (64 bit)</fs>  <fs small>11 bits</fs>   | <fs small>52 bits</fs>   | {{ :en:multiasm:cs:min_fp_64.png?60 }}  | {{ :en:multiasm:cs:max_fp_64.png?50 }}  |+| Double (64 bit)  | 11 bits   | 52 bits   | {{ :en:multiasm:cs:min_fp_64.png?60 }}  | {{ :en:multiasm:cs:max_fp_64.png?50 }}  |
 </table> </table>
  
Line 67: Line 67:
 <caption>Illustration of Little and Big Endian data placement in the memory</caption> <caption>Illustration of Little and Big Endian data placement in the memory</caption>
 </figure> </figure>
 +
 +Big-endian is mainly used in network protocols, where the most significant bytes are sent first. In modern processors, the dominant order of data placement in memory is little-endian, although some processors (including ARM) can support both modes. Big endian is more human intuitive, but little endian makes it possible to access the same data with different sizes at the same address. It is important for fast data type casting (for example, treating a 32-bit integer as a 16-bit integer) because the starting address doesn't change. Some processors support conversion between little- and big-endianness with special instructions.
en/multiasm/cs/chapter_3_11.1772194766.txt.gz · Last modified: by jtokarz
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0