Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Binary and Hexidecimal  (Read 4249 times)

0 Members and 1 Guest are viewing this topic.

tangerine588

    Topic Starter


    Greenhorn

    Binary and Hexidecimal
    « on: December 18, 2009, 03:25:58 PM »
    Hi,

    I'm taking a computer class and I need to know how to convert 2009 into both Binary and Hexidecimal....

    2x3i5x



      Expert
    • Thanked: 134
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 10
    Re: Binary and Hexidecimal
    « Reply #1 on: December 18, 2009, 03:37:56 PM »
    Quote
    This is very simple.

    The number 2009 is a decimal number. Now to convert this into binary, you have to divide this with 2 and then the quotients with 2 until you get a quotient of 0 OR 1. and to convert into hexadecimal, you have to divide this with 16 and then the quotients with 16 until you get a quotient of 0 OR 1.

    Converting into binary
    -------------------------------
    Now, dividing 2009 with 2, you will get quotient of 1004 and reminder 1.
    Now, divide 1004 with 2, you will get quotient of 502 and reminder 0.
    Now, divide 502 with 2, you will get quotient of 251 and reminder 0.
    Now, divide 251 with 2, you will get quotient of 125 and reminder 1.
    Now, divide 125 with 2, you will get quotient of 62 and reminder 1.
    Now, divide 62 with 2, you will get quotient of 31 and reminder 0.
    Now, divide 31 with 2, you will get quotient of 15 and reminder 1.
    Now, divide 15 with 2, you will get quotient of 7 and reminder 1.
    Now, divide 7 with 2, you will get quotient of 3 and reminder 1.
    Now, divide 3 with 2, you will get quotient of 1 and reminder 1.

    Now, the quotient is 1 and here you can stop dividing quotients.

    Now write down the last quotient and then all the reminders in reverse order which will become 11111011001

    Converting into hexadecimal
    --------------------------------------…
    Now, dividing 2009 with 16, you will get quotient of 125 and reminder 9.
    Now, divide 125 with 16, you will get quotient of 7 and reminder 13 (This will be represented as D).
    Now, divide 7 with 16, you will get quotient of 0 and reminder 7.

    Now, the quotient is 0 and here you can stop dividing quotients.

    Now write down the last quotient and then all the reminders in reverse order which will become 07D9.

    You can ignore the leading 0 and you can represent this as 7D9.

    Hope that helps.

    tangerine588

      Topic Starter


      Greenhorn

      Re: Binary and Hexidecimal
      « Reply #2 on: December 18, 2009, 04:05:35 PM »
      A little bit can you help me with one more?  Convert 1971 into binary and hexidecimal

      2x3i5x



        Expert
      • Thanked: 134
      • Computer: Specs
      • Experience: Familiar
      • OS: Windows 10
      Re: Binary and Hexidecimal
      « Reply #3 on: December 18, 2009, 04:22:45 PM »
      A little bit can you help me with one more?  Convert 1971 into binary and hexidecimal

      Try it yourself and see if you can do it. After all, you'll need to understand how it works for your class.

      Here's a website that has a decimal to binary and hexadecimal converter that will give you the final answers so that you may check your work.

      Just try with the method I've already given, if still having difficulty getting right answer after attempting, then we'll go from there.  :)

      rthompson80819



        Specialist

        Thanked: 94
      • Experience: Experienced
      • OS: Windows 7
      Re: Binary and Hexidecimal
      « Reply #4 on: December 18, 2009, 04:29:46 PM »
      It's extremely important that you understand how to do something like this by hand.

      Once you have the understanding of how it's done by hand, the calculator in Windows can also do it for you.

      Start > accessories > calculator > view > scientific.

      Then it's real easy to do conversions.
      « Last Edit: December 18, 2009, 05:17:26 PM by rthompson80819 »

      tangerine588

        Topic Starter


        Greenhorn

        Re: Binary and Hexidecimal
        « Reply #5 on: December 18, 2009, 04:55:14 PM »
        thanks i got 111011011 for the binary and 7B3 for the hexidecimal....

        2x3i5x



          Expert
        • Thanked: 134
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 10
        Re: Binary and Hexidecimal
        « Reply #6 on: December 18, 2009, 05:01:40 PM »
        thanks i got 111011011 for the binary and 7B3 for the hexidecimal....

        great. I'm betting your teacher may ask you to do some by hand on a test or something  :)

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: Binary and Hexidecimal
        « Reply #7 on: December 18, 2009, 10:27:25 PM »
        Quote
        ... extremely important that you understand
        how to do something like this by hand.
        Exactly!

        rthompson80819



          Specialist

          Thanked: 94
        • Experience: Experienced
        • OS: Windows 7
        Re: Binary and Hexidecimal
        « Reply #8 on: December 18, 2009, 10:43:46 PM »
        Thanks to 2x3i5x for his explanation of how to convert digital to binary.  I went through that process years and years ago but after years of using calculators all the time you tend to forget that basic process.

        It's something you need to force your self to do every now and then.

        2x3i5x



          Expert
        • Thanked: 134
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 10
        Re: Binary and Hexidecimal
        « Reply #9 on: December 18, 2009, 11:00:20 PM »
        A lot of things you just take for granted I guess. Just like using a calculator to do some of the conversions or math. The formulas, regardless of how simple they may be, simply flew out the window.

        Then again, I think it's nice to review some of the techniques again. 

        You don't know when you'll need it, since it's supposed to be a basic thing  :)
        « Last Edit: December 18, 2009, 11:21:06 PM by 2x3i5x »

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: Binary and Hexidecimal
        « Reply #10 on: December 19, 2009, 09:15:35 AM »
        HEX to binary and Binary to hex is pretty easy by itself; each group of two digits in hexadecimal is 8 binary digits. in fact I imagine that is hald the reason it was decided that hex would be used for things like dumps of unknown data- (hex dumps). each byte can be represented by two hex digits.

        of course converting either into an actual decimal number isn't always strictly necessary, and when when it is it isn't always intuitive, either.
        I was trying to dereference Null Pointers before it was cool.