 My Math Forum I need some help on binary, hexadecimal and decimal numbers!

 Computer Science Computer Science Forum

 October 7th, 2007, 08:01 PM #1 Senior Member   Joined: Apr 2007 Posts: 2,140 Thanks: 0 I need some help on binary, hexadecimal and decimal numbers! Okay, I was taking a look at my computer science textbook today, and I already did took a look at the equations for how to use binary and hexadecimal. But, I'm kind of confused on some of these. 1. Convert the following decimal numbers into hexadecimal and binary numbers: 100; 4340; 2000 2. Convert the following binary numbers into hexadecimal numbers and decimal numbers: 1000011001; 100000000; 100111 3. Convert the following hexadecimal numbers into binary and decimal numbers: FEFA9; 93; 2000 Can anyone tell me how to approach all the answers to these problems? Please show how to arrive to the answers. Thanks, J. October 8th, 2007, 06:19 AM   #2
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: I need some help on binary, hexadecimal and decimal numb

Quote:
 Originally Posted by johnny Okay, I was taking a look at my computer science textbook today, and I already did took a look at the equations for how to use binary and hexadecimal. But, I'm kind of confused on some of these. 1. Convert the following decimal numbers into hexadecimal and binary numbers: 100; 4340; 2000 2. Convert the following binary numbers into hexadecimal numbers and decimal numbers: 1000011001; 100000000; 100111 3. Convert the following hexadecimal numbers into binary and decimal numbers: FEFA9; 93; 2000 Can anyone tell me how to approach all the answers to these problems? Please show how to arrive to the answers.
Converting between hexadecimal and binary is as simple as it could get -- you can do it digit-by-digit. 0 hex = 0000 binary, 1 hex = 0001 binary, 2 hex = 0010 binary, ..., F hex = 1111 binary. To go from hexadecimal to binary, make these conversions for each hexadecimal digit and remove leading zeros. To convert from binary to decimal either work from the right or add enough zeros on the left so the digits are a multiple of four.

1A7 = (0001)(1010)(0111) = 110100111
1111010 = (0111)(1010) = 7A

To convert from decimal, divide by the base you convert to. The remainder becomes the rightmost digit; continue with the quotient until you have nothing left.

123 / 16 = 7 rm 11
Number so far: (11) = B
7 / 16 = 0 rm 7
Number so far: (7)(11) = 7B
done.

To convert to decimal, count the values at each place and multiply appropriately. Since binary only has 1s and 0s, just add the value of the position whenever you have 1s:

1010100

The last position is 1, the next-to-last is 2, and so on; in this example, the first position is 64. Here I label them vertically:

631
4268421
1010100

Since only 4, 16, and 64 are marked, I add 4 +16 + 64 = 84.

With hexadecamal, the positions are 1, 16, 256, and so on. Just multiply at each step:

6AA = 6 * 256 + A * 16 + A = 6 * 256 + 10 * 16 + 10 = 1706. October 13th, 2007, 03:00 PM #3 Senior Member   Joined: Apr 2007 Posts: 2,140 Thanks: 0 Thanks for the help. Tags binary, decimal, hexadecimal, numbers ### Convert 1000011001 hexadecimal to binary

Click on a term to search for related topics.
 Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post mhhojati Number Theory 3 November 5th, 2013 11:04 PM Igo Computer Science 3 September 7th, 2012 04:58 AM zolden Number Theory 1 December 11th, 2008 09:14 PM tintincute Applied Math 14 October 14th, 2008 07:22 AM johnny Computer Science 6 October 18th, 2007 11:29 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top      