analytic expressions for the sizes of logically minimized truth tables for binary addition and...

6
Analytic expressions for the sizes of logically minimized truth tables for binary addition and subtraction Mir Mirsalehi and Thomas K. Gaylord Direct implementations of digital functions by truth table look-up techniques are of increasing importance in both optical and electronic processing. A major issue in these techniques is the logical minimization of the Boolean algebraic expressions for the functions being implemented. For most cases of practical interest, these minimizations require extensive computer time. In this paper, analytic expressions are derived that provide complete information about the absolute minimum sum-of-products representations for binary addition, with and without an input carry, and binary subtraction, with and without an input borrow. These expressions are applicable to any word length. Key words: Optical computing, truth table look-up, content addressable memory, logical minimization. I. Introduction A digital operation may be performed by decompos- ing that operation into a number of steps and then mapping them into the hardware. For example, the addition of two numbers can be achieved by bit-by-bit addition of the corresponding bits using a full-adder. Another method, known as the table look-up tech- nique, is to read the answer directly from a prestored table. The advantage of this method is that the result can be obtained in only one machine cycle, since the entire operation is performed in a single step. Table look-up techniques are of increasing importance in optics 1 - 7 and electronics. 8 - 1 ' One type of table look-up technique is based on the storage of a binary truth table. Such a truth table can be conveniently constructed with a content address- able memory (CAM). In a CAM, the input represents the data, and the output is all of the addresses where those data occur. These addresses are provided si- multaneously in parallel. The CAMs are of great in- terest because of their storage efficiency and their capability of parallel processing. Content addressable memories can be directly implemented by optical 35 systems. In these architectures, the channels are pro- vided by freespace and a 1 or a 0 is coded as the presence or absence of light. This is achieved by pass- ing a collimated beam of laser light through a spatial Mir Mirsalehi is with University of Alabama in Huntsville, De- partment of Electrical & Computer Engineering, Huntsville, Ala- bama 35899, and Thomas Gaylord is with Georgia Institute of Tech- nology, School of Electrical Engineering, Atlanta, Georgia 30332. Received 6 September 1989. 0003-6935/90/233339-06$02.00/0. © 1990 Optical Society of America. light modulator in which the pixels that correspond to the ones are made transparent while those that corre- spond to the zeros are made opaque. Each output bit has a separate CAM which contains all input patterns that produce a 1 for that output bit. When the input data is entered, its pattern is compared with the pres- tored reference patterns corresponding to each output bit. If it matches one of the reference patterns, a 1 is assigned to that output bit; otherwise, a 0 is assigned. A major difficulty with truth table look-up tech- niques is that as the size of the problem becomes large, the complexity of the required hardware dramatically increases, and the method becomes impractical. To reduce the amount of hardware, a logical minimization technique, such as the Quine-McCluskey method, 12 can be used to express each output bit as a minimum sum-of-products (SOP) expression. Each term in the SOP expression is a prime implicant or a reduced reference pattern of the output function. For most cases of practical interest, the minimization procedure is too complex to be performed by hand, and thus a computer program is required. For larger problems, even computer minimization becomes impractical. Therefore, it would obviously be valuable if the com- plexity of these minimum sum-of-products could be predicted analytically. In this paper, the sizes of the absolute logically mini- mized truth tables for binary addition and subtraction are treated in detail. In Sec. II, exact analytic expres- sions for the complexity of the logically minimized binary addition are derived. Similar expressions are derived in Sec. III for logically minimized binary sub- traction. In Sec. IV, a systematic procedure for creat- ing a complete list of the reduced reference patterns for these operations is described. Finally, a summary of the results is presented in Sec. V. 10 August 1990 / Vol. 29, No. 23 / APPLIED OPTICS 3339

Upload: thomas-k

Post on 03-Oct-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Analytic expressions for the sizes of logically minimizedtruth tables for binary addition and subtraction

