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.
Author by
lilgodwin
Updated on June 04, 2022Comments
-
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 over 8 yearsSimple 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 over 8 years@icktoofay Thanks for that! I wasn't entirely sure; I thought that 0 was that last number.
-
SirPython over 8 years@lilgodwin To be honest, I'm not entirely sure. But, I bet a quick google search would help.
-
icktoofay over 8 yearsIt probably would be worthwhile to have at least something about the
REAL
types. -
WDS over 8 yearsMy 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 over 8 yearsUgh, Fortran on my mind, sorry. I wonder if Assembly (and the hardware itself) also does.
-
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