High Speed Binary to Decimal Conversion Algorithm
Original Publication Date: 1987-Oct-01
Included in the Prior Art Database: 2005-Feb-02
A high speed algorithm converts integer values in binary format to equivalent numeric values in a decimal representation. The algorithm uses an array of pre-computed and tabled decimal values which are summed as the algorithm proceeds. The result is a savings in time since the conversion is accomplished without any divide operations. The algorithm begins with the binary value to be converted. It repeatedly isolates bit segments (four bits in length) and uses the numeric value of each segment isolated as an index into a tabled array of decimal values stored in Binary Coded Decimal (BCD) format. The decimal values from the table are added to an accumulator using a BCD addition operation. When the algorithm terminates, the accumulator contains the decimal equivalent of the binary number.