memory address 4000h whats the h mean?

By OddballNo3

Supporter (6)

Аватар пользователя OddballNo3

03-01-2021, 23:28

So this has been bugging me for a while.. what does the h stand for? I've googled, and i get that it designates a base 16 hexadecimal. which aren't most / everything storage related base 16 in computers? so its redundant? like a 200R resistor the R lets you know its a 200 ohm, where if it wasn't there you would assume its a 200 and be right? and its there to make newbs ask silly questions? that about right? Question

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By Daemos

Paragon (1886)

Аватар пользователя Daemos

03-01-2021, 23:35

It stands for hexadecimal.
This means that the number 4000 is in hexadecimal form. Hexadecimal numbers count to 16 opposed to the decimal numbers we normally use. That means we have 1 2 3 4 5 6 7 8 9 A B C D E and F

In assemblers we use all kind of different ways to tell the assembler what type of number to use.

For example: $4000, 4000h
When using binary: %01010101 or 01010101b
Decimal speaks for itself.

By Pencioner

Scribe (1351)

Аватар пользователя Pencioner

03-01-2021, 23:37

OddballNo3 wrote:

so its redundant? like a 200R resistor the R lets you know its a 200 ohm, where if it wasn't there you would assume its a 200 and be right?

no, 4000h = 16K = 16384 so you don't omit this 'h' from number

By ToriHino

Hero (653)

Аватар пользователя ToriHino

03-01-2021, 23:40

The h (or &h or 0x) identifier is needed to differentiate between hexadecimal and decimal values. Both hexadecimal and decimal values can be used mixed together.

For example 4000h (which is hexadecimal) and 4000 (which is decimal) are really different values(4000h is the same as decimal value 16384) so it is not redundant.

By Pencioner

Scribe (1351)

Аватар пользователя Pencioner

03-01-2021, 23:44

I suggest you to read this link for some understanding

By OddballNo3

Supporter (6)

Аватар пользователя OddballNo3

04-01-2021, 03:14

I get the hex system. Just always bugged me. been fighting trying to burn a eprom for a while now and failing, and that h gets all the hate from me today lol