Multiplier (BCT): Difference between revisions

From TernaryWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Ternary multiplication works similarly to decimal long multiplication. The multiplicand is multiplied by each digit of the multiplier. Which results in a list of partial products, and each next partial product is multiplied by 10; shifted to the left. The list of partial products is then added together for the total product.
[[Multiply (Ternary)|Multiplies]] inputs A and B. The result is twice the width or a word.


The difference with ternary is the multiplicand is EORed by each digit of the multiplier. This results in all the partial products being the A input buffered, zeroed, or negated depending on the value of B at that digit. Each partial product is shifted to the left.
The multiplier starts by [[EOR (Ternary Gate)|EORing]] the multiplicand (A input) with the trits of the multiplier (B input). This calculates the partial products quickly and in parallel. Next the 9 partial products need to be added together to get the final result.  


All the partial products are then added up for the final total.
This can be done with 8 series adders but just like the [[Adder (BCT)#Ripple Carry Adder|Ripple Carry Adder]] the operations add up and take a very long to propagate through and calculate the final product.


== Ternary Multiplication Example ==
However, these adds do not need to be done in order. The 9 partial products can be separated into three groups of three. The carry select adder design is expanded to do three input addition. The three groups of three are added together in parallel followed by those results also getting added and finishing the final result.
{| class="wikitable" style="text-align: center; font-family: monospace; font-size: 18px;"
 
|+<big>4435 * 472</big>
This setup not only takes far fewer logic, but it's also three times faster.
!
!3<sup>16</sup>
!3<sup>15</sup>
!3<sup>14</sup>
!3<sup>13</sup>
!3<sup>12</sup>
!3<sup>11</sup>
!3<sup>10</sup>
!3<sup>9</sup>
!3<sup>8</sup>
!3<sup>7</sup>
!3<sup>6</sup>
!3<sup>5</sup>
!3<sup>4</sup>
!3<sup>3</sup>
!3<sup>2</sup>
!3<sup>1</sup>
!3<sup>0</sup>
!
!B
!
! colspan="9" |A
|-
|
|
|
|
|
|
|
|
|
| +
| -
|0
|0
| +
| -
| +
| -
| +
!=
| +
| rowspan="9" |[[EOR (Ternary Gate)|EOR]]
| rowspan="9" | +
| rowspan="9" | -
| rowspan="9" |0
| rowspan="9" |0
| rowspan="9" | +
| rowspan="9" | -
| rowspan="9" | +
| rowspan="9" | -
| rowspan="9" | +
|-
|
|
|
|
|
|
|
|
| +
| -
|0
|0
| +
| -
| +
| -
| +
|
!=
| +
|-
|
|
|
|
|
|
|
| +
| -
|0
|0
| +
| -
| +
| -
| +
|
|
!=
| +
|-
|
|
|
|
|
|
| -
| +
|0
|0
| -
| +
| -
| +
| -
|
|
|
!=
| -
|-
|
|
|
|
|
|0
|0
|0
|0
|0
|0
|0
|0
|0
|
|
|
|
!=
|0
|-
|
|
|
|
| -
| +
|0
|0
| -
| +
| -
| +
| -
|
|
|
|
|
!=
| -
|-
|
|
|
| +
| -
|0
|0
| +
| -
| +
| -
| +
|
|
|
|
|
|
!=
| +
|-
|
|
|0
|0
|0
|0
|0
|0
|0
|0
|0
|
|
|
|
|
|
|
!=
|0
|-
|
|0
|0
|0
|0
|0
|0
|0
|0
|0
|
|
|
|
|
|
|
|
!=
|0
|-
! colspan="30" |<hr />
|-
|
|0
|0
|0
| +
| +
|0
| -
| +
| +
|0
|0
| +
| +
| +
| +
|0
| +
!'''='''
| colspan="11" |<big>2,093,320</big>
|}

Latest revision as of 18:10, 6 August 2025

Multiplies inputs A and B. The result is twice the width or a word.

The multiplier starts by EORing the multiplicand (A input) with the trits of the multiplier (B input). This calculates the partial products quickly and in parallel. Next the 9 partial products need to be added together to get the final result.

This can be done with 8 series adders but just like the Ripple Carry Adder the operations add up and take a very long to propagate through and calculate the final product.

However, these adds do not need to be done in order. The 9 partial products can be separated into three groups of three. The carry select adder design is expanded to do three input addition. The three groups of three are added together in parallel followed by those results also getting added and finishing the final result.

This setup not only takes far fewer logic, but it's also three times faster.