Browse Prior Art Database

Multiplication Algorithm for Packed B:CD Numbers

IP.com Disclosure Number: IPCOM000050266D
Original Publication Date: 1982-Sep-01
Included in the Prior Art Database: 2005-Feb-10
Document File: 2 page(s) / 38K

Publishing Venue

IBM

Related People

Bohannan, JW: AUTHOR [+4]

Abstract

Conventional multiplication algorithms require repetitious adding and shifting operations resulting in substantial computer time to perform the multiplication. The algorithm outlined below greatly reduces this time. The algorithm is as follows: (1) Build a multiplicand table (8 entries) with the values of the multiplicand "times" 2, 3, 4..., 9 stored in sequential locations. These multiplications are performed by consecutively adding the multiplicand to itself 9 times. (2) Process all odd-positioned multipliers (starting with the rightmost) using each multiplier as a pointer to the multiplicand table. A running total is kept by adding new values with one byte displacement to the left.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 100% of the total text.

Page 1 of 2

Multiplication Algorithm for Packed B:CD Numbers

Conventional multiplication algorithms require repetitious adding and shifting operations resulting in substantial computer time to perform the multiplication. The algorithm outlined below greatly reduces this time. The algorithm is as follows:
(1) Build a multiplicand table (8 entries) with the values

of the multiplicand "times" 2, 3, 4..., 9 stored in

sequential locations. These multiplications are performed by

consecutively adding the multiplicand to itself 9 times.
(2) Process all odd-positioned multipliers (starting with the

rightmost) using each multiplier as a pointer to the

multiplicand table. A running total is kept by adding new

values with one byte displacement to the left. Note that

this is a very simple operation compared to adding each

value with one nibble displacement instead.
(3) Process all even-positioned multipliers as in step 2 above.
(4) Shift left the even subtotal by one nibble and add to the

odd subtotal.

An example using the above algorithm is as follows:

multiplicand 3 2 8 0

multiplier x 2 8 3 4
(1) TABLE (2) 1 3 2 0 (4)

x 2 0 6 5 6 0 0 2 6 2 4 0 + (8)

3 0 9 8 4 0 0 2 6 3 7 1 2 0 "odd" subtotal 4 1 3 1 2 0 5 1 6 4 0 0

6 1 9 6 8 0 (3) 9 8 4 0 (3)

7 2 2 9 6 0 6 5 6 0 +(2)

8 2 6 2 4 0 6 6 5 8 4 0 "even" subtotal

9 2 9 5 2 0

(4) 0 2 6 3 7 1 2 0 odd

6 6 5 8 4 0 + even shifted

9 2 9 5 5 2 0 (result)

1

Page 2 of 2

2

[This page contains 2 pictures or other non-text objects]