next up previous contents
Next: Basic Operations Up: Signed Binary to Decimal Previous: Signed binary fractions to

Signed decimal fractions to decimal

In order to convert the signed decimal stream into decimal, we take a finite portion of the stream and find its sign by searching for the first non-zero digit. If the number is negative, we print a minus sign and negate all digits in the signed decimal stream.

We then examine the last digit of the list. If it is negative, we add 10 to the digit and pass a negative carry back by subtracting one from the digit to the left. The process is then repeated.

Martin Escardo