scubasteve
scubasteve

Reputation: 2868

What number format or notation is 01h?

I was reviewing this NEC document for programming a projector which shows RS232 command examples using number formats such as: 20h + 81h + 01h + 60h + 01h + 00h = 103h from other sections in the document it would seem that h = 15, though I could be wrong.

I'm a bit embarrassed to ask, but what number format is this? 20h or 103h

Upvotes: 2

Views: 6965

Answers (4)

joe
joe

Reputation: 8654

Its hexadecimal.

That means 16 instead of 10 as number base.
So the numbers are 0 1 2 3 4 5 6 7 8 9 A B C D E F.

Adding 20h + 81h equals A1h
or 32 + 129 = 161.

Other notations are 0x00 (C languages)

Upvotes: 1

Jared Moore
Jared Moore

Reputation: 3805

In Section 2.1 of the document you linked:

Command/response A series of strings enclosed in a frame represents a command or response (in hexadecimal notation).

Upvotes: 2

hft
hft

Reputation: 1245

It's hex.

20h = 32

01h = 1

Similar to the 0x notation. E.g. 0x20 = 20h = 32.

Upvotes: 2

Enrico Granata
Enrico Granata

Reputation: 3329

It's hexadecimal

20h == 0x20 == 32

I hadn't seen this kind of notation in a while. I remember it being used for old PC BIOS/DOS interrupt tables: http://spike.scu.edu.au/~barry/interrupts.html

Upvotes: 2

Related Questions