Mir Mirsalehi and Thomas K. Gaylord

Direct implementations of digital functions by truth table look-up techniques are of increasing importance in

both optical and electronic processing. A major issue in these techniques is the logical minimization of the

Boolean algebraic expressions for the functions being implemented. For most cases of practical interest,

these minimizations require extensive computer time. In this paper, analytic expressions are derived that

provide complete information about the absolute minimum sum-of-products representations for binary

addition, with and without an input carry, and binary subtraction, with and without an input borrow. These

expressions are applicable to any word length. Key words: Optical computing, truth table look-up, content

addressable memory, logical minimization.

I. IntroductionA digital operation may be performed by decompos-

ing that operation into a number of steps and thenmapping them into the hardware. For example, theaddition of two numbers can be achieved by bit-by-bitaddition of the corresponding bits using a full-adder.Another method, known as the table look-up tech-nique, is to read the answer directly from a prestoredtable. The advantage of this method is that the resultcan be obtained in only one machine cycle, since theentire operation is performed in a single step. Tablelook-up techniques are of increasing importance inoptics1-7 and electronics.8-1'

One type of table look-up technique is based on thestorage of a binary truth table. Such a truth table canbe conveniently constructed with a content address-able memory (CAM). In a CAM, the input representsthe data, and the output is all of the addresses wherethose data occur. These addresses are provided si-multaneously in parallel. The CAMs are of great in-terest because of their storage efficiency and theircapability of parallel processing. Content addressablememories can be directly implemented by optical35

systems. In these architectures, the channels are pro-vided by freespace and a 1 or a 0 is coded as thepresence or absence of light. This is achieved by pass-ing a collimated beam of laser light through a spatial

Mir Mirsalehi is with University of Alabama in Huntsville, De-partment of Electrical & Computer Engineering, Huntsville, Ala-bama 35899, and Thomas Gaylord is with Georgia Institute of Tech-nology, School of Electrical Engineering, Atlanta, Georgia 30332.

Received 6 September 1989.0003-6935/90/233339-06$02.00/0.© 1990 Optical Society of America.

light modulator in which the pixels that correspond tothe ones are made transparent while those that corre-spond to the zeros are made opaque. Each output bithas a separate CAM which contains all input patternsthat produce a 1 for that output bit. When the inputdata is entered, its pattern is compared with the pres-tored reference patterns corresponding to each outputbit. If it matches one of the reference patterns, a 1 isassigned to that output bit; otherwise, a 0 is assigned.

A major difficulty with truth table look-up tech-niques is that as the size of the problem becomes large,the complexity of the required hardware dramaticallyincreases, and the method becomes impractical. Toreduce the amount of hardware, a logical minimizationtechnique, such as the Quine-McCluskey method,12

can be used to express each output bit as a minimumsum-of-products (SOP) expression. Each term in theSOP expression is a prime implicant or a reducedreference pattern of the output function. For mostcases of practical interest, the minimization procedureis too complex to be performed by hand, and thus acomputer program is required. For larger problems,even computer minimization becomes impractical.Therefore, it would obviously be valuable if the com-plexity of these minimum sum-of-products could bepredicted analytically.

In this paper, the sizes of the absolute logically mini-mized truth tables for binary addition and subtractionare treated in detail. In Sec. II, exact analytic expres-sions for the complexity of the logically minimizedbinary addition are derived. Similar expressions arederived in Sec. III for logically minimized binary sub-traction. In Sec. IV, a systematic procedure for creat-ing a complete list of the reduced reference patterns forthese operations is described. Finally, a summary ofthe results is presented in Sec. V.

10 August 1990 / Vol. 29, No. 23 / APPLIED OPTICS 3339

The results provided in this paper are directly appli-cable in the implementation of digital functions basedon CAM truth table look-up techniques. In the opti-cal implementations of these CAMs, the reference pat-terns are stored through angular multiplexed record-ing of the patterns as thick holograms inphotorefractive electrooptic crystals such as lithiumniobate. The recording of 500 binary data page holo-grams in this material has been experimentally dem-onstrated. 13, 4

II. Binary AdditionAddition of two n-bit numbers may be performed

with or without an input carry. Both cases are impor-tant in practice. The former is especially useful whena complex operation, such as 32-bit addition, is to beimplemented by several modules that handle smallercases, such as 8-bit addition. The latter is useful whenthe entire operation is to be performed by one module.

A. Addition of Two Input Numbers Without Input CarryIn this analysis, the two n-bit numbers are repre-

sented as X = xn-l ... xlxo and Y = Yn-l ... yiyo, wherethe subscript bit number starts from zero for the leastsignificant bit. The output sum, in general, has n + 1bits and can be represented as S = Sn ... ss 0. We alsouse c(l k n) to represent the carry bit at the kthbit position. Note that co is not present, since there isno input carry.

First, we derive an expression for the number ofreduced reference patterns that correspond to eachcarry bit. The first carry cl is affected by the previousbitsxoandyo. Tohavecl = l,bothxoandyomustbel.Therefore, c can be obtained by performing the ANDoperation on x0 and yo, i.e.,

Cl = x0yo. (1)

Therefore, c has one reduced reference pattern.Next, consider the carry bit 2. This carry is affect-

ed by three variables: xl, yl, and cl. To have c2 = 1, atleast two of the three variables must be 1. Therefore,the Boolean expression for c2 is

C2 = xly + c1x + clyl, (2)

where + indicates the OR operation. Substituting clfrom Eq. (1), gives

C2 = x1y + xlx0y0 + x0yOy. (3)

Therefore, c2 has three reduced reference patterns.This result can be generalized giving the Boolean alge-braic expression for ck as

Ck = Xk-lYk-l + Ck-lXk- + C-lyk-l- (4)

If we represent the number of reduced reference pat-terns for Ck and Ck-l by Mk and Mk-,, respectively, thefollowing equation can be written directly from Eq. (4):

Mk = 1 + 2

Mk-.. (5)

If we add to both sides of Eq. (5), we get Mk + 1 =2(Mk- + 1). This indicates that the (Mk + 1) termsare the elements of a geometric series. The first ele-

ment of this series is (Ml + 1) = 2 and its multiplyingfactor is 2. Therefore, the kth element of the series isMk + 1 = 2 X 2 k-1. Subtracting 1 from both sides ofthis equation, we get

M= 2 1, (6)

where 1 S k S n. For example, the number of reducedreference patterns corresponding to c, c2, and C3 are:1, 3, and 7, respectively.

Next, we derive an expression for the number ofreduced reference patterns that correspond to thecomplement of a carry bit. Let us start with c,. Tak-ing the complement of both sides of Eq. (1) and apply-ing DeMorgan's law, we have

el = x0 +Y0. (7)

Therefore, cl has two reduced reference patterns.Next, we take the complement of both sides of Eq. (2)to find an expression for c2. The result is

C2 = ( + Y5)(-C + xl)(Cl + Yl) = xlyl + CI5F + cly'. (8)

After substituting for l from Eq. (7), we obtain

C2 = XlYl + XlXO + XYO + Y + (9)

Therefore, c2 has five reduced reference patterns.The above result can be generalized giving the Bool-

ean algebraic expression for ck asCk = XklYhkl + Ck.lXk.1 + Ck-lyk-l. (10)

If we represent the number of reduced reference pat-terns for ck and ck-l by A'k and AIk, respectively, thefollowing equation can be written directly from Eq.(10).

Ak = 1 + 2Mk-l- (11)

Following the same procedure that we used for Mk andnoting that the first element of the geometric series isnow ', + 1 = 3, the following equation can be found:

Mk = 3 X 2k-1 - 1, (12)

where 1 k S n. For example, the number of reducedreference patterns corresponding to c1, 2, and C3 are 2,5, and 11, respectively.

Now, we derive an expression for the number ofreduced reference patterns that correspond to eachoutput bit. Let us start with the least significant bit ofthe sum, i.e., so. This bit is affected by two variables:xo and yo. To have so = 1, only one of these variablesshould be 1. Therefore, the following Boolean alge-braic expression can be written for s0

S = X0Yo + xoyo. (13)

That is, s has two reduced reference patterns. Next,we consider s. This bit is affected by x, y, and c.To have s = 1, only one or all three of these variablesshould be 1. Therefore, the following expression canbe written for sl

S = ClXlY + c1xly + clxlY + clxlyl. (14)

If the expressions provided in Eqs. (1) and (7) are

3340 APPLIED OPTICS / Vol. 29, No. 23 / 10 August 1990

substituted in Eq. (14) for cl and cl, a total of six primeimplicants are produced.

The above result can be generalized giving the Bool-ean algebraic expression for Sk as

Sk = CkXkYk + CkXkYk + CkXkYk + CkXkyk- (15)

Since k and Ck have Mk and MAk prime implicants,respectively, the number of reduced reference patternsfor Sk S

Nk = 2Mk + 2AVk- (16)

Substituting for Mk and M'k from Eqs. (6) and (12), weget

Nk = 2k+ + 3 X 2k-4 = 5 X 2k 4 (17)

where 1 < k S n - 1. The initial bit of the sum, s0, hastwo reduced reference patterns, i.e., No = 2. The lastbit of the sum sn, is actually the carry bit which isobtained from the addition of the (n - 1)th bits.Therefore,

Nn= Mn= 2n -1. (18)

The total number of reduced reference patterns re-quired for all output bits can be obtained by summingall Nk(O < k S n) terms. The result is

n n-l

YNk=No+7Nk+Nf=3X2n+1- 4n-5. (19)k=O k=1

B. Addition of Two Input Numbers With Input Carry

The addition of two input numbers with input carryhas been previously analyzed.15 The analysis is simi-lar to that without an input carry and the results showthat ck and Ck have the same number of reduced refer-ence patterns, namely,

Mk = Alfk = 2k+1 - 1, (20)

where 0 S k S n. The general expressions for Ck, Ck,

and Sk are the same as Eqs. (4), (10), and (15), respec-tively, but now k starts from zero. The number ofreduced reference patterns for the output bit Sk can beobtained as

N, = 2k+3- 4, 0 k - 1 (21)

