hex to binary, hex to decimal, etc.

thedarkwolf

Diamond Member
Oct 13, 1999
9,028
122
106
Hex to binary is easy. Just bust the 010101010101 stuff up into groups of four like 0101-1000 and figure out what each group of four is and thats what it is in hex. Does that make sense probably not but

0101-1000 binary
first section is 5 and the second one it 8 so its 58 in hex.

Its been a long time and I can't remember any tricks to go from hex to decimal other than just setting down and doing it.
 

CrazyDe1

Diamond Member
Dec 18, 2001
3,089
0
0
Go to your start menu, hit run, type in calc, hit enter, type in any binary, hex or decimal value and have it convert for you...
I've learned how to do the conversions many times but I'm lazy and never remember when I have to do it so I just use windows calculator for conversions
 

KMurphy

Golden Member
May 16, 2000
1,014
0
0
To convert hex to decimal, it's easiest to go hex -> binary -> decimal. It's just straight addition of 2^n power.
 

RaynorWolfcastle

Diamond Member
Feb 8, 2001
8,968
16
81
Hex is just base 16 so you get 0-9 then A = 10, B = 11... F = 15 each "digit" now holds 16 base-10 values

For example 10 would be written as A in hex, and
20 in decimal would be 15 in HEX, etc...
 

UglyCasanova

Lifer
Mar 25, 2001
19,275
1,361
126
base 10_____base 2_____base 16
---------------------------------------------
_____0_______0000__________0
_____1_______0001__________1
_____2_______0010__________2
_____3_______0011__________3
_____4_______0100__________4
_____5_______0101__________5
_____6_______0110__________6
_____7_______0111__________7
_____8_______1000__________8
_____9_______1001__________9
____10_______1010__________A
____11_______1011__________B
____12_______1100__________C
____13_______1101__________D
____14_______1110__________E
____15_______1111__________F

I think that's right

edit: wow, it didn't format like I had hoped at all :p
edit2: ok, should look nicer now. I should have used google
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
I always picture and imaginary odometer...

the left most reel will turn onces the digit goes over the max... for dec the max is 9, binary the max is 1, and hex the max is F... I find that after working
with them you just get used to em...
 

thedarkwolf

Diamond Member
Oct 13, 1999
9,028
122
106
Originally posted by: Mucman
I find that after working
with them you just get used to em...

Thats pretty much it.

I always found it easier to go from binary to hex to decimal than binary to decimal well for big binary numbers anyway.
Its easier to say 1111-0011-1001 = F39 hex = (do math) 3897 dec (God I hope thats right so I don't look like an idiot :) ). Its easier to see 256 16 1 than 256 128 64 32 16 8 4 2 1 but more so when you start getting real long binary numbers. Pretty soon you can see a group of four binary numbers and just know what it is and it gets real easy to convert them to hex.
 

Poontos

Platinum Member
Mar 9, 2000
2,799
0
0
Originally posted by: peter584
On a windows OS. Start>programs>accessories>calculator>view>scientific>BOO-YAH!
A-ready been suggested. This is not possible. As I am trying to help someone with it, so they can understand it.
 

scorp00

Senior member
Mar 21, 2001
994
0
71
I don't think it's one of those things that you easily understand without working with it for a long time. Try oct to hex...that's the most confusing ever.
 

brtspears2

Diamond Member
Nov 16, 2000
8,659
1
81
If you want a fun time with binary and hex... try out some IEEE-754 floating point conversions.
 

Mucman

Diamond Member
Oct 10, 1999
7,246
1
0
Originally posted by: brtspears2
If you want a fun time with binary and hex... try out some IEEE-754 floating point conversions.

Are those floating point numbers??? I remember having to make a floating point adder in VHDL :)
 

thedarkwolf

Diamond Member
Oct 13, 1999
9,028
122
106
Originally posted by: scorp00
I don't think it's one of those things that you easily understand without working with it for a long time. Try oct to hex...that's the most confusing ever.

Oct to Hex is pretty easy too. Since its crap whats the word factor? CRAP. 16 8 4 2 1 anway it easy to convert oct to binary since its one of them numbers :). To go from oct to binary you just bust the number up into groups of 3 binary numbers like 44 in oct = 100-100 in binary now bust those binary numbers back up into groups of four like so 0010-0100(same as 100-100) and thats 24 in hex. 44 oct, 0010-0100, and 24 hex all equal 36 in dec.

That thing works for any number system that is factor? of 2. So if you wanted to find out what a base 4 number would be in binary you would bust it up into groups of 2 binary number like 22 base 4 = 10-10 which would be 10 in dec or 1010 = A hex or 001-010 = 12 oct. All the same binary number just grouped different.