Converting rational number to a new base.

In summary: If the denominator were not a power of 4, the numerator and denominator would need to be in the same base, and then you would need to do the following: find the common factor of the numerator and denominator multiply that factor by the denominator add that to the numerator
  • #1
battery2004
9
0
Hello,

I found one excercise - convert a rational number 63/64(base - 10) to a number system with a base of 4 using Radix conversion.

Searching throught the internet i found this formula (i hope it`s the correct one :) ) -
http://img255.imageshack.us/img255/903/races3.jpg

Unlike integer type conversion formula, this is a little unclear. As i understand - the "C" is the number that i want to convert and "r" is the new base, but how many steps do i need to perfom (in the formula i = -1,-2,-3,-4...-n )? And how exactly do i sum these coefficients C?

Thanks in advance.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
maybe someone has another idea how to turn 63/64 into a number with a base of 4?
 
  • #3
If the problem asks you to use Radix conversion (I have no idea what that is), perhaps you should learn how that works shouldn't you? Is this for a course on number theory?
 
  • #5
battery2004 said:
maybe someone has another idea how to turn 63/64 into a number with a base of 4?

Is it just this this problem you want to solve or are you looking for a general solution for all repeating decimals? For this problem, since the denominator is a perfect power of the base, all that needs to be done is convert the numerator to base 4 and shift the decimal to the left by the number of places equal to the power.
 
  • #6
Yes. Or think of it this way...

in decimal, one position to the left of the decimal is the 10^0 place, two positions is the 10^1 place, etc. One position to the right of the decimal is the 10^-1 place, two positions is the 10^-2 place, etc.

To write the number 63/64 in decimal, we look for a sum of the form a10^0 + b10^-1 + c10^-2 + ...

For 63/64, we com e up with 0.984375 because 9*10^-1, 8*10^-2, 4*10^-3, 3*10^-4, 7*10^-5, and 5*10^-6 all add up to give 63/64.

To do 63/64, all you have to do is replace 10 with 4 and find new constants. An example:

(7+13/16) = (1)(4) + (3)(1) + (3)(1/4) + (1)(1/16) so you would get 13.31 as your answer.
 
  • #7
It's not quite clear to me what you mean. You talk about rational numbers and give an example in which the number as a fraction. Do you mean write it as a fraction (just convert numerator and denominator) in the new base, or in "decimal" (not quite the right word!) form in base 4?

For the example 63/64, 64= 43 so it is 10004. 63 is one less than 64 so it is 3334. As a fraction 63/64= (333/1000)4. That, of course, is 0.3334.

If the denominator were not a power of 4, that division would be considerably harder!
 

1. What is a rational number?

A rational number is any number that can be expressed as a fraction, where the numerator and denominator are both integers. It can also be represented as a terminating or repeating decimal.

2. What does it mean to convert a rational number to a new base?

Converting a rational number to a new base means expressing the number in a different counting system. This can be done by using the digits 0-9 and letters A-Z to represent different values, depending on the base being used.

3. How do you convert a rational number to a new base?

To convert a rational number to a new base, the number must first be converted to a decimal form. Then, the decimal number is divided by the new base and the remainder is noted. This process is repeated until the decimal number becomes 0, and the remainders are written in reverse order to form the new base number.

4. What is the purpose of converting a rational number to a new base?

Converting a rational number to a new base can make it easier to work with and compare numbers in different counting systems. It can also help in solving certain mathematical problems or understanding concepts such as fractions and decimals better.

5. What are some common bases used in converting rational numbers?

The most common bases used in converting rational numbers are base 2 (binary), base 8 (octal), base 10 (decimal), and base 16 (hexadecimal). However, any base can be used as long as it is a whole number greater than 1.

Similar threads

  • Linear and Abstract Algebra
Replies
33
Views
3K
  • Precalculus Mathematics Homework Help
Replies
11
Views
814
Replies
85
Views
4K
  • Linear and Abstract Algebra
Replies
4
Views
2K
Replies
19
Views
26K
  • Programming and Computer Science
Replies
17
Views
1K
Replies
1
Views
751
Replies
2
Views
2K
Replies
7
Views
700
  • Programming and Computer Science
Replies
1
Views
938
Back
Top