RAM address

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

RAM address

utsav
while specifying RAM address eg. 16384 (0x4000), what does the expression in bracket ie."(0x4000)" mean ?
Reply | Threaded
Open this post in threaded view
|

Re: RAM address

cadet1620
Administrator
utsav wrote
while specifying RAM address eg. 16384 (0x4000), what does the expression in bracket ie."(0x4000)" mean ?
That's the hexadecimal (base-16) equivalent of the decimal number.  Hexadecimal is a convenient shorthand because it is easy to convert between hex and binary by simply replacing the hex digits one at a time with the equivalent 4 binary bits.
HEX  BIN   HEX  BIN   HEX  BIN   HEX  BIN
 0   0000   4   0100   8   1000   C   1100
 1   0001   5   0101   9   1001   D   1101
 2   0010   6   0110   A   1010   E   1110
 3   0011   7   0111   B   1011   F   1111

So 0x4000 is 0100000000000000 binary. Going the other way, 0110101010000011 would be 0x6A83.
Hexadecimal is sometimes written with a trailing 'H' or 'h' instead of leading '0x': 6A83h.

--Mark