Multiplier (BCT)

From TernaryWiki
Revision as of 18:08, 4 August 2025 by MrDyne (talk | contribs)
Jump to navigationJump to search

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.

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.

All the partial products are then added up for the final total.

Ternary Multiplication Example

4435 * 472
316 315 314 313 312 311 310 39 38 37 36 35 34 33 32 31 30 B A
+ - 0 0 + - + - + = + EOR + - 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 0 = 0

0 0 0 + + 0 - + + 0 0 + + + + 0 + = 2,093,320