HEX to Dec or Dec to HEX conversions

Status
Not open for further replies.

newbie

Member
Joined
Nov 23, 2004
Messages
287
Location
St Clair, Michigan
People use many formulas to convert hex to dec and back.

There is only one formula. Hex is a base 16 numeric system. Octal is a base 8 and decimal is base 10. Any older rcomputer programmer can tll you how to count in them

Dropping a traling digit is invalid just as dropping a trailing digit in decimal is.

199 is not equal to 19

simple way to count

decimal

1000 in decimal

0 + 0 x 10 + 0 x 100 + 1 * 1000

1000 in hex is ( 4096 in decmal )

0 + 0 x 16 + 0 x 256 + 1 x 4096

1000 in octal ( 512 in decimal )

0 + 0 x 8 + 0 x 64 = 1 x 512
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
finally someone that gave me some good information to go on instead of saying {lets not learn this useless info like some Database admins on here}.

Thanks for the info.
 

loumaag

Silent Key - Aug 2014
Joined
Oct 20, 2002
Messages
12,935
Location
Katy, TX
All right, I will say this one more time for the people that don't pay any attention to what was said before. NOW PAY ATTENTION!

The HEX value in our database does not relate directly to the DEC value shown in the database. There is NO one formula that applies. Not Com-4's (who despite his stated position about me is the one on the self-promotion thread mill).

For those of you who know what the HEX number displayed in the DB, I sincerely apologize that you have been made to endure this. For those of you who don't know what it is there for, forget it, you don't need it for anything.

Now I will exercise a little of that power Com-4 thinks I abuse by closing this (something I should have done two days ago!)
 
Status
Not open for further replies.
Top