Many communication problems involve sending some form of information from one function to another by sending $$$0$$$s and $$$1$$$s (binary) or some number smaller than $$$B$$$ (base $$$B$$$). In these problems, we often need to change the information that we want to send from one base to another.
This can be particularly tricky when the information that we want to send is a sequence of number. A common way to do so is to send each number one by one using $$$\lceil \log_B (K) \rceil$$$ digits where $$$B$$$ is the base we can send information in and the elements of the sequence are between $$$0$$$ and $$$K - 1$$$. The problem with this is that if we are sending $$$N$$$ numbers, we are possibly wasting some digits as $$$N\lceil \log_B (K) \rceil \ge \lceil N\log_B (K) \rceil$$$.