Hobbies And Interests
Home  >> Science & Nature >> Science

How to Convert Between Different Numeral Systems

One way to convert from one numeral system to another is to convert to the regular base 10 system and to change from that to the system you want. Common examples of other numeral systems are base 2 or binary, used in computer code, and base 16 or hexadecimal, used to specify colors for web pages. Add up the values of the different places of the original system to get the number in base 10. Then divide out the values for the different places in the new system to get your new number. Using this process, you get the equivalent number in base 10, which gives you an intuitive idea of the size of the value that you are converting.

Instructions

    • 1

      Note the place values of the positions in your original system. Use 1 as the right-most place value. If the base of your numeral system is Y, use Y^1 as the value of the second place from the right, Y^2 as the value of the third place from the right, etc. For a binary system, for example, note down the place values 1, 2^1=2, 2^2=4, 2^3=8 etc. and use 0 and 1 as the two symbols of the system. For a hexadecimal system, make the same calculations and note down 1, 16, 256 etc., using the numbers 0 to 9 and the letters a to f as the 16 symbols of the system.

    • 2

      Multiply the number occupying each place by the value of the place and express the result in base 10 to convert from your original numeral system to base 10. If your number is pqr in a base Y system, the value of the places in base 10 is p x 1, q x Y^1 and r x Y^2. Add the values of the places to get the base 10 number. Using the place values for a binary system from Step 1, calculate the base 10 value of the binary number 1101 as 1 x 1 + 0 x 2 + 1 x 4 + 1 x 8 = 13.

    • 3

      Divide the base 10 number by the base of the new system repeatedly to convert from base 10 to your new system. Write the remainder of each division in the places starting from the right. For a base Y system and base 10 number pqr, divide pqr by Y. Write the remainder in the units place. Divide the result by Y again and write the remainder in the second place. Continue until the number is too small to divide and write it in the final place.

    • 4

      Convert the base ten number 295 as an example to base 16. Divide 295 by 16 to get 18 with remainder 7. Write 7 in the units place. Divide 18 by 16 to get 1 with remainder 2. Write 2 in the second place with place value 16. Write 1, which is too small to be divided by 16, in the third place with place value 256. Check the hexadecimal number 127 by using the place values for a hexadecimal system from Step 1. Calculate 7 x 1 + 2 x 16 + 1 x 256 to get 295, which is the correct value.


https://www.htfbw.com © Hobbies And Interests