??? 02/27/04 21:26 Read: times |
#65651 - RE: Ascii/Decimal? Responding to: ???'s previous message |
hi,
2 on the keypad this will = 32hex. Then if i press 4 =34hex that`s correct To multiply 2 by 4 I must first convert their ascii values to binary then multiply them you are correct again. but do not multiply 0x32 on 0x34. See, it is simple: - digit TWO on keyboard is just a character, like you may see 'a','b','c' in alphabet. - number 0x32 is its ASCII code inside charset table. Each digit, letter, sign, terminal command etc has own code. They are collected inside character sets - special tables of codes for each thing. There are alot of different charsets over the World, most popular of ones is ISO specification. But! Most of them include based character set called ASCII. This base set contains some terminal commands, latin letters, arabic digits amd some signs (comma, dot, plus, minus etc). - oh, sorry I came out. There is another system: binary number, digit. It is what you learn at school. When you do 2+3 then you add digits - neither the characters nor the ASCII codes. See: if you do it for characters then 2+3 comes to 23 (concatenation), if for ASCII codes then 0x32+0x33=0x65 (it is ASCII code of capital letter A). So it is difference. Now you know: - take code. convert it to binary number. Operate. Regards, Oleg |
Topic | Author | Date |
Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
Numbers vs Codes | 01/01/70 00:00 | |
RE: Numbers vs Codes | 01/01/70 00:00 | |
RE: Numbers vs Codes | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal? | 01/01/70 00:00 | |
RE: Ascii/Decimal?![]() | 01/01/70 00:00 |