I started learning Assembly language from the book: Introduction to 80x86 Assembly Language and Computer Architecture
This is from the Representing Data in a Computer
We have looked at two schemes to represent numbers-
- by using binary integers (often expressed in hex) or
- by using ASCII codes.
However, these methods have two problems:
I didn't understand these problems.
1: the number of bits available for representing a number is limited, and
I didn't get this. What is he saying?
2: it is not clear how to represent a negative number.
fine
To solve the first representation problem mentioned above, you can simply include the code for a minus sign. For example, the ASCII codes for the four characters -817 are 2D (for minus), 38, 31, and 37.
I think its second representation problem
. But ok, I got it.
To solve the first problem, you could always agree to use a fixed number of bytes, perhaps padding on the left with ASCII codes for zeros or spaces.
I've no clue about what he wants to say. ASCII codes for zeros or spaces.
??
Alternatively, you could use a variable number of bytes, but agree that the number ends with the last ASCII code for a digit, that is, terminating the string with a nondigit.
I didn't get a single word.
I don't know why. But I cannot understand what he is trying to say. Could any one explain this. (examples would be great)