Base Conversion: Hex and Oct to Decimal (w/negatives)

Everything else that doesn't fall into one of the other PB categories.
Killswitch
Enthusiast
Enthusiast
Posts: 731
Joined: Wed Apr 21, 2004 7:12 pm

Base Conversion: Hex and Oct to Decimal (w/negatives)

Post by Killswitch »

Hey,

For my current project I need to have hex to dec and oct to dec converters. I've manged to make my own, but it only works with positive numbers (basically all I've done is convert the hex number to its binary equivilant, then convert that to decimal - ok it's not perfect but it works for me).

So, any ideas on how to achieve this?
~I see one problem with your reasoning: the fact is thats not a chicken~