Skip to Main Content
This paper presents a technique for direct truth table implementation of residue-based functions by an encoding scheme that employs programmable array logic (PAL) technology. The scheme models the basic associative memory operation, i.e., the detection of matchings between input patterns and prestored information in the PAL's. The complexity of this model is related to the amount of stored logic, i.e., the P-terms in the logic arrays. A linear programming approach is proposed for the encoding of the residue set with the objective of minimizing the complexity of addition and multiplication, modulo M, simultaneously. It is shown that the addition is more complex than the multiplication modulo M, with both (two-operand) operations being upper bounded by O(M2). Results produced using the optimal encoding compare favorably to corresponding results regarding the usual binary representation of residues. Practical constraints are also considered such as limitations on the number of pins, the number of P-terms, and the chip area, with the latter shown to be more efficiently utilized in the PAL scheme than in a ROM-or PLA-based implementation. The encoding technique is also applicable to the functions of discrete logic, in general.