Hexidecimal

Terry Martin terry_martin at mindlink.bc.ca
Fri Dec 12 18:37:36 GMT 1997


Orin Eman wrote:
> 
> > Is there something like hexidecimal for dummies?, 
> 
> Nope.  You seem to be scaling which isn't what you want.  0 thru 9 decimal
> are the same as 0 thru 9 hexadecimal then 10 thru 15 decimal are
> A thru F hexadecimal.  16 decimal is 10 hex, 17 decimal 11 hex etc..
> 
> Consider the decimal system we have.  Is there any reason for grouping
> in tens (apart from having 10 fingers)?  Not really.  We have 12 in a
> dozen, 16 (hmm) ounces in a pound etc..  and a lot of really strange
> multiples when we look at inches, feet, yards, miles etc..
> In the decimal system, we say the value of 1 in a column is 10 times
> that of 1 in the column to its right.  In hexadecimal, it is 16 times
> that of 1 in the column to its right.
> 
> In all actuality, the computer is counting in binary, just 0 and 1.
> If we group four binary digits (bits) together, we can represent
> 0 thru 15, or one hexadecimal digit.  In the past, _programmers_
> have used octal (units go 0 thru 7, then to 10 (8 decimal) etc.),
> but the computer still works in binary.
> 
> Orin.

I was just taught a lesson by someone much OLDER & wiser than I. smirk

In converting the hex from a GM EPROM to get the EPROM ID, I was told to
"just" multiply two hex numbers:

[Me]..
>I don't get it. 18h*43h=0648h/ 1608dec  I can determine by example that
>this is wrong, and the PROM ID is 6211.
>
>This is the result of expressing 1843h as dec.

>$0C * $C8=?
>Multiplication is just repetitive adding. $0C=12dec If I add $C8 to
>itself 12X it should be the same as $0C*$C8= $960/2400dec
>
>$C8+$C8+$C8+$C8+$C8+$C8+$C8+$C8+$C8+$C8+$C8+$C8=$960/2400dec
>
>Correspondingly 3272dec = 0CC8h
>                6211dec = 1843h $18*$43 = $648/ 1608dec
>
>I used to get A's in math in high school, and this is about grade 8
>stuff, base 16 arithmetic. Perhaps I have poured too many beers on my
>poor brain, but it looks like the PROM ID is the dec equivalent of the
>combined hex string formed by joining the two address contents into a
>hex string & determining the dec equivalent , not multiplying them. 
>
>> as for the vin I haven't had any luck decoding the algorith..
>

[Him]
$0C * 256 + $C8 = 3272 (Which is the right answer, BTW)

What I missed is there are bits, nibbles, bytes, 16bit words, 32 bit
words, ASCII characters which are 7bit, Binary Coded Decimal,(BDC). You
have to know what is being expressed.

I haven't found a calculator yet that will multiply $0C * $C8, and not
give $960 or 2400dec, but $0CC8 = 3272dec

Terry




More information about the Diy_efi mailing list