Click to See Complete Forum and Search --> : Hey Danger!


inkedmn
11-29-2001, 02:26 PM
did you do that binary/hex thing in perl?

cuz i didn't do it in python, i couldn't find a base conversion formula...

YaRness
11-29-2001, 03:04 PM
binary to hex is really easy.

hex digits are 0123456789ABCDEF

b -> h
0000 -> 0
0001 -> 1
0010 -> 2
0011 -> 3
....
1110 -> E
1111 -> F


so 100011b = 23h

just convert 4 digits at a time, and crop down the leading zeros to match less than 4 digits.

Danger Fan
11-29-2001, 04:12 PM
I haven't done it yet either, I decided to go to bed early. I was gonna do it this weekend, I'm might still do it. Don't know yet. Depends on how *****ious I feel. :D