Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/23/98 22:58
Read: times


 
#67 - RE: hexadecimals
I'm not sure exactly what you're asking, but here are some answers. Hopefully, one of them will cover your question.

1. Hexadecimals are base 16 numbers and for 8051 assemblers, are usually followed by an 'h' (w/o quotes). If the number starts with a hex character, it is usually prefixed with '0' (zero) so that the assembler or compiler knows that it is a number.

2. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (decimal) map into hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12, so FFh (or 0FFh) is (Fx16)+F or (15x16)+15 = 255 (decimal).

3. All numbers in most assemblers must also be prefixed by a '#' (w/o quotes). This is to specify an integer literal rather than a memory location. e.g. #0FFh is the number 255, whereas 0FFh is the value at memory location 0FFh.

4. Hexadecimals and decimals are treated the same, they are all just numbers. The only difference is the way the number is represented.

If you could be more specific about the problems you're having, I could probably get a better answer out to you. I hope this helps.

List of 2 messages in thread
TopicAuthorDate
hexadecimals            01/01/70 00:00      
RE: hexadecimals            01/01/70 00:00      

Back to Subject List