A ternary MAC
You will learn
How a dot product with ternary weights becomes adds, subtracts and skips.
A multiply-accumulate unit adds input times weight, clock after clock. With weights of -1, 0 and +1 each clock is an add, a subtract or nothing: the widget's nine clocks make 4 adds, 2 subtracts and 3 skips and land on -8, with no multiplier. The lesson spec, ternary_mac.t27, is the hardware version: a 27-trit dot product over packed vectors, 2 bits per trit.