Converting 1/7 to Base 2: A Scientific Approach

  • Thread starter zeebo17
  • Start date
  • Tags
    Base
In summary: Therefore, your method is incorrect. In summary, to find 1/7 in base 2, you can use long division or repeatedly multiply the fraction by 2 and convert the results to binary until you reach a repeating pattern. The binary value is 0.(001), where () indicates the repeating part. Another way to approach this is to think of 1/7 as 0.142857 in decimal and use the process of converting decimals to fractions to find the binary representation. However, the method of multiplying by 2 and converting to binary is more efficient.
  • #1
zeebo17
41
0
What is 1/7 in base 2? How would you solve for this?

Thanks!
 
Mathematics news on Phys.org
  • #2
The same as it is in any other base.

I assume you meant to ask how to compute its infinite binary expansion? Use long division.
 
  • #3
As perhaps a hint, what is 1/2 in binary?
 
  • #5
Just multiply your fraction by 2 repeatedly, writing a 0 for products less than 1, and a 1 for products greater than 1 (for the latter, subtract out 1 before continuing with the multiplication). For example:

1/7 * 2 = 2/7
2/7 * 2 = 4/7
4/7 * 2 = 1 1/7
1/7 * 2 = ... (repeats)

The binary value is 0.(001), where () indicates the repeating part.

For a little more detailed explanation, see heading "dec2bin_f()" in my article "http://www.exploringbinary.com/base-conversion-in-php-using-bcmath/".
 
Last edited by a moderator:
  • #6
zeebo17 said:
What is 1/7 in base 2? How would you solve for this?

Thanks!


wouldn't it be:
Code:
1/111

But in decimal form it would be:
Code:
0.100010111000001001

I'm not sure if it's the correct answer though. My logic was to take the result of 1/7:

Code:
0.142857

remove the decimal (by multiplying it by 1,000,000) then converting that number to binary and then re-placing the decimal.

Is my method correct?
 
  • #7
Steve.pf said:
wouldn't it be:
Code:
1/111
sure but not real interesting.

But in decimal form it would be:
Code:
0.100010111000001001

I'm not sure if it's the correct answer though. My logic was to take the result of 1/7:

Code:
0.142857

remove the decimal (by multiplying it by 1,000,000) then converting that number to binary and then re-placing the decimal.

Is my method correct?

No your method is not correct nor is your result. See the post by DoctorBinary for the correct algorithm. Following his process the integer part of each computation yields a digit of the binary number.
 
  • #8
Steve.pf said:
wouldn't it be:
Code:
1/111

Perhaps another way to look at it, what is 0.537 as a decimal fraction? 5/10 + 3/102 + 7/103, so what is 0.111 as a binary fraction? 1/2 + 1/22 + 1/23 = 0.87510
 
  • #9
But .111 is NOT the same as 1/111 in decimal or binary.
 

FAQ: Converting 1/7 to Base 2: A Scientific Approach

What is 1/7 in base 2?

1/7 in base 2 is 0.001001001... (repeating).

How do you convert 1/7 to base 2?

To convert 1/7 to base 2, you can use the division method. Divide 1 by 2, and then take the remainder as the first digit after the decimal point. Keep repeating this process until the decimal has either terminated or started repeating.

What is the decimal equivalent of 0.001001001... (base 2)?

The decimal equivalent of 0.001001001... (base 2) is approximately 0.142857 (repeating).

Why is 1/7 in base 2 a repeating decimal?

1/7 in base 2 is a repeating decimal because it has a prime factor, 7, that is not a factor of the base, 2. This results in a non-terminating and repeating decimal representation.

Can you represent 1/7 in base 2 without it being a repeating decimal?

No, it is not possible to represent 1/7 in base 2 without it being a repeating decimal. This is because 1/7 is a recurring decimal in base 10, and any non-terminating decimal in base 10 will also be a non-terminating and repeating decimal in base 2.

Similar threads

Replies
13
Views
1K
Replies
4
Views
2K
Replies
44
Views
4K
Replies
7
Views
400
Replies
1
Views
903
Replies
2
Views
2K
Replies
7
Views
2K
Back
Top