Background of the Invention
1. Field of the Invention
The invention relates to digital multiplier circuits and more specifically to a digital memory which is programmed such that a plurality of these memories can be interconnected to form a multiplier.
Summary of the Invention
The multiplier which is the subject of this application utilizes a digital memory module which can be selectively interconnected to form a multiplier comprising one or more arrays. In multipliers utilizing a plurality of arrays, the first array comprising a single memory which receives as an input N bits of the first digital number and N bits of the second digital number and produces as an output a partial product comprising N bits of the final product and a carry signal to the second array comprising N bits. The second and subsequent arrays except for the last array, receive as input signals N selected bits of the first digital number and N bits of the second digital number and the carry signals from the preceding array and produces as an output N additional partial product bits and carry signals to the next array. The last array receives N bits from each of the two numbers to be multiplied together and produces as an output a signal comprising 2 N bits of the final product. In cases where the two numbers to be multiplied together only have N bits, it is obvious that only one array comprising a single memory module is required. In the preferred embodiment of this invention N = 2. A combination of all the output bits of these arrays comprises the product of the two multibit digital input signals.
Additionally, inputs are provided to permit a fixed digital value to be added to the N least significant bits of the product.
Brief Description of the Drawings
FIG. 1 is a functional diagram of the basic multiplier memory module; and
FIG. 2 is a diagram illustrating how a plurality of the multiplier memory modules illustrated in FIG. 1 are combined to form a multiplier for multiplying a first 4-bit digital number by a second 4-bit digital number.
Detailed Description
The preferred embodiment of the multiplier which is the subject of the disclosed invention utilizes a standard programmable memory module as a building block. The preferred module comprises a 256 word 4-bit per word digital memory with each memory location addressed by a 4-bit parallel digital signal. The memory receives as an address input the bits of first and second two-bit digital numbers and produce the product of these two numbers as an output. Provisions are also provided for accepting carry signals as inputs permitting a plurality of these memories to be interconnected to form a plurality of arrays such that when two N bit digital signals are selectively coupled to the memories comprising the arrays, the product of these two numbers is produced at the output of these arrays. In arrays comprising more than one memory module, selected bits of the numbers being multiplied together serve as 4 bits of the address for each memory and selected carry signals form the other bits of the address.
A typical memory module is illustrated at reference numeral 10 in FIG. 1. This is a read only memory with each memory location capable of storing a 4 bit word. The bits of the output signal are labeled Q.sub.1 through Q.sub.4. Since there are 256 words in this module, an 8-bit address input is required in order to read all of the memory locations. The address inputs have been labeled Y.sub.1, Y.sub.2, X.sub.1, X.sub.2, C.sub.1, C.sub.2, C.sub.3 and C.sub.4. The bits of the output signal are defined such that Q.sub.1 is equal to the product of the digital bits coupled to the X.sub.1 and Y.sub.1 address input terminals plus the bits coupled to the C.sub.1 and C.sub.4 address input terminals. Q.sub.2 is defined as the product of the X.sub.1 and Y.sub.2 bits plus the product of the X.sub.2 and Y.sub.1 bits plus the C.sub.2 and C.sub.3 bits plus the overflow from Q.sub.1. Q.sub.3 is the product of the X.sub.2 and Y.sub.2 bits plus the overflow from Q.sub.2 while Q.sub.4 is the overflow generated when a 2-bit digital signal comprising bits X.sub.1 and X.sub.2 is multiplied by a second 2-bit digital signal comprising bits Y.sub.2 and Y.sub.1.
A program for memory 10 relating is shown below.
A careful examination of the above-listed program will indicate that some of the outputs are redundant. This means that if a special memory module with special address decoding logic was manufactured the number of words stored in the digital memory could be reduced. However, such an approach would require a plurality of non-standard memory modules to be designed and manufactured while utilizing the program indicated herein permits a standard off-the-shelf 256 word 4-bit memory module to be used in the multiplier.
The program above is for a 4-bit memory which accepts as address inputs two bits of each of the numbers to be multiplied together. It is obvious that the same technique can be used to program a memory to accept N bits from each of the two numbers to be multiplied together as inputs.
FIG. 2 illustrates how a plurality of memory modules of the type illustrated in FIG. 1 can be interconnected to form a plurality of arrays. In this example, the arrays are interconnected to multiply a first 4-bit digital number by a second 4-bit digital number to produce an 8-bit product. The bits of the first digital number have been labeled X.sub.1 through X.sub.4 and the bits of the second number have been labeled Y.sub.1 through Y.sub.4.
For convenience in illustrating how the multiplier can be conveniently expanded, the multiplier illustrated in FIG. 2 has been divided into three arrays labeled 1, 2 and 3. The first array comprises a single memory module 12. The second array comprises two memory modules 14 and 16, and the third array comprises a single memory module 18. In this multiplier, the first array receives as address inputs this X.sub.1, X.sub.2 and Y.sub.2, Y.sub.1 with inputs C.sub.1 through C.sub.4 of memory module 12 being zero. Two outputs, Q.sub.1 and Q.sub.2, of memory module 12 comprises the least and second least significant bits of the final product and are designated A and B. The Q.sub.3 and Q.sub.4 outputs are carry inputs to the second array and are respectively connected to the B.sub.2 and B.sub.1 inputs of module 14 of array number 2. The second module 16 of array number 2 receives as an input signal, the Q.sub.1 and Q.sub.2 outputs of module 14 along with the X.sub.3, X.sub.4 and Y.sub.1, Y.sub.2 bits of the two digital numbers being multiplied together. This module produces the third and fourth bits of the product designated respectively C and D, and carry signals to array number 3.
The third array is comprised of one module 18. This module receives carry input signals from both of the modules comprising array number 2. Other inputs to this module are the third and fourth bits of the two binary signals to be multiplied by each other and produces the four most significant bits of the product. This same technique can be used to expand the multiplier to any number of bits. In any case the number of arrays will always be equal to (n - 1) where n is equal to the number of bits in the digital number to be multiplied together. The maximum number of memory modules in any array is also equal to N.
In applications where it is desired, the unused carry inputs can be used to add a constant to the N least significant bits of the product comprising 2N bits
It will be obvious to those skilled in the art that digital networks other than memories could be used to implement the above-described multiplier. For example, a circuit comprising a plurality of suitably interconnected digital gates could be used. However the memory circuits are believed to be the most practical approach.