How to Convert a Binary Number to 6 Significant figures

In summary: I was looking for.In summary, rounding a binary number to 6 significant figures and 12 significant figures is different, and the rounding rule for base 2 is to truncate and add one to the last bit.
  • #1
Dada
10
1
1203.201 which is 0100|1011|0011.0011|0011

How to round the binary representation to 6 significant figures and 12 significant figures? And what is the rounding rule for base 2?

If it was rounded to 6 significant figure, such as 0100|10 {2}, then it changes its initial value, doesn't it?

So, what am I supposed to?

Thank You!
 
Physics news on Phys.org
  • #2
Well, if you mean round the binary to 6 significant figures (which are bits in binary), I think you get

010011000000

but I assume that's not what you mean. SO ... if you mean to do the rounding in decimal then DO it in decimal (1203.20) and re-convert to binary. Rounding in decimal and rounding in binary just aren't going to be the same because binary has about 3 times the granularity of decimal.
 
  • Like
Likes Klystron, scottdave and Dada
  • #3
Thank you, phinds! You solved my doubt! I actually meant the first situation you explained since I was confused whether I should add 0's at the end of the 6th digit. And it is great that you provided me a second situation!
 
  • #4
The real rounding should be in the base chosen. For base 2, then you'd decide based on the digit to the right.

.000010 --> rounds to .00001 (ie we just truncate and drop the 0 bit)

and

.000011 --> rounds to .00001+.00001 --> .00010 (ie we truncate and add one to the last bit)

Converting back to decimal means you are rounding in a decimal sense.
 
  • Like
Likes Dada
  • #5
jedishrfu said:
The real rounding should be in the base chosen. For base 2, then you'd decide based on the digit to the right.

.000010 --> rounds to .00001 (ie we just truncate and drop the 0 bit)

and

.000011 --> rounds to .00001+.00001 --> .00010 (ie we truncate and add one to the last bit)

Converting back to decimal means you are rounding in a decimal sense.

Thank you for clearing my question about rounding rule and explaining so clear, jedishrfu!
 
  • #6
jedishrfu said:
Converting back to decimal means you are rounding in a decimal sense.
I disagree that rounding something in binary and then converting it to decimal is "rounding in the decimal sense" because as I pointed out (and I'm sure you realize) binary and decimal do not have the same granularity.
 
  • Like
Likes jedishrfu
  • #7
Dada said:
... I was confused whether I should add 0's at the end of the 6th digit.
I hope when you round numbers in any base you add the necessary zeros.
If you round 299 792 458 m/sec to 6 sig fig, I hope it doesn't become 299 792 m/sec
 
  • Haha
Likes Dada and phinds
  • #8
Merlin3189 said:
I hope when you round numbers in any base you add the necessary zeros.
If you round 299 792 458 m/sec to 6 sig fig, I hope it doesn't become 299 792 m/sec
Thank you for your reminder, Merlin3189!
 
  • #9
phinds said:
I disagree that rounding something in binary and then converting it to decimal is "rounding in the decimal sense" because as I pointed out (and I'm sure you realize) binary and decimal do not have the same granularity.
I was responding with a clarification to your earlier excellent post. So that the OP wouldn’t think that binary rounding meant converting a binary representation back to decimal to do the rounding and then back to binary.
 
  • Like
Likes phinds
  • #10
jedishrfu said:
I was responding with a clarification to your earlier excellent post. So that the OP wouldn’t think that binary rounding meant converting a binary representation back to decimal to do the rounding and then back to binary.
Ah. I misunderstood. Thanks for that clarification.
 
  • #11
I'm not sure what people found so funny about my comment? It was meant to be serious.
Not so much a reminder, as an illustration of why it has to be so.

The thing that puzzled me for a while about the OP was, why rounding to 6 figs should be any different from rounding to 12 figs.
 
  • #12
I think it was a great comment. It clarified that the digits don't go away ie the number as a whole doesn't get reduced by a factor of a million.

123,456,123,456 = would round to 123,456,000,000 and not 123,456

I think in scientific notation you wouldn't have noticed this:

123,456,123,456 = 1.23456123456 E12 = 1.23456 E12 rounded
 
Last edited:
  • #13
Merlin3189 said:
I'm not sure what people found so funny about my comment? It was meant to be serious.
Not so much a reminder, as an illustration of why it has to be so.

The thing that puzzled me for a while about the OP was, why rounding to 6 figs should be any different from rounding to 12 figs.
Personally, I didn't doubt for a minute that you were serious but I just found it humorous that someone would need to be reminded of that.
 
  • Like
Likes jedishrfu
  • #14
Merlin3189 said:
I'm not sure what people found so funny about my comment? It was meant to be serious.
Not so much a reminder, as an illustration of why it has to be so.

The thing that puzzled me for a while about the OP was, why rounding to 6 figs should be any different from rounding to 12 figs.
Thank you for your clarification, Merlin3189! I am sorry that I used the unappropriated wording!

This question comes from my textbook, so when I copied it, I mistakenly included the 12 figs question.
 
Last edited:

1. How do I convert a binary number to 6 significant figures?

To convert a binary number to 6 significant figures, you can follow these steps:

  • 1. Start by writing the binary number as a decimal number.
  • 2. Count the number of digits in the decimal number.
  • 3. Subtract the number of digits from 6 to determine how many leading zeros are needed.
  • 4. Add the necessary number of leading zeros to the decimal number.
  • 5. Round the resulting number to 6 significant figures.

2. Can I use a calculator to convert a binary number to 6 significant figures?

Yes, you can use a calculator to convert a binary number to 6 significant figures. Most scientific calculators have a function for converting between different number systems, including binary and decimal. However, it is important to double-check the result to ensure it has been rounded correctly to 6 significant figures.

3. What is the significance of 6 significant figures in binary conversion?

6 significant figures are commonly used in scientific and engineering calculations as it allows for a good balance between precision and practicality. It is also a standard for representing numbers in most scientific fields.

4. Can I convert a binary number to more or less than 6 significant figures?

Yes, you can convert a binary number to any number of significant figures. The process is the same, but the number of leading zeros and the final rounding may vary depending on the desired number of significant figures.

5. Are there any shortcuts or tricks for converting a binary number to 6 significant figures?

There are no specific shortcuts or tricks for converting a binary number to 6 significant figures. However, with practice and familiarity, you may be able to mentally estimate the necessary number of leading zeros and the final rounding more quickly.

Similar threads

  • Introductory Physics Homework Help
Replies
11
Views
812
  • Introductory Physics Homework Help
Replies
1
Views
619
  • Set Theory, Logic, Probability, Statistics
Replies
22
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
672
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
181
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Introductory Physics Homework Help
Replies
4
Views
562
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Introductory Physics Homework Help
Replies
2
Views
811
Back
Top