Assembly data types limits and examples

13,027

Limit of an unsigned type:

0 to 2^bit_count - 1

Limit of a signed type:

-(2^(bit_count-1)) to (2^(bit_count-1))-1

For example, an unsigned byte's limit is:

0 to 255

And a signed word's limit is:

-32768 to 32767

I'm not entirely sure what the real numbers are, but my assumption is that they are floating point numbers.


For more info, see here.

Share:
13,027
lilgodwin
Author by

lilgodwin

Updated on June 04, 2022

Comments

  • lilgodwin
    lilgodwin almost 2 years

    I'm taking an Assembly Language class and the book gives me a list of data types:

    • BYTE - 8 bit unsigned integer
    • SBYTE - 8 bit signed integer
    • WORD - 16 bit unsigned integer
    • SWORD - 16 bit signed integer
    • DWORD - 32 bit unsigned integer
    • SDWORD - 32 bit signed integer
    • FWORD - 48 bit integer
    • QWORD - 64 bit integer
    • TBYTE - 80 bit (10 byte) integer
    • REAL4 - 32 bit (4 byte) short real
    • REAL8 - 64 bit (8 byte) long real
    • REAL10 - 80 bit (10 byte) extended real

    Just as the title says, I'm hoping to get information on the upper/lower limits of each of these data types, and maybe some examples.

  • lilgodwin
    lilgodwin over 8 years
    Simple enough, thanks for the quick reply. Should the last half (FWORD - REAL10) be treated as signed or unsigned? And whats the significance of calling the last 3 "real"?
  • SirPython
    SirPython over 8 years
    @icktoofay Thanks for that! I wasn't entirely sure; I thought that 0 was that last number.
  • SirPython
    SirPython over 8 years
    @lilgodwin To be honest, I'm not entirely sure. But, I bet a quick google search would help.
  • icktoofay
    icktoofay over 8 years
    It probably would be worthwhile to have at least something about the REAL types.
  • WDS
    WDS over 8 years
    My guess is that they call them REAL instead of FLOAT, for example, just because Fortran natively supports COMPLEX numbers also, so REAL is just to signify the lack of an imaginary component. The REALs are floating point. But I am sorry I don't know the upper and lower bounds, nor the decimal precision, of them.
  • WDS
    WDS over 8 years
    Ugh, Fortran on my mind, sorry. I wonder if Assembly (and the hardware itself) also does.
  • Michael Petch
    Michael Petch over 8 years
    @lilgodwin : You can learn about the limits and how REAL4, REAL8, and REAL10 floating point types are encoded at this link