Conditions on the Formats

Posted by Beetle B. on Fri 19 April 2019

This section deals with changing bases. The most obvious application is to go back and forth between decimal and binary (to make it easy on us humans).

All binary numbers of finite representation can be represented as decimal numbers, but sometimes the decimal representation requires many more characters.

So we have rounding errors when converting bases.

Another application is to convert a binary integer into a decimal string, and then convert back without losing precision. The following theorem is useful:

We are converting \((\beta,p)\) into \((\gamma,q)\) and back. If there are no positive integers \(i,j\) such that \(\beta^{i}=\gamma^{j}\), then a necessary and sufficient condition for an exact conversion back is \(\gamma^{q-1}>\beta^{p}\).

This is assuming no over/underflow.

This is not proven in the book.