Binary / Hex

Discussion in 'A+' started by Fergal1982, May 5, 2004.

  1. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    ok, im reading the A+ course, and discovered that we need to be able to count (at least a little) in binary an hex.

    now ive discovered a formula that works for binary to dec:

    e.g. 101: (from right to left) [(1x2p0)+(0x2p1)+(1x2p2)] = 5
    where the number after p represents the power. if you understand (damn thing, cant write it properly here). its important to remember that the power is derived when how far from the right the column is - the farthest right is 0, the next is 1, etc.

    whilst this works, its a bit drawn out, is there a better formula for working out binary to dec? also, is there one for working out dec-binary, and the same goes for both directions for hex????

    Fergal

    Edit: ok, just found a decimal to binary conversion system:
    example number: 157
    157 / 2 = 78 remainder 1
    78 / 2 = 39
    39 / 2 = 19 remainder 1
    19 / 2 = 9 remainder 1
    9 / 2 = 4 remainder 1
    4 / 2 = 2
    2 / 2 = 1
    1/ 2 = o remainder 1

    anything with remainder 1 is a 1 in binary - the calculations without count as 0, and the order is from bottom to top therefore: 157 is 10011101b

    surely theres an easier method?
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  2. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!!!

    maybe its too late for this. but ive been trying to do reverse calculations using those two systems and the number 157 - converting to binary is fine, but when i try to convert BACK, i get 185.

    gonna scream.

    i think i need some serious help here.

    Fergal
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  3. Fergal1982

    Fergal1982 Petabyte Poster

    4,196
    172
    211
    *sigh* panic over (ish) worked out the problem, wasnt reversing the order on the decimal to binary conversion. lol. the first post has been edited, and is not correct.

    Fergal

    But still, surely theres an easier way - apart from having a piece of software to do it. lol. and theres still the hex system to worry about.
     
    Certifications: ITIL Foundation; MCTS: Visual Studio Team Foundation Server 2010, Administration
    WIP: None at present
  4. Phoenix
    Honorary Member

    Phoenix 53656e696f7220 4d6f64

    5,749
    200
    246
    um you should be able to do it in your head way easier than all that formula crap i just read lol
    hex is pretty simple from binary


    take this ip

    172.16.0.254 > Binary
    10101100.00010000.00000000.11111110

    thats the hard bit lol
    now to break it down to hex we split each octet in half
    254 > 11111110
    1111 1110

    now to become hex is simple, its pretty much its value as a number, with a letter thrown in the higher ones (A-F)

    (back to decimal here)
    10 = A
    11 = B
    12 = C
    13 = D
    14 = E
    15 = F

    so 1111 = F
    1110 = E
    254 in Decimal is 11111110 in binary and FE in Hex

    it works the same in reverse

    say we had the value

    8A
    1000 = 8
    1010 = A

    Binary = 100001010

    Decimal = 138


    let me know if its not all that clear, im really no good at explaining things hehe, but ill give you some more help if required

    remember, HEX only goes upto 15, just like a 4 bit binary value, 15 is the magic number, and remember your not adding the two HEX values, your adding there binary together to form a 8 bit value
    so 8A != 18 it = 138

    let me know if u get stuck with my ramblings lol
     
    Certifications: MCSE, MCITP, VCP
    WIP: > 0
  5. tripwire45
    Honorary Member

    tripwire45 Zettabyte Poster

    13,493
    180
    287
    I wouldn't bust your buttons too badly on figuring out how to do decimal/hex/binary conversions in your head for the A+. The few pieces you'll need to know are probably just as easy to memorize. Doing decimal/binary conversions are more important when you learn subnetting.
     
    Certifications: A+ and Network+

Share This Page

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.