??? 08/09/11 06:09 Read: times |
#183271 - Hundredth digit is quotient of division by 100 Responding to: ???'s previous message |
Note that one byte can store the values 0..255.
That means that when presenting the data in the decimal system, you need up to three digits. If starting from the full number, and computing the high (hundredth) digit, you need to divide by 100. The quotient will be the hundredth digit, and the reminder will be a value 0..99 representing the two digits to follow. You could also divide by 10 and then take the result of that and divide by ten again. This second way is most used when converting in the reverse direction, i.e. first producing the ones digit. Then the tenth digit. Then the hundredth digit. Then you can do a div 10 - the reminder is the least significant digit and the quotient is the value 0..25 to be used for the two high digits. A second div 10 to get the middle (tenth) digit as reminder and the high (hundredth) digit as quotient. |
Topic | Author | Date |
need help to display timer count on hyperterminal and LED'S | 01/01/70 00:00 | |
Attention to Details | 01/01/70 00:00 | |
divide by 10 | 01/01/70 00:00 | |
Hundredth digit is quotient of division by 100 | 01/01/70 00:00 | |
thanks | 01/01/70 00:00 | |
Debugged with pen and paper? | 01/01/70 00:00 | |
Debugged | 01/01/70 00:00 | |
Decimal or hexadecimal? | 01/01/70 00:00 | |
decision | 01/01/70 00:00 | |
So take up the challenge then | 01/01/70 00:00 | |
agreed | 01/01/70 00:00 | |
Actually BCD!! | 01/01/70 00:00 | |
Oh Details Details | 01/01/70 00:00 | |
update | 01/01/70 00:00 | |
Issues | 01/01/70 00:00 | |
better to check before sending | 01/01/70 00:00 | |
Even Better.... | 01/01/70 00:00 |