Suppose we wish to compute the signed binary representation *U* of the
decimal fraction using
signed binary operations, we simply evaluate

To compute this more efficiently, we observe

We can now use a simple recursive algorithm using the average and division by an integer operations which evaluates to zero on an empty input, but otherwise computes:

Because we cannot represent decimal digits in signed binary streams,
we replace *a* in the right hand side of the expression by a stream
which represents *a*/2^{4}, and multiply the entire result by
2^{4}. Multiplication and division by powers of two can be performed
easily using shift operations.