# How to Convert a Binary Number to 6 Significant figures

• I
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!

## Answers and Replies

phinds
Gold Member
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.

Klystron, scottdave and Dada
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!

jedishrfu
Mentor
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.

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!

phinds
Gold Member
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.

jedishrfu
Merlin3189
Homework Helper
Gold Member
... 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

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!

jedishrfu
Mentor
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.

phinds
phinds
Gold Member
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.

Merlin3189
Homework Helper
Gold Member
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.

jedishrfu
Mentor
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:
phinds
Gold Member
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.

jedishrfu
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: