# US 5,107,451 A · Method and apparatus for pipelined detection of overflow in residue arithmetic multiplication

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 5,107,451 A
- Document ID: US5107451A
- Status: Granted
- Kind: A
- Application number: 07/472,237
- Filed: 1990-01-30
- Granted: 1992-04-21
- Earliest claimed: 1990-01-30
- Assignees: The Boeing Company
- Inventors: Theodore L. Houk
- Web page: https://patentgrep.com/patent/US5107451A

## CPC

- G06E 1/065: {using residue arithmetic}
- G06F 7/729: {using representation by a residue number system}
- G06E: OPTICAL COMPUTING DEVICES (digital storage using optical elements G11C13/04)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A residue number system multiplication overflow detection processor generates either a VALID signal or an INVALID signal indicating whether multiplication overflow has occurred. Operands X and Y are received in residue representation and are multiplied in a multiplier. The X and Y operands are also converted to mixed base representation. The mixed base representations of the operands are compared in order to generate magnitude measures indicative of the magnitude of each of the operands. These magnitude measures and a mixed base representation of the product are used to generate the VALID and INVALID signals. The invention is particularly well-suited to be implemented using optical technologies.

## Claims

### Claim 1

An overflow detection processor which detects whether or not multiplicative overflow has occurred during multiplication of a first operand and a second operand, said first and second operands being in redundant representation of a residue number system, said overflow detection processor comprising:
a first mixed base converter connected for receiving said first operand and converting said first operand into a first set of mixed base digits;
a second mixed base converter connected for receiving said second operand, in parallel to said first mixed base converter, and converting said second operand into a second set of mixed base digits;
a multiplier connected for receiving said first and second operands and multiplying said first and second operands to produce a product;
a most significant digits detector connected to receive said first and second sets of mixed base digits and calculating a first magnitude measure of said first set of mixed base digits and a second magnitude measure of said second set of mixed base digits, said detector generating first signals indicative of a relationship between said first magnitude measure and said second magnitude measure;
a third mixed base converter connected for receiving said product from said multiplier and operable independently of results of said most significant digits detector, said third mixed base converter converting said product into a third set of mixed base digits; and
a logic circuit connected for receiving said first signals and for receiving second signals based on said third set of mixed base digits, said logic circuit generating a validity signal indicative of whether or not multiplicative overflow has occurred.

### Claim 2 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said first and second mixed base converters and said most significant digits detector form a first data channel, and said multiplier and third mixed base converter form a second data channel, connected in parallel to said first data channel, and wherein said processor further includes delay means positioned in one of said first and second data channels for delaying signals therein such that said logic circuit simultaneously receives said first and second signals.

### Claim 3 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said first and second operands are associated with an ordered set of moduli and a highest order modulus associated with said first and second operands is greater in magnitude than all other moduli associated with said first and second operands and wherein values of a single mixed base digit associated with said highest order modulus are utilized for sign detection and multiplicative overflow detection.

### Claim 4 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said first mixed base converter, said second mixed base converter, said multiplier, said most significant digits detector, said third mixed base converter, and said logic circuit comprise optical circuits.

### Claim 5 (depends on 4)

An overflow detection processor as set forth in claim 4, wherein said optical circuits comprise optical cross bar circuits.

### Claim 6 (depends on 4)

An overflow detection processor as set forth in claim 4, wherein said optical circuits comprise pattern recognition circuits.

### Claim 7 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said first mixed base converter, said second mixed base converter, said multiplier, said most significant digits detector, said third mixed base converter, and said logic circuit comprise electronic circuits.

### Claim 8 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said most significant digits detector includes a plurality of comparators arranged in parallel to one another and a plurality of modulo-2 adder circuits arranged in parallel to one another and connected to receive outputs of said plurality of comparators.

### Claim 9 (depends on 8)

An overflow detection processor as set forth in claim 8, wherein each of said plurality of comparators determines whether said first and second sets of mixed base digits received are equal in value.

### Claim 10 (depends on 8)

An overflow detection processor as set forth in claim 8, wherein said most significant digits detector further includes an optical arithmetic and logic unit configured to form a multiple-branch arithmetic conditional device which generates different first signals as a function of said relationship.

### Claim 11 (depends on 1)

An overflow detection processor as set forth in claim 1, wherein said first operand and said second operand are both positive and are associated with an ordered set of moduli in a residue number system representation and wherein the order of moduli associated with said second operand is partially reversed from the order of moduli associated with said first operand.

### Claim 12 (depends on 6)

An overflow detection processor as set forth in claim 6, wherein said most significant digits detector includes an optical arithmetic and logic unit configured to form an arithmetic conditional device having three output branches.

### Claim 13

An overflow detection processor which detects whether or not multiplicative overflow has occurred during multiplication of a first operand and a second operand, said first and second operands being in a non-redundant residue number system representation, said overflow detection processor comprising:
a first mixed base converter connected for receiving said first operand and for converting said first operand into a first set of mixed base digits and generating a first redundant residue digit corresponding to said first operand;
a second mixed base converter connected for receiving said second operand and converting said second operand into a second set of mixed base digits and generating a second redundant residue digit corresponding to said second operand;
a multiplier connected to receive said first and second operands and said first and second redundant residue digits and multiplying said first operand and said first redundant residue digit by said second operand and said second redundant residue digit to produce a product;
a most significant digits detector connected for receiving said first and second sets of mixed base digits and calculating a first magnitude measure of said first set of mixed base digits and a second magnitude measure of said second set of mixed base digits and generating first signals indicative of a relationship between said first magnitude measure and said second magnitude measure;
a third mixed base converter connected to said multiplier for receiving said product and converting said product into a third set of mixed base digits, said third mixed base converter operating independently of results of said most significant digits detector; and
a logic circuit connected for receiving said first signals and second signals based on said third set of mixed base digits and generating a validity signal indicative of whether or not multiplicative overflow has occurred.

### Claim 14 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein both said first operand and said second operand are associated with an ordered set of moduli, a highest order modulus being equal to two and wherein said first and second operands represent negative numbers, and wherein said logic circuit further is operable to perform an auxiliary multiplicative overflow detection test when said product is equal to a non-redundant ring circumference divided by said highest order modulus.

### Claim 15 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein said first mixed base converter and said most significant digits detector form a first data channel and said second mixed base converter, said multiplier and said third mixed base converter form a second data channel, connected in parallel to said first data channel, and wherein said processor further includes delay means positioned in one of said first and second data channels for delaying signals therein such that said logic circuit simultaneously receives said first and second signals.

### Claim 16 (depends on 15)

An overflow detection processor as set forth in claim 15, wherein both said first operand and said second operand are associated with an ordered set of moduli, the highest order modulus being equal to two and wherein said first and second operands represent negative numbers, and wherein said logic circuit further is operable to perform an auxiliary multiplicative overflow detection test when said product is equal to a non-redundant ring circumference divided by said highest order modulus.

### Claim 17 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein said first mixed base converter, said second mixed base converter, said multiplier, said most significant digits detector, said third mixed base converter, and said logic circuit comprise optical circuits.

### Claim 18 (depends on 17)

An overflow detection processor as set forth in claim 17, wherein said optical circuits comprise optical cross bar circuits.

### Claim 19 (depends on 17)

An overflow detection processor as set forth in claim 17, wherein said optical circuits comprise pattern recognition circuits.

### Claim 20 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein said first mixed base converter, said second mixed base converter, said multiplier, said most significant digits detector, said third mixed base converter, and said logic circuit comprise electronic circuits.

### Claim 21 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein said most significant digits detector includes a plurality of comparators arranged in parallel to one another and a plurality of modulo-2 adder circuits arranged in parallel to one another and connected to receive outputs of said plurality of comparators.

### Claim 22 (depends on 21)

An overflow detection processor as set forth in claim 21, wherein each of said plurality of comparators determines whether said first and second sets of mixed base digits received are equal in value.

### Claim 23 (depends on 21)

An overflow detection processor as set forth in claim 21, wherein said most significant digits detector further includes an optical arithmetic and logic unit configured to form a multiple-branch arithmetic conditional device which generates different first signals as a function of said relationship.

### Claim 24 (depends on 21)

An overflow detection processor as set forth in claim 21, wherein said most significant digits detector includes an optical arithmetic and logic unit configured to form an arithmetic conditional device having three output branches.

### Claim 25 (depends on 13)

An overflow detection processor as set forth in claim 13, wherein said first operand and said second operand are both positive and are associated with an ordered set of moduli in a residue number system representation and wherein the order of moduli associated with said second operand is reversed from the order of moduli associated with said first operand.

### Claim 26

A method of generating a validity optical signal, comprising the steps of:
(a) receiving first optical signals form a first plurality of optical transmission paths, said optical first signals representing a first operand in residue representation;
(b) receiving second optical signals from a second plurality of optical transmission paths, said second optical signals representing a second operand in residue representation;
(c) converting said first optical signals representing said first operand in residue representation into third optical signals representative of said first operand in mixed base representation;
(d) converting said second optical signals representing said second operand in residue representation into fourth optical signals representative of said second operand in mixed base representation;
(e) multiplying said first optical signals and said second optical signals to produce product optical signals;
(f) generating a most significant digits optical signal indicative of whether or not a first magnitude measure associated with said third optical signals is greater than a second magnitude measure associated with said fourth optical signals;
(g) generating fifth optical signals independently of results of step (f), said fifth optical signals corresponding to a mixed base representation of said product optical signals;
(h) time delaying at least one of said most significant digits optical signal and said fifth optical signals such that said most significant digits optical signal and said fifth optical signals arrive at an optical logic circuit at the same time; and
(i) subsequent to steps (a) through (h), transmitting, from said optical logic circuit, a validity optical signal indicating whether or not multiplicative overflow has occurred based on said most significant digits optical signal and said fifth optical signals.

### Claim 27 (depends on 26)

A method as set forth in claim 26, wherein step (f) includes the step of:
comparing subsets of said third and fourth signals in comparators, said comparing being performed simultaneously for all subsets.

### Claim 28

A method of generating a validity optical signal, comprising the steps of:
(a) receiving first optical signals from a first plurality of optical transmission paths, said first optical signals representing a first operand in residue representation;
(b) receiving second optical signals from a second plurality of optical transmission paths, said second optical signals representing a second operand in residue representation;
(c) converting said first optical signals representing said first operand in residue representation into third optical signals representative of said first operand in mixed base representation and generating first redundant residue digit optical signals corresponding to a redundant residue digit associated with said first operand;
(d) converting said second optical signals representing said second operand in residue representation into fourth optical signals representative of said second operand in mixed base representation and generating second redundant residue digit optical signals corresponding to a redundant residue digit associated with said second operand;
(e) multiplying said first optical signals and said first redundant residue digit optical signals and said second optical signals and said second redundant residue digit optical signals to produce product optical signals;
(f) generating a most significant digits optical signal indicative of whether or not a first magnitude measure associated with said third optical signals is greater than a second magnitude measure associated with said fourth optical signals;
(g) generating fifth optical signals independently of results of step (f), said fifth optical signals corresponding to a mixed base representation of said product optical signals;
time delaying at least one of said most significant digits optical signal and said fifth optical signals such that said most significant digits optical signal and said fifth optical signals arrive at an optical logic circuit at the same time; and
(i) subsequent to steps (a) through (h), transmitting, from said optical logic circuit, a validity optical signal indicating whether or not multiplicative overflow has occurred based on said most significant digits optical signal and said fifth optical signals.

### Claim 29 (depends on 28)

A method as set forth in claim 28, wherein step (f) includes the step of:
comparing subsets of said third and fourth signals in comparators, said comparing being performed simultaneously for all subsets.

### Claim 30

A most significant digit detector comprising:
a plurality of comparators arranged parallel to one another, said plurality of comparators receiving a plurality of first signals indicative of a set of digits and comparing each signal of said plurality of first signals with at least one other signal of said plurality of first signals; and
a plurality of modulo-2 adder circuits arranged parallel to one another and connected to receive outputs from said plurality of comparators, said plurality of modulo-2 adder circuits transmitting an output signal indicating a most significant digit.

### Claim 31 (depends on 30)

A most significant digits detector as set forth in claim 30, wherein said plurality of comparators and said plurality of modulo-2 adder circuits include optical circuits.

### Claim 32 (depends on 30)

A most significant digits detector as set forth in claim 30, wherein said plurality of comparators essentially simultaneously compare subsets of said set of digits.

### Claim 33 (depends on 30)

A most significant digits detector as set forth in claim 30, wherein said plurality of comparators receives first signals corresponding to zero digit values and first signals corresponding to digit values of m.sub.i -1, where i is an integer and m.sub.i is a number system modulus.

### Claim 34 (depends on 30)

A most significant digits detector as set forth in claim 30, wherein:
each of said plurality of comparators generates either an equal signal or a non-equal signal;
each of said plurality of modulo-2 adder circuits has two zero inputs and two one inputs; and
at least one of said equal signals is connected to one inputs of adjacent modulo-2 adder circuits and at least one of said non-equal signals is connected to zero inputs of adjacent modulo-2 adder circuits.

### Claim 35 (depends on 30)

A most significant digits detector as set forth in claim 30, wherein said plurality of comparators and said plurality of modulo-2 adder circuits include electrical circuits.
