1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Hexa to Decimal Conversion, Binary to Decimal Conversion?

  1. Apr 7, 2009 #1
    1. The problem statement, all variables and given/known data
    1) How to convert 101010.0101B to decimal?

    2) and Hexa number 17DB.C to Binary.

    3) and lastly, -101 (decimal) to the 2's complement form.


    2. Relevant equations



    3. The attempt at a solution
    for the first one, clearly my problem lies at .0101B. I thought it's 1X10^-2 + 1X10^-4. Is it correct?

    for the second one, im not sure what the answer is because of the ".C"

    third, i know how to do 2's complement for those without negative. So how should i do those with negative sign?
     
  2. jcsd
  3. Apr 7, 2009 #2

    mgb_phys

    User Avatar
    Science Advisor
    Homework Helper

    There isn't really a standard for decimals in binary - you normally use IEEE floating point format.
    But I would interpret the digits after the decimal point to be 1/2, 1/4, 1/8 etc as you have done.
    Again for 2, I would say the decimal is 0xC/0x10 = 12/16=0.75

    This is a good explanation of twos complement http://en.wikipedia.org/wiki/Two's_complement
     
  4. Apr 7, 2009 #3
    You're on the right track, but use powers of two instead: 1X2^-2 + 1X2^-4.

    You can check your answer with a decimal/binary converter (one that converts fractional values as well as integers), such as the one I've written: http://www.exploringbinary.com/binary-converter/

    Do you know how to convert the 17DB part? There's a shortcut, and it involves writing out the binary equivalent of each hexadecimal digit. Once you know that, the .C part is similar.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Hexa to Decimal Conversion, Binary to Decimal Conversion?
  1. Decimal expansion (Replies: 1)

Loading...