Nk = 2` - 1, k =n. (22)

The total number of reduced reference patterns re-quired for all output bits is, thus,

nN = 2n+3 + 2n+1 - 4n-9 = 5 X 2n+1-4n - 9 (23)

k=O

I1l. Binary Subtraction

A. Subtraction of Two Input Numbers Without InputBorrow

Let us consider the subtraction X - Y = D, where Xand Y are two n-bit numbers. To include all possiblecases, let D be an (n + 1)-bit number, i.e., D = dndn-1... d1do. If X 2 Y, then dn = 0 and dn-1 ... d1do

provides the difference between X and Y, which is apositive number. If X < Y, then dn = 1 and dn_1 ...

dido provides the two's complement of the result,which is a negative number. If the processor is to beused as one module in a larger subtracter, dn will repre-sent the output borrow.

We represent the borrow bit corresponding to thekth bit location by bk. Notice that since there is noinput borrow, the first borrow bit is b. This bit isaffected by x0 and yo. To have b, = 1, xo should be 0and yo should be 1. Therefore, the Boolean algebraicexpression for b, is

(24)b, -xoyo.

Therefore, bi has one reduced reference pattern, i.e.,M = 1.

Next, consider the borrow bit b2. This bit is affectedby three variables: x, yi, and b, and its Booleanalgebraic expression can be written as

b2 = Xlyl + bix, + blyl. (25)

Substituting for b from Eq. (24), we obtain threereduced reference patterns for b2, i.e., M2 = 3.

In general, bk can be written as

bk = Xk-lYk-1 + bk-lXk-l + bk-lYk-l- (26)

Since the second and third terms each produce Mkl

terms, it follows that(27)Mk = 1 + 2Mk-l.

Using the procedure of Sec. II.A, we get

Mk = 2- 1,

where 1 S k S n. The expression for El can be ob-tained by taking the complement of Eq. (24), namely,

b, =iyo=xo+Y-0. (29)

Therefore, bl has two reduced reference patterns, i.e.,Mi = 2. Similarly,

b2 = (xl + -)(b1 + xj)(b, + ) = x 1 + blxl + bly1. (30)

Substituting for bl from Eq. (29), five reduced refer-ence patterns are obtained for b2, i.e., M2 = 5. Ingeneral,

(31)bk = Xk-lYk-, + bk-lXk-l + bk-lYk- 1,

and the following expression is valid for M9k:

M, = 1 + 2k-,.

Following the same procedure used in Sec. II.A, we get

= 2k-1 - 1, (33)

where 1 < k < n. Now, we derive expressions for theoutput bits. The least significant bit of the output dois affected by x0 and yo, and it can be expressed by thefollowing Boolean algebraic expression:

do= xo~o + Xc- (34)

Therefore, the number of reduced reference patternsfor do is two, i.e., No = 2. The output bit di is affected

(32)

(28)

10 August 1990 / Vol. 29, No. 23 / APPLIED OPTICS 3341

by three variables: xl, yl, and b1, and it can be writtenas

d = bjx1y5 + bjx1 yj + bjxjY1 + blxlyl. (35)

Substituting for b, and bl from Eqs. (24) and (29) intoEq. (35), we obtain six reduced reference patterns fordi, i.e., N2 = 6.

In general, the following expression can be writtenfor dk:

d = bkXhy, + bkXhYh + bhYh + bXhyh, (36)

where 1 • k • n - 1. Substituting for bk and bk fromEqs. (26) and (31) into Eq. (36), each of the termscontaining b will produce Mk reduced reference pat-terns and each of the terms containing bk will produceA4h reduced reference patterns. Therefore, the totalnumber of reduced reference patterns for dk will be

N,, = 2M, + 2Mk = 5 X 2 -4. (37)

The above equation is valid for 1 k n - 1. Theinitial bit of the difference do has two reduced refer-ence patterns, i.e., No = 2. The last bit of the differ-ence dn is actually the borrow bit, which is obtainedfrom the subtraction of the (n - 1)th bits. Therefore

Nn = Mn = 2n _ 1. (38)

The total number of reduced reference patterns re-quired for all output bits can be obtained by summingall Nk(O k n) terms. The result is

n n-17N 2 =No+YN,2 +Nn=3x2n+1-4n-5. (39)h=O k=1

B. Subtraction of Two Input Numbers With Input BorrowThe analysis of subtraction of two input numbers

with input borrow is similar to the case treated above,but the input borrow affects the number of reducedreference patterns. The first borrow bit is now bo.This bit has one (bo = bin) reduced reference pattern,i.e., M0 = 1. The next borrow bit bl is affected by threevariables: x0, y, and bo, and it can be expressed as

b = + b 0 + boyo. (40)

Therefore, b has three reduced reference patterns.The general expression for bk is the same as Eq. (26).

Also, Eq. (27) derived for the case without an inputborrow is valid for this case. The only difference isthat now Mk starts with Mo = 1. As a result, the valueof k in Eq. (28) should be increased by 1, i.e.,

Ml, 2+1 - 1, (41)

where 0 < k n. Next, we find expressions for thecomplements of the borrow bits. The first element ohas one reduced reference pattern (o = bin), therefore,

o = 1. The expression for b1 can be obtained bytaking the complement of Eq. (40), and the result is

b = xyoy + boX + boyo = x + boxo + bo (42)

Therefore, b1 has three reduced reference patterns. Ingeneral, the expression for bk is the same as Eq. (31),and Eq. (32) is also valid. The only difference is that

nbw llfk starts with M0 = 1. Asa result, the number ofreduced reference patterns for bk is

AM = 2 k+1- 1 (43)

where 0 S k • n. Now, we derive analytic expressionsfor the output bits. The least significant bit of theoutput do is affected by three variables: x0, yo, and bo,and it can be expressed as

= box + boy 0 + b0oX 0 + boxoyo. (44)

Therefore, do has four reduced reference patterns, i.e.,No = 4.

In general, the expression for dk is the same as Eq.(36), except that now k starts with zero. Following thesame procedure that we used in Sec. III.A, the follow-ing equations can be derived:

Nk = 2+3 _4, k<n-1,

Nk = 2n+ - 1, k = n,

(46)

(46)

E Nk = 5 X 2n+' - 4n - 9.h=O

IV. List of Reduced Reference Patterns

(47)

In a previous paper,15 we described a systematicprocedure to obtain a list of reduced reference patternsfor each output bit in the binary addition of two n-bitnumbers and an input carry. Using the equationsderived in this paper, that procedure can be extendedto include all the cases analyzed here. The procedurehas only two steps. For binary addition of two n-bitnumbers with or without the input carry, the steps are:

1. By successive use of Eqs. (4) and (10), find mini-mal sum-of-products expressions for k and in termsof the input bits. Start with k = 1 and stop at k = n.Notice that for the no input carry case c = 0, while forthe case with the input carry c = in.

2. Substitute these expressions for ck and k in Eq.(15) to obtain a minimum sum-of-products expressionfor Sk. Start with k = 0 and stop at k = n-1.

The first and the last bits of the sum, i.e., so and Sn,are easily calculated. To derive an expression for so,only the second step is needed, since c is known. Toderive an expression for s, only the first step is needed,since the last bit of the sum is the carry bit obtainedfrom the summation of (n - 1)th bits, i.e., Sk = Ck.

The procedure to obtain a minimum sum-of-prod-ucts for the binary subtraction is as follows:

1. By successive use of Eqs. (26) and (31) find theminimal sum-of-products expressions for bk and b interms of the input bits. Start with k = 1 and stop at k= n. Notice that for the no input borrow case bo = 0,while for the case with the input borrow bo = bin.

2. Substitute these expressions for bk and bk in Eq.(36) to obtain a minimum sum-of-products expressionfor dk. Start with k = 0 and stop at k = n-1.

To derive an expression for do, only the second stepis needed, since bo is known. To derive an expressionfor dn, only the first step is needed, since dn = bn-

As an illustrative example, we derive a minimal sum-of-products expression for the output bit d2 in binary

3342 APPLIED OPTICS / Vol. 29, No. 23 / 10 August 1990

Table 1. Analytic Expressions for the Truth Table Look-Up Implementation of Binary Addition and Subtractiona

Operation Mk Mt Nk ENk

n-bit addition 2, k = O(subtraction) 2 k-1,1<k<n 3X2k-1 1a1<k<n 5X2k-4,1<k<n-1 3x2n-4n-5without input 2n - 1, k = ncarry (borrow)

n-bit addition(subtraction) 2k+3- 4, 0 < k < n -1with input 2k+1-1,0 < k < n 2k+l-1,0 < k <n 2n+l-1, k = n 5 x 2n+l - 4n-9carry (borrow)

a M and MI are the number of reduced reference patterns corresponding to the k-thcarry (borrow) bit and its complement in binary addition (subtraction), Nk is the numberof reduced reference patterns for the k-th output bit, and ENk is the total number ofreduced reference patterns for the whole operation.

subtraction of two numbers without input borrow.From the first step, the following expressions are ob-tained:

(48)b = XoYo}

b2 = Xlyl + bj + bly1 = Xlyi + XjXoYo + XOYiYO,

b = x0 + YoS

(49)

(50)

b2 = xlyl + bjxj + bly = x1yj + xlxo + x 0 + xy, + YY0. (51)

Substituting for b2 and b2 from Eqs. (49) and (51) intoEq. (36), we get the following minimal sum-of-prod-ucts expression for d2 :

d2 = b2X2Y2 + b2xy 2 + b9x5, + b 2 Y9

= X2X1Y2Y1 + x2 xIxOy2 + x2 x1y2y0 + x2 x0 y2 y1 + X2y2y1y0

+ X2X 1y2 Y + X2XIXOY2 + Xl2XlY2O + X2XoY2Y1 + X2Y2YY 0

+ X2X1y2Y1 + X2 XiXoY 2 Yo + X2X 0Y2Y1Y0

+ X2xly 2yl + X2X 1Xy 2y0 + x2Xy 2yyo. (52)

V. Summary

The direct implementation of functions from theirtruth tables potentially provides the fastest method ofdata processing. An important issue in this method isthe logical minimization, which usually requires exten-sive computer calculations. In this paper, the impor-tant cases of binary addition, with and without aninput carry, and binary subtraction, with and withoutan input borrow, have been analyzed. Analytic ex-pressions for the number of logically minimized refer-ence patterns were presented. The results are sum-marized in Table I, where Ma, 1Vk, and Nk represent the

Table 11. Number of Reduced Reference Patterns for DirectImplementation of Binary Addition (Subtraction) of Two n-Bit Numbers

Without Input Carry (Borrow)

n No N1 N2 N3 N4 Ns N6 N7 N8 E Nk

1 2 1 32 2 6 3 113 2 6 16 7 314 2 6 16 36 15 755 2 6 16 36 76 31 1676 2 6 16 36 76 156 63 3557 2 6 16 36 76 156 316 127 7358 2 6 16 36 76 156 316 636 255 1499

Table . Number of Reduced Reference Patterns for DirectImplementation of Binary Addition (Subtraction) of Two n-Bit Numbers

With Input Carry (Borrow)

n No N1 N2 N3 N4 N5 N6 N7 N8 F2Nk

1 4 3 72 4 12 7 233 4 12 28 15 594 4 12 28 60 31 1355 4 12 28 60 124 63 2916 4 12 28 60 124 252 127 6077 4 12 28 60 124 252 508 255 12438 4 12 28 60 124 252 508 1020 511 2519

10 August 1990 / Vol. 29, No. 23 / APPLIED OPTICS 3343

number of reduced reference patterns correspondingto the kth carry (borrow) bit, its complement, and thekth output bit. The total number of reduced referencepatterns required 2Nk is also provided as a measure ofthe complexity of the operation.

As an example, the number of reduced referencepatterns in binary addition (subtraction) of two n-bitnumbers without the input carry (borrow) have beencalculated from the analytic expressions, and the re-sults are provided in Table II. These values agree withthe results obtained previously by Hassoun and Ar-rathoon16 for binary addition using computer minimi-zation programs. Note that the parameter n in Ref. 16is the total number of bits of the two input numberswhich is 2n in our paper. Similar results for the case ofaddition (subtraction) of two n-bit numbers with inputcarry are provided in Table III. These numbers alsoagree with the results obtained by Guest 7 for binaryaddition, using computer minimization programs.Comparing the data provided in Tables II and III, itcan be seen that the addition (subtraction) of two n-bitnumbers with input carry (borrow) requires more re-duced reference patterns than the case without inputcarry (borrow) by a factor of about two.

Using the analytic expressions and the simple proce-dure described in this paper, the complete informationabout the reduced reference patterns that are neededfor realization of binary addition and subtraction canbe obtained by a hand calculation in a few minutes,rather than by executing computer programs that typi-cally require several hours.

This work was supported in part by grants from theJoint Services Electronics Program under contractDAAL-03-87-K-0059 and from the Innovative Sci-ences Office of the Strategic Defense Initiative admin-istered through the Office of Naval Research undercontract N00014-86-K-0626.

References1. A. Huang, Y. Tsunoda, J. W. Goodman, and S. Ishihara, "Optical

Computation Using Residue Arithmetic," Appl. Opt. 18, 149-162 (1979).

2. A. Tai, I. Cindrich, J. R. Fienup, and C. C. Aleksoff, "OpticalResidue Arithmetic Computer with Programmable Computa-tion Modules," Appl. Opt. 18, 2812-2823 (1979).

3. C. C. Guest and T. K. Gaylord, "Truth-Table Look-Up OpticalProcessing Utilizing Binary and Residue Arithmetic," Appl.Opt. 19, 1201-1207 (1980).

4. J. N. Polky, D. D. Miller, and R. L. Gutmann, "Optical ResidueArithmetic Data Processing," Boeing Aerospace Company, Re-port AFWAL/AADO-2, Wright Patterson AFB, Ohio (1982).

5. M. M. Mirsalehi and T. K. Gaylord, "Truth-Table Look-UpParallel Data Processing Using an Optical Content-AddressableMemory," Appl. Opt. 25, 2277-2283 (1986).

6. P. S. Guilfoyle and W. J. Wiley, "Combinatorial Logic BasedDigital Optical Computing Architectures," Appl. Opt. 27,1661-1673 (1988).

7. A. P. Goutzoulis, E. C. Malarkey, D. K. Davies, J. C. Bradley, andP. R. Beaudet, "Optical Processing with Residue LED/LDLookup Tables," Appl. Opt. 27, 1674-1681 (1988).

8. P. W. Cheney, "A Digital Correlator Based on Residue NumberSystem," IRE Trans. Electron. Comput. EC-10, 63-70 (1961).

9. G. A. Jullien, "Residue Number Scaling and Other OperationsUsing ROM Arrays," IEEE Trans. Comput. C-27, 325-336(1978).

10. M. Davio, "Read-Only Memory Implementation of DiscreteFunctions," IEEE Trans. Comput. C-29, 931-934 (1980).

11. C. A. Papachristou, "Direct Implementation of Discrete andResidue-Based Functions Via Optimal Encoding: A Program-mable Array Logic Approach," IEEE Trans. Comput. C-32,961-968 (1983).

12. For example, S. Muroga, Logical Design and Switching Theory(Wiley, New York, 1979).

13. D. L. Staebler, W. J. Burke, W. Phillips, and J. J. Amodei,"Multiple Storage and Erasure of Fixed Holograms in Fe-dopedLiNbO3," Appl. Phys. Lett. 26, 182 (1975).

14. F. Mok, M. Tackitt, and H. M. Stoll, "Uniformly Diffracting,Angle-Multiplexed Holograms in LiNbO3," OSA Annual Meet-ing, 1989, Technical Digest Series, Volume 18 (Optical Society ofAmerica, Washington, DC, 1989), p. 76.

15. M. M. Mirsalehi, T. K. Gaylord, D. C. Fielder, and C. C. Guest,"Number Representation Effects in Truth-Table Look-Up Pro-cessing: 8-Bit Addition Example," Appl. Opt. 28, 1931-1939(1989).

16. M. H. Hassoun and R. Arrathoon, "Logical Signal Processingwith Optically Connected Threshold Gates," Opt. Eng. 25, 56-68 (1986).

17. C. C. Guest, "Holographic Optical Digital Parallel Processing,"Ph.D. Thesis, School of Electrical Engineering, Georgia Insti-tute of Technology (1983).

3344 APPLIED OPTICS / Vol. 29, No. 23 / 10 August 1990