I programmed a lot in java and know the basics of python and sometimes I play with c++... And those are all High Level Programming Languages and they're great and all but I was curious about how things worked at a deeper level in this case assembly language... I started to learn assembly for the x86 processor and chose NASM as my assembler. I spent some time learning how registers and the stack work, how the information is stored and how the information can be changed , not just reading but practicing, using a debugger, etc and something really started to bother me: NUMERICAL OPERATIONS...
What I mean is whenever something is read from input it is stored as the correspondent ASCII value on the memory and I'm ok with it... I understand the basics of how to read and write to console with the whole pass offset and length system however as I mentioned before the characters including numbers are stored as ASCII values.. 0 is stored as 0x30, 1 as 0x31, etc... That means a single digit is stored as a whole byte and I see that as a disadvantage because I know a byte can represent numbers up to 255 which would save a lot of memory and time to do math operations and leave space for other data... In languages like c++ an integer value is represented by only 4 bytes which means those languages can store integers up to 4294967295
Getting to the point... What I really want to know is what is the best approach to represent numbers and do basic arithmetic operations using nasm.. should I leave those numbers as ASCII values and do the operations on a byte level or should I convert those numbers so a byte can hold a larger value ? Or is there a way to read numbers more efficiently ?
PS.: Sorry for the long post, I just wanted to give an overall background of my concern so you guys can help me based on it... And for the bad english ... I tried to be as clear as I can (English is not my native language but I try to understand it as much as I can... It helps a lot knowing english when I'm programming)