Hex

Regnirps at aol.com Regnirps at aol.com
Mon Nov 8 11:13:50 GMT 1999


In a message dated 11/8/99 1:58:23 AM, geoffsue at one.net.au writes:

>Guys
>I am in the process of learning / understanding hexadecimal and was
>wondering if you could tell me if I am wrong (most likely) or right (not
>likely )
>77a =1792 multiplied ( I cant find times key ) by 112 multiplied by 10
>=2007040 decimal?

>Geoff Richards

First, its best to use caps for the letters in Hex, though c programmers have 
gotten out of the habit. In languages like Forth where you can pick any 
radix, the lower case "a" could be a different number in base 36 or 72 or 
something. Its a nit, but "a" and "A" are different ascii values.

Second, each letter represents a group of four bits and counts to a max of 15 
(include zero and it represents 16 values). So, the first digit is 0 to 15, 
the second is 16 * 16 -1 or up to 255.  Anyway, it is the "16's place" the 
next one is the "256's place".

Your 77A is (7*256) + (7*16) + (A) or 1914

Thats a 12 bit number. If it was 77A0 it would be 30,624 which makes sense 
since 8000 hex is 32,768. (2 to the 15th power)

I have a little part of a paper I wrote that shows how to do the counting on 
your fingers in a fairly natural way.

Charlie Springer

P.S. Its late and I may have made aa mistake.



More information about the Gmecm mailing list