Английская Википедия:Dadda multiplier
Шаблон:Short description The Dadda multiplier is a hardware binary multiplier design invented by computer scientist Luigi Dadda in 1965.[1] It uses a selection of full and half adders to sum the partial products in stages (the Dadda tree or Dadda reduction) until two numbers are left. The design is similar to the Wallace multiplier, but the different reduction tree reduces the required number of gates (for all but the smallest operand sizes) and makes it slightly faster (for all operand sizes).[2]
Dadda and Wallace multipliers have the same three steps for two bit strings <math>w_1</math> and <math>w_2</math> of lengths <math>\ell_1</math> and <math>\ell_2</math> respectively:
- Multiply (logical AND) each bit of <math>w_1</math>, by each bit of <math>w_2</math>, yielding <math>\ell_1\cdot\ell_2</math> results, grouped by weight in columns
- Reduce the number of partial products by stages of full and half adders until we are left with at most two bits of each weight.
- Add the final result with a conventional adder.
As with the Wallace multiplier, the multiplication products of the first step carry different weights reflecting the magnitude of the original bit values in the multiplication. For example, the product of bits <math>a_n b_m</math> has weight <math>n+m</math>.
Unlike Wallace multipliers that reduce as much as possible on each layer, Dadda multipliers attempt to minimize the number of gates used, as well as input/output delay. Because of this, Dadda multipliers have a less expensive reduction phase, but the final numbers may be a few bits longer, thus requiring slightly bigger adders.
Description
To achieve a more optimal final product, the structure of the reduction process is governed by slightly more complex rules than in Wallace multipliers.
The progression of the reduction is controlled by a maximum-height sequence <math>d_j</math>, defined by:
- <math>d_1 = 2</math>, and <math>d_{j+1} = \operatorname{floor}(1.5 d_j).</math>
This yields a sequence like so:
- <math>d_1=2, d_2=3, d_3=4, d_4=6, d_5=9, d_6=13, \ldots </math>
The initial value of <math>j</math> is chosen as the largest value such that <math>d_j < \min{(n_1, n_2)}</math>, where <math>n_1</math> and <math>n_2</math> are the number of bits in the input multiplicand and multiplier. The lesser of the two bit lengths will be the maximum height of each column of weights after the first stage of multiplication. For each stage <math>j</math> of the reduction, the goal of the algorithm is the reduce the height of each column so that it is less than or equal to the value of <math>d_j</math>.
For each stage from <math>,\ldots,1</math>, reduce each column starting at the lowest-weight column, <math>c_0</math> according to these rules:
- If <math>\operatorname{height}(c_i) \leqslant d_j</math> the column does not require reduction, move to column <math>c_{i+1}</math>
- If <math>\operatorname{height}(c_i) = d_j + 1</math> add the top two elements in a half-adder, placing the result at the bottom of the column and the carry at the bottom of column <math>c_{i+1}</math>, then move to column <math>c_{i+1}</math>
- Else, add the top three elements in a full-adder, placing the result at the bottom of the column and the carry at the bottom of column <math>c_{i+1}</math>, restart <math>c_i</math>at step 1
Algorithm example
The example in the adjacent image illustrates the reduction of an 8 × 8 multiplier, explained here.
The initial state <math>j = 4</math> is chosen as <math>d_4 = 6</math>, the largest value less than 8.
Stage <math>j=4</math>, <math>d_4 = 6</math>
- <math>\operatorname{height}(c_0\cdots c_5)</math> are all less than or equal to six bits in height, so no changes are made
- <math>\operatorname{height}(c_6) = d_4 + 1 = 7</math>, so a half-adder is applied, reducing it to six bits and adding its carry bit to <math>c_7</math>
- <math>\operatorname{height}(c_7) = 9</math> including the carry bit from <math>c_6</math>, so we apply a full-adder and a half-adder to reduce it to six bits
- <math>\operatorname{height}(c_8) = 9</math> including two carry bits from <math>c_7</math>, so we again apply a full-adder and a half-adder to reduce it to six bits
- <math>\operatorname{height}(c_9) = 8</math> including two carry bits from <math>c_8</math>, so we apply a single full-adder and reduce it to six bits
- <math>\operatorname{height}(c_{10}\cdots c_{14})</math> are all less than or equal to six bits in height including carry bits, so no changes are made
Stage <math>j=3</math>, <math>d_3 = 4</math>
- <math>\operatorname{height}(c_0\cdots c_3)</math> are all less than or equal to four bits in height, so no changes are made
- <math>\operatorname{height}(c_4) = d_3 + 1 = 5</math>, so a half-adder is applied, reducing it to four bits and adding its carry bit to <math>c_5</math>
- <math>\operatorname{height}(c_5) = 7</math> including the carry bit from <math>c_4</math>, so we apply a full-adder and a half-adder to reduce it to four bits
- <math>\operatorname{height}(c_6\cdots c_{10}) = 8</math> including previous carry bits, so we apply two full-adders to reduce them to four bits
- <math>\operatorname{height}(c_{11}) = 6</math> including previous carry bits, so we apply a full-adder to reduce it to four bits
- <math>\operatorname{height}(c_{12}\cdots c_{14})</math> are all less than or equal to four bits in height including carry bits, so no changes are made
Stage <math>j=2</math>, <math>d_2 = 3</math>
- <math>\operatorname{height}(c_0\cdots c_2)</math> are all less than or equal to three bits in height, so no changes are made
- <math>\operatorname{height}(c_3) = d_2 + 1 = 4</math>, so a half-adder is applied, reducing it to three bits and adding its carry bit to <math>c_4</math>
- <math>\operatorname{height}(c_4\cdots c_{12}) = 5</math> including previous carry bits, so we apply one full-adder to reduce them to three bits
- <math>\operatorname{height}(c_{13}\cdots c_{14})</math> are all less than or equal to three bits in height including carry bits, so no changes are made
Stage <math>j=1</math>, <math>d_1 = 2</math>
- <math>\operatorname{height}(c_0\cdots c_1)</math> are all less than or equal to two bits in height, so no changes are made
- <math>\operatorname{height}(c_2) = d_1 + 1 = 3</math>, so a half-adder is applied, reducing it to two bits and adding its carry bit to <math>c_3</math>
- <math>\operatorname{height}(c_3\cdots c_{13}) = 4</math> including previous carry bits, so we apply one full-adder to reduce them to two bits
- <math>\operatorname{height}(c_{14}) = 2</math> including the carry bit from <math>c_{13}</math>, so no changes are made
Addition
The output of the last stage leaves 15 columns of height two or less which can be passed into a standard adder.
See also
- Booth's multiplication algorithm
- Fused multiply–add
- Wallace tree
- BKM algorithm for complex logarithms and exponentials
- Kochanski multiplication for modular multiplication
References
Further reading
- Английская Википедия
- Страницы с неработающими файловыми ссылками
- Arithmetic logic circuits
- Computer arithmetic
- Multiplication
- 1965 introductions
- 1965 in computing
- Страницы, где используется шаблон "Навигационная таблица/Телепорт"
- Страницы с телепортом
- Википедия
- Статья из Википедии
- Статья из Английской Википедии
- Страницы с ошибками в примечаниях