LIBRARY OF THE UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN 510c 84 1-0 6r no. 111-130 cop .3 The person charging this material is re- sponsible for its return to the library from which it was withdrawn on or before the Latest Date stamped below. Theft, mutilation, and underlining of books are reasons for disciplinary action and may result in dismissal from the University. To renew call Telephone Center, 333-8400 UNIVERSITY OF ILLINOIS LIBRARY AT URBANA-CHAMPAIGN BUILDING USE ONLY SEP 2 11380 SEP 2 o 1930 L161— O-1096 Digitized by the Internet Archive in 2013 http://archive.org/details/studyofarithmeti128penh ,o. 128 °f- -3 UNIVERSITY OF ILLINOIS GRADUATE COLLEGE DIGITAL COMPUTER LABORATORY REPORT NO. 128 A STUDY OF ARITHMETIC RECODING WITH APPLICATIONS IN MULTIPLICATION AND DIVISION J . . Penhollov September 10, 1962 (This is being submitted in partial fulfillment of the requirements for the Degree of Doctor of Philosophy in Electrical Engineering, September 1962.) UNIVERSITY OF ILLINOIS GRADUATE COLLEGE DIGITAL COMPUTER LABORATORY REPORT NO. 128 A STUDY OF ARITHMETIC RECODING WITH APPLICATIONS IN MULTIPLICATION AND DIVISION by J . . Penhollow September 10, 1962 (This is being submitted in partial fulfillment of the requirements for the Degree of Doctor of Philosophy in Electrical Engineering, September 1962.) _J , l_, . l_> / ACKNOWLEDGMENT The guidance, encouragement and many helpful suggestions of my advisor, Professor James E. Robertson, are gratefully acknowledged. Professor Gemot Metze also contributed valuable advice and criticism. Thanks are extended to Mrs. Phyllis Olson and Mrs. Anna Rita Ferris who typed the thesis in its final form. TABLE OF CONTENTS Page 1. INTRODUCTION ............... . . 1 2. ARITHMETIC RECODING OF POSITIVE INTEGRAL RADIX REPRESENTATIONS . . 3 2.1 Basic Concepts of Arithmetic Recoding ............ 3 2.2 A Special Class of Arithmetic Recodings . . . 4 2.3 The One-to-Many Mapping 6 2.3-1 The Digital Mapping Function ............. 6 2.3.2 The Set of Mapping Functions 10 2.3.3 The Number of Possible Mappings 12 2.4 Mode Functions o ............ 17 2.4.1 Left and Right Directed Mode Functions ........ 19 2.4.2 General Mode Functions ................ 23 2.5 Recoding Functions. ..................... 24 3. LEFT AND RIGHT DIRECTED RECODING IN THE BINARY CASE 27 3.1 Left and Right Directed Mode Functions in Boolean Form. ... 27 3.2 General Mode Functions in Boolean Form . 29 3-3 Equivalent Left and Right Directed Recoding Functions .... 33 4. MINIMAL RECODING OF BINARY REPRESENTATIONS 37 4.1 Analysis of the Minimal Representation. 39 4.1.1 Decomposition of the Binary Representation ...... 40 4.1.2 The Gain Function 42 4.1.2.1 Analysis of the Zero Sequence 44 4.1.2.2 Analysis of the Unit Sequence 46 4,1.2 = 3 Analysis of the Alternating Sequence 48 4.1.3 A Summary of Maximum Gains . 53 4.1.4 Choice of the Next Mode Digit. 56 4.1.4.1 An Example. ........ 56 4.1.4.2 Special Restrictions on the Set of Independent Variables 58 4.1.4-3 Criteria for Choosing the Next Mode Digit . . 60 4.2 The Subclass of Restricted, Minimal Left Directed Mode Functions. 69 4.2.1 Case Analysis of the Partial Left Directed Sequence. . 69 4.2.2 Derivation of the Restricted, Minimal Left Directed Mode Functions 75 4.3 The Subclass of Restricted, Minimal Right Directed Mode Functions. 87 4-3 1 distinct positive integral representations of character- istic a and T R (c) > 1 distinct positive integral representations of charac- teristic p. Let T (c) and T (c) be finite for all c e C. Let A be the set of distinct representations of characteristic a for all c G C. Let N. = Z T (c) > N_ be the number of elements in A. Likewise, A cr ' — C ' let B be the set of distinct representations of characteristic f3 for all c e C, Let N_. = Z T Q (c) > N^ be the number of elements in B. B c 3 - C Any transformation of A into B or B into A which preserves algebraic value is an arithmetic recoding. Under this definition a conversion from one radix representation to another, such as from decimal to binary or binary to ternary, is classified as an arithmetic recoding. The conversion from radix complement to carry-borrow representation [8] and conversely are also arithmetic recodings . Another example is the transformation of a unique representation, such as radix comple- ment, diminished radix complement or sign absolute value, into a signed-digit representation [l] utilizing the same radix. The converse of this is also a recoding „ The conversion of a unique representation of a given integral radix to a signed-digit representation of the same radix has been employed effectively in the design of fast multiplication and division processes for digital com- puters [12], [6]. In the work which follows, a well-defined class of such arithmetic recodings is studied in detail. This preliminary study provides a basis for the later investigation of arithmetic recodings employed in multipli- cation and division algorithms and their interrelation. 2.2 A Special Class of Arithmetic Recodings The special class of arithmetic recodings to be investigated is characterized by the transformation of a finite radix complement representation onto a finite redundant radix representation both having an integer radix r > 2, The redundant representation chosen is a natural extension of the modified signed-digit representation defined by Avizienis [l] and has the desirable property that the representation of is unique. Each digit, y! , may assume any integer value in the range -r + 1 < y! < r - 1. The range of values, y, to be represented in radix complement form is -1 < y < 1. Because of certain simplifications in the analysis, it is convenient to modify the usual radix complement representation such that the second position to the left of the radix point rather than the first has negative weight. -5- Definition 2-2: Modified Radix Complement Representation n y = -y r + E y.r ; Integer r > 2 i=0 x < y_! < !; y Q = y_ x ( r - x ); o < y t < r - 1 Definition 2-3: Extended Signed-Digit Representation n -l y' = E y! r ; Integer r > 2 1=0 ± 1 - r < y! < r - 1 From this point on, the symbols y and y' will be used to designate numbers in modified radix complement and extended signed-digit representations respectively. Definition 2-k : Specialized Arithmetic Recoding Let Y be the set of all y as defined above and let Y" be the set of all y' as defined above. Let Y' be the proper subset of Y" which contains all y' that are algebraically equal to some y £ Y. Let F be a transformation of Y onto Y' such that for every y £ Y there exists a unique y 1 £ Y' with y' = y. The transformation, F, is an arithmetic recoding of Y onto Y' . -6- Throughout the remainder of the dissertation an arithmetic recoding as defined here will be referred to as a recoding. It is apparent from the definition of Y 1 that there are y for which there is more than one y' satisfying the condition y' = y. For example, n . n-1 y'=0+ E (r - l)r ~~ and y ' = 1 + E • r ~" - r are valid elements of Y' 1 i-1 2 i-1 n and both are algebraically equal to y = + E (r - l)r . In precise termi- i=l nology the relation y' = y partitions Y' into 2r disjoint subsets Y' . It follows that the specification of a recoding of Y onto Y' can be achieved in two distinct steps. First, a one-to-many mapping between every y G Y and its corresponding subset, Y' , is established. This mapping guarantees that the recoding of any y e Y will always result in a y' £ Y' which satisfies the relation y' = y. The second step provides constraints which reduce the one-to-many mapping to a one-to-one mapping. Sections 2.3 and 2.4 contain the development of the one-to-many mapping and the necessary con- straints to establish a recoding. 2.3 The One-to-Many Mapping 2.3-1 The Digital Mapping Function The development of a one-to-many mapping which preserves algebraic value is best approached by considering the restrictions imposed on the mapping of a typical digit, y., into some y! . It is clear that the addition of a unit in the i position must be compensated by the subtraction of r units in the (i - l) position. Either or both of these operations on y. will in general yield a y! that falls within the prescribed limits, 1 - r < y! < r - 1, of the extended signed-digit representation. It is easily shown that the addition of two or more units in the i position followed by a subtraction or r times that -7- number of units in the (i - l) position does not in general yield a y! within these limits. These intuitive observations lead to the following theorem con- cerning the digital mapping function. Theorem 2-1 : Given that y € Y and y' £ Y', then y' = y if and only if the digital mapping function assumes the following form. y i = y i + m i " rm i-l ( 2l±S) The mode digits, m., are subject to the restrictions: m . = y ., , m =0 and ' i -1 -1 n m. = or 1 for < i < n - 1 such that the range restriction, 1 - r < y! < r - 1, is always satisfied. Proof : Part I Since y' = y } it follows that n •J _ y' - y = y -.r + Z (y' - y )r j=0 J J Let m.r represent the difference between y' and y at the i position, i . n m.r"" = y r + Z (y! - y )r" J = Z (y - y! )r" J j=0 J J j=i-l J J . -. i . . n . . m = y r 1+ + Z (y! - y )r 1_J = Z (y - y ' )r 1_J j=0 J J j=i+l J J It is clear by inspection of the most significant half of the above equation that m. is always an integer for -1 < i < n. Furthermore, m = y r = r ° _ ~^f Y f„ _ „<\~J ( E (y, - y:)r" J ) = y j-o J m = (y r + E (y* - y )r" J )r n = j = J J We next examine the expression m. - rm. l l-l . , i . . . , i-1 . . m - rm = y r + L (y! - y )r - y r - L (y - y )r j=0 J J j=0 J J I (y, - y:)r i_j - I (y. - y:)^^ J=i+1 J J j=i J J Therefore, y! - y. = m. - rm. , for < i < n. ' i J i i i-1 - - Thus far no restrictions have been placed on m. (0 < i < n - l) except that it must be an integer. However, the limiting values of yj and y. restrict the set of integer values that m. may assume. Let this set be designated by u. From the limits on y! and y., it follows that ^ y i^Min " ^ y i^Max - y i " y i - ' y i^Max " ^ y i^Min 2-2r m > 1 M In a like manner let m. . = m and allow m. = m. The limits on m relative to l-l i m in this case are -1 + r(m + l) > m > 2 + r(m - 2) The most restrictive set of limits must apply for all m, and m must always be contained within these limits. Assume m = 0. The corresponding limits are 2 1 2-->m>-l+- r — — r -l + r>m>2-2r It follows that 1 > m > are the most restrictive limits on m for finite r > 2. The value is included so we next choose m = 1. The corresponding limits are 2 -->m>-l+- r — — r -1 + 2r > m > 2- r Again 1 > m > are the most restrictive limits on m for finite r > 2. The values and 1 are included in "both the first and second limits and no new values of m have appeared. Therefore the set u contains only the two integer values and 1. We conclude that if y 1 = y, then the digital mapping function must assume the form given in the hypothesis. -10- Part II Given the digital mapping function as defined in the hypothesis, we show that y 1 = y. This part of the proof was originally demonstrated by J. E. Robertson [11] . n n n n r = ^ y[r' x = l^ y ± r- J + Y m i r_1 - 1 ra i-i r_1+1 i=0 i=0 i=0 i=0 The upper limit in the center summation on the right may be replaced by n - 1 since m =0. In this same summation let i = ,i - 1. By collecting terms and n n simplifying we have y' = -m ,r + ) y.r . Since m = y , it follows that ■i y = y_ x r + / y\r i=0 Corollary ; The limits on y' are -1 < y 1 < 1 for any r > 2. Proof: By Eck 2:1 we have y' = y +m -rm n . Since y = y _ (r - l) and J o J o o -1 o -l v ' m=y ; y'=yr-y+m - ry = m - y . Taking the limits on m and y -, into account, it follows that -1 < y l < 1. 2.3-2 The Set of Mapping Functions The one-to-many mapping which takes each y e Y into its corresponding Y' is the set of digital mapping functions for < i < n with the associated mode digit restrictions. Let E represent this set of functions. Since E can be easily expressed in matrix form it is convenient to define the sequence of mode digits as a vector. Definition 2-5 : Mode Vector Let m= -^m ., , m , rm , ...,m ., , m f represent a mode vector. (_ -1 o 1 n-1 nj -11- Because of the range restriction, 1 - r < y. f < r - 1, on the digital mapping function, m. can not always he chosen arbitrarily as or 1„ For example, if y. = r - 1 and m. = 1, satisfaction of the range restriction requires that m. n = 1. As another example, if y. =0 and m. _, =1, then it is necessary l-l l l-l ' J that m. = 1. It is apparent that the choice of m. is not always independent of y., and likewise the choice of m is not always independent of y. Definition 2-6 : Allowable Mode Vectors A mode vector, m, is an allowable mode vector with respect to a given y e Y if and only if m n = y n , m =0 and l-r rm > 0, m may also be or 1 arbitrarily. If i = n - 1, the most restrictive limits on m _, - rm _ and n-1 n-2 m - rm are n n-1 ■r ...P , , Or. R(y) contains n right directed mode functions. R.. -1 o^ n-1 ' i' -22- plus the two boundary conditions P n = y . and p = 0. Each R.(p. ,, v., YV) -1 -1 n i x i-l' J i' i' defines P. such that the restriction of Theorem 2-6 is satisfied for l < i < n - 1 with P = y and p =0. The set, YV, excludes y. but may include an arbitrary number of digits to the right or left of y. . From this point on ; m. will be used to designate the i mode digit in general, whereas X. and P. will be used to distinguish the i mode digit as generated by left and right directed mode functions respectively. Likewise, X and p will be used to distinguish left and right directed mode vectors. It is important to note that the boundary condition \ = y affects none of the L. while the condition P =0 may affect an arbitrary number of R. . l n i The Corollary of Theorem 2-1 guarantees -1 < y' < 1 for all r > 2 and X , = y ., with X = or 1„ Thus the range restriction on y' is always satis- -1 -1 o ° o fied regardless of how X is defined by L (\, , y n , Y7). If y =0 and R , (p ^>y -, ? ^ -, ) = P , = lj then Theorem 2-6 demands that p = 1. It n-l v n-2' J n-V n-l y n-1 n is clear that in this case R , must insure that P n = 0. The condition under n-1 n-1 which an arbitrary R. is restricted by P =0 can be stated as follows, l n Theorem 2-7: If y =0 for n-k+l the problem of determining an R(y) which is equivalent to a given L(y), and con- versely, is investigated for the special case of r = 2 . 3, LEFT AND RIGHT DIRECTED RECODING IN THE BINARY CASE Left and right directed recodings of a binary radix complement representation are investigated in this chapter. A formulation of L(y) and R(y) is derived which separates the restrictions of Theorems 2-5 and 2-6 from those which control the characteristics of the recoding „ These new forms of L(y) and R(y) are then reduced to a set of general mode functions . Using these results a method is developed for obtaining a set of right directed recoding functions which is equivalent to a given set of left directed recoding functions and vice versa, 3=1 Left and Right Directed Mode Functions in Boolean Form Since v., X. and p. are now either or 1, the mode functions L. and l 11 i R. can be expressed as Boolean functions . If L. and R. are expanded about X. f y. and p. , y. respectively^ the restrictions imposed by Theorems 2-5 and 2-6 can be easily incorporated. Theorem 3-1 : In the binary case the Boolean form of L. is given by \. = L.(X. ., y. ., Y L J = \. _y. . V (*•• ■, V Y- JK. (y. ., Y 1 .) (3:l) i i v i+i' ■'i+i' 1+1 i+i J i+i v v 1+1 v J i+i y i w i+y i+i ' w J where K. is independent of the range restriction. Proof: By expanding L. {X. _,, y. „ . Y7 _, ) about X. , and y . _, we obtain J r to i i+i' J i+1' i+l i+l J i+l X. = \. v. _L. (1, 1, ^JVV ,y. ,L. (1. 0, Y 1 , ) l i+l J i+l i v ' } i+l y i+l J i+l i v ' ' i+l ' \t\. n y. ,L.(0, 1, Y7 , ) V\. n y. ,L. (0, 0, ^1 _ ). i+l J i+l i v } ' i+l i+l J i+l i v 3 } i+l ' -27- -28- According to Theorem 2-5, \. = \. , if y. , + \. , = (Mod 2). In Boolean ' i l+l l+l l+l v J form, X. = X. _ if y. . e X. . = 0. Therefore if \ v. , = 1. then \. = 1 ' i i+l l+l l+l i+1 l+l ' l and if X. n y. . = 1. then X. = necessarily. The choice of X. is arbitrary i+l i+l l l J otherwise. It follows that L. (l, 1, Y7 , ) s 1 and L. (0, 0, Y^ ) = 0. By l v ' ' i+l ' i v ' ' i+l ' J making these substitutions and joining the identically zero terms X. .y. n y. ,L.(0, 1, YT" . ) and X. n y. n y. n L (l. 0, YT' , ) we obtain i+l J i+l J i+l i v ' ' i+l i+l i+l J i+l x } ' i+l \. = X. _y. . V (\. . e y, n )K.(y. _ , Y 1 . ) (3:2) l i+l J i+l T v i+l J i+1' i w i+l' i+l y w ' where K.(y. n , Y L J = y. n L.(0, 1, ^JVy. ,L.(l, 0, Y 1 . ) (3:3) i VJ i+l' i+l y J i+1 i v ' ' i+l ' J i+1 i v ' ' i+l ' x ' It is clear that K. is not affected by the range restriction as imposed by Theorem 2-5 since y / X . Simplification of Eq. 3:2 leads to Eq. 3:1- Theorem 3-2 : In the binary case the Boolean form of R. is given by p i ■ V p i-i' v $ - P i-A v (p i-i * Wv *?> (3:4) where S. is independent of the range 'restriction. Proof: Expansion of R. (p. , . y., Y?) about P. . and y. yields l v i-l' i' l l-l l p t - ViW 1 * L > ^» Vp i.^i R i (1 - °< # Vp._ iy .R.(0, 1, Y^JV P^y^O, 0, Y*). -29- By Theorem 2-6, P. =p. . if p. . = 1 + y. (Mod 2). In Boolean form, P. = p. . J l l-l l-l l ' l l-l if P. , = y. . It follows that P. = 1 if P. j. = 1 and p. = if p. .y, = 1. l-l ''i l i-I i i l-l i Otherwise the choice of P. is arbitrary. Therefore_, in the expansion of R. it is necessary that R. (l, 0, Y?) - 1 and R. (0, 1, Y?) - 0. Making these sub- stitutions and joining the identically zero terms P. y.y.R. (l,, 1, T.) and M.^y.y.R. (0, 0, Y?) yields P i = P i-l^i V (p i-l e y i )S i (y i' Y i ) (3:5) where S.(y., Y^) = y.R. (1, 1, Y?) V y.R^O, 0, Y*) (3:6) S. is not affected by the range restriction since it is defined under condition that p. j- y. . Simplification of Eq„ 3^5 yields Eq. 3^- As defined in section 2,^.1, L(y) and R(y) represent the set of Boolean functions L. and R., as defined by Eqs . 3:1 and 'i'.h, for < i < n - 1 with the boundary conditions X n = P , = y , and X - p = 0. - - J -1 -1 J -1 n n 3.2 General Mode Functions in Boolean Form Theorems 2-8 and 2-9 state that sets of left and right directed mode functions can be reduced to equivalent sets of general mode functions. The next two theorems are special cases of Theorems 2-8 and 2-9- The method of proof will be by a process of resubstitution. -30- Theorem 3~3 ° Given a set of left directed mode functions, L(y), with X. = L.(\. _, y. ., Y^) = \. _y. . v (*.. -, V y. , )K. (y. ., Y 1 _) 1 1 i+l' i+l' i l+l l+l l+l J i+1 i w i+l' l+l for < i < n - 1, there exists an equivalent set of general mode functions, J(y), with n-i-1 p-1 m. = J.(Y*) = y. ,K. w "V" J- . K - TT (j ■ ■> ■ V K. .) (3:7) i i v i y J i+1 l v Y n J i+l+p l+p .'I w i+l+ j i+j y ■p=l .1=0 for < i < n - 1, Proof; Note first of all that m n = \ , = y , and m = X = for all y e Y. -1-1-1 n n An inductive argument follows . Substitute L. n for \. .. in the to l+l l+l expression for L. . \ ■ [ \ +2 ^i +2 * K i + i» v yi +2 K i + i ] ^i + i v V v Wk Assume that after the (k - l) substitution we have k-1 \. =\. , 7T(y. n .VK. .) \/y. -.K. i l+k .'' i+1+j i+j i+I i k-1 p-1 v * J l+i+p i+p .*• w i+i+j i+j p=l j=o By substituting L. , for X. , we obtain l+k l+k k k-1 h - \ +fc fi ]!^ (y i + i + j v "W Vy i + i K i v 'Wi+k T (y i + i +J v K i +j } k-1 p-1 V Yy. , K. 1T(y. , • V K. .) v * J i+l+p i+p .'' w i+l+j i+j p=l j=0 -31- By collecting terms we have k k p-1 K = \. , , T(y. , . V K. .) V y- n K. V/ Vy. . K. "TT (y. _ . V K. .), 1 i+k+1 .»' i+1+j i+j l+l l v , i+1+p l+p .»' i+1+j i+j j=0 p=l j=0 This proves that the general expression for \. is valid for all y £ Y provided the terms involved are defined. In the last expression above let k = n - 1 - 1. Since \ = 0,, we have n-i-1 p-1 l l+l l V J i+l+p i+p .1' W i+1+J l+J r>=l ^ .1=0 If we define the right hand side of this equation as J. (Y* ) for < i < n - 1, the theorem follows . Theorem 3-^ - Given a set of right directed mode functions, R(y), with P. = R.(p. ., y., Y?) = P. _y. >/ (p. . V y.)S.(y., Y?) i l l-l i i l-l i l-l i 11 i there exists an equivalent set of general mode functions, T(y), with i-1 p-1 i-1 m. = T.(Y*) = y.S. V ~\T y. S. Tf (y. .VS. .) V S "TT (y- • ^ s - •) i i v i' J i l ^ J i-p i-p ""i-j i-j y o " VJ i-J i-j' (3:8) for < i < n - 1. Proof: Note that m . = P -, = y , and m = p = for all y e Y. -1-1-1 n n An inductive argument follows. Replace P. "by P.. in the expression for R. . -32- Assume that after the (k - l) substitution we have k-1 k-1 p-1 p. = p. , TT (y- -V s. .) v y.s. yYy. s. TT (y- • V s. .) 1 1_k jL'o 1_J 1_J x x p =i 1_p 1-p j=o 1_J 1_J By substituting R. , for p. , we obtain l-k l-k 'i ■ p i-i-k TTfri.j * s._j) v 7^ v ^.A.i T(y ± .j v s.^) k-1 p-1 V ~V y- s. Tf (y. .vs. .) By collecting terms we have k k _ p-1 p - =p - i i TT(y- -vs. Jvy.s. v V" y- s - If (y- • v s - •). i i-1-k " w i-j v i-j 7 J i i V J i-p i-p JJ w i-J v i-J This completes the induction proof and shows that the general expression for P. is valid for all y e Y if the terms involved are defined. In the last expression for p. let k = i. Since P = y = y for r = 2, this expression becomes 'i " 'A * % ^i-p s i- P T^.j v s ± _ 3 ) y s o JG^ v Sl ..). If we define the right hand side of this equation as T. (Y*)> the theorem follows . -33- In summary, these two theorems provide more explicit relationships between a given set of left or right directed mode functions and the cor- responding set of general mode functions. These relationships will be used to obtain an equivalent set of right directed mode functions from a given set of left directed mode functions and conversely, 3. 3 Equivalent Left and Right Directed Recoding Functions By Theorem 2-10, F is equivalent to F if and only if L(y) is L R equivalent to R(y). Assume that L(y) is given. Each functional element of this set, L., generates a corresponding mode digit, X. . We wish to establish a set R(y) such that each corresponding functional element, R., generates a mode digit, P., that is equal to X. for all y € Y. The Boolean interpretation of Theorem 2-6 was developed in the proof of Theorem 3-2. It states that P. = 1 necessarily if p. y. = 1. If P. = y., then P © y. = 1 and p. may be or 1 with respect to the range restriction. If P . n y. = 1, then P. = necessarily. l-l 1 1 By Eq. 3:5; it is clear that S. determines the value of P. when P. . = y. . In order for R. to be equivalent to L. , P. should equal X. for all 1-1 1 i * i' i * i y e Y whenever P. . © y. = 1. Therefore, p. = P. n y. v(p. , © y. )\. . The l-l 1 ' 1 l-l 1 1-1 J 1 1 X. as used here must be independent of all mode digits except possible X. Since \ = L (\ , y. , YT -,) = J. (Y*) by Eq. 3:7, substitution and simpli- fication yields P. = p. j. V (P. -, V y. )J. (Y-*). 1 l-l 1 l-l 1 1 1 Theorem 3- 5 : If p. is defined by R i (p i-i> y i> Y i ) = P i-i^i v(p i-i v y±) J ±( Y V (3:9) -3k- for < i < n - 1, then R(y) is equivalent to a given L(y) in which X. = L.(X. _, y. n , Y L _ ) = J.(Y*) where J. (Y*) is defined by Eq. 3:7. l l l+l i+l' l+l i v i i v l J ^ J Proof: R(y) is equivalent to L(y) if and only if p = X for all y e Y. An inductive argument follows., By the definition of R(y) and L(y), it is clear that p n - X n = y -, and p = X = for all y 6 Y„ Assume P. . = X. n for -1 -1 -1 n n J l-l i-I all y £ Y and substitute into the equation for P. as stated in the hypothesis P. = *». ,y. V (X , V y. )J.(Y*) l i-l J i v i-I Y J i i l Since X. = J. and X,. . = X.. y. V (X. V y. )K. - , by substitution in the above l l i-I 1 l i J i i-I' ^ equation we obtain P. = X.y. V X.y. V X . K. = X. . Thus P. = X. for l 111111 l l l <; i < n - 1 and all y 6 Y. Now assume R(y) is given and that we wish to determine the equivalent L(y). In this case the Boolean form of Theorem 2-5 is examined. If X. _,y. _, = 1, then X. = 1 necessarily. If X. , 4 y. ,, then X. , ® y. , = 1 i+l J i+l ' l J l+l ' J i+l' l+l J i+1 and X. is arbitrary. If X. , y. , =1, then X. = necessarily, l l+l l+l l By Eq. 3<2 it is apparent that K. determines X. only when X. _ e y. _ = 1. In manufacturing a L. which is equivalent to the corres- l+l l+l i ponding R., it is necessary that X. = P. for all y e Y whenever X e y = 1, Therefore, X. - X. n y n V (X ., © y. _ )p.. As used here, P. can not be a ' i l+l i+I i+I J i+1 i ' i function of any mode digits except possibly p. . This requirement is easily satisfied since P. = T. (Y*) by Eq. 3:8- Substitution in the above equation and simplification yields X. = X. j. _ V (X. _ \/y. , )T.(Y*)- i i+I i+I v i+I i+I i l ■35- Theorem 3-6: If X. is defined by — 1 for < i < n - 1, then L(y) is equivalent to a given R(y) in which P = R (p. n , v., Y R ) = T.(Y*) where T. (Y*) is defined by Eq. 3:8. l i v i-l' i' l l l i i Proof : By the definition of L(y) and R(y) we have X = p = y and \ = P =0 for all y e Y. An inductive argument follows. Assume that n n X , = p. . for all y e Y. But substitution in the expression for X. as given l+l l+l J ■ i in the hypothesis we obtain X. = p. _y. . y (p- i V y. -, )t. (y*). 1 1+1 1+1 v 1+1 1+1 1 1 Since P. , = p.y. n \/ (p V y. -, )S. n and P. = T. (Y*), substitution and l+l i J i+l i r "'l+l l+l i i v l" simplification yields X. = P.y. ,Vp.S. n V P.y. , = P. . i i J i+l i l+l li+l i It follows that X. = p. for < i < n - 1 and all y eY. 11— — By comparison of Eqs . 3*9 an( i 3«10 with Eqs . 3:+ and 3-1; it is clear that J.(Y*) represents S. (y., YV) and T. (Y*) represents K. (y. .. Y7 1 n ) . i v l ' * i w i' i' i v i / ^ i w i+l' i+l 7 It is apparent from this observation that the development of a set of left or right directed mode functions equivalent to a given set of right or left directed mode functions is accomplished in two steps. An equivalent set of general mode functions is derived and then used to manufacture a standard set of left or right directed mode functions. It follows from Theorem 2-10 that -36- the corresponding sets of recoding functions F and F will also be equivalent L K Several examples of this technique are given at the end of Chapter k. k. MINIMAL RECODING OF BINARY REPRESENTATIONS The results of Chapters 2 and 3 indicate that the properties of a set of left or right directed recoding functions F (y) and F (y) are determined by L R the properties of the corresponding sets of left or right directed mode functions L(y) and R(y). Furthermore, given L(y) an equivalent R(y) can "be determined and conversely. It follows that for every F (y) there exists an J-j equivalent F (y) and conversely. The class of F (y) is therefore equivalent R L to the class of F (y). K In this chapter we confine our attention to the subclass of minimal F T (y) and the equivalent subclass of minimal F (y) where y is restricted to L R binary representations. The sets of minimal recoding functions included in these classes map Y onto Y' with the added constraint that y' is a minimal representation of y. Definition k-1 : Minimal Representation A representation, y ? , is a minimal representation of y if and only if y' = y and y' contains a minimum of nonzero digits. A well-known element of these minimal subclasses is the set of recoding functions, F (y) and its equivalent F (y), which produce a canonical, L R minimal representation for all y £ Y. This special representation has been defined by Reitwiesner [9] and studied by Lehman [5], Robertson [11], Tocher [13], Weinberger and Smith [Ik] and others. ■37- -38- Definition k-2 : Canonical, Minimal Representation A representation, y', is a canonical, minimal representation of y if and only if y' = y and y' contains a minimum number of nonzero digits separated by at least one zero digit. The canonical, minimal F (y) has been effectively employed to recode the multiplier in fast multiplication schemes. Reitwiesner [9] has developed a division algorithm which, in effect, uses the equivalent F (y) to generate a recoded quotient. Other multiplication and division algorithms based on minimal F (y) and F (y) are discussed in Chapter 5« L R For every set of minimal recoding functions, F T (y) or F (y), there L R is a corresponding set of minimal mode functions, L(y) or R(y). The subclasses of minimal F (y) and F (y) are therefore defined by the subclasses of minimal L R L(y) and R(y) which are also equivalent. All possible minimal L(y) or minimal R(y) are known if all possible minimal L. or minimal R. are known. 1 1 For this reason the prime emphasis in this chapter is on the development of the classes of minimal L. and R. . 1 1 Definition ^-3 ' Minimal Left Directed Mode Functions L. (\. ,i y. ,j Y7 J is a minimal left directed mode function if and i v l+l' •'i+I' 1+1 only if it defines \. such that all partial sequences (...y. , y., y. ) can be recoded with a minimum of nonzero digits. Let the class of all such L. be denoted by £. -39- Definition k-k : Minimal Right Directed Mode Functions ■p R- (p- -, > y.j Y.) is a minimal right directed mode function if 1 l-l l l and only if it defines p. such that all partial sequences (y. , y. } y. ? ...) can he recoded with a minimum of nonzero digits. Let the class of all such P.. be denoted by (R. The development of oC and (J\ begins with an analysis of the minimal representation in section Ud. This analysis yields criteria for the optimum choice of ^. and p.. These criteria are used to partition (... y i _ 1 . y ± , y i+1 , *- 1+1 ) and (p i _ 1 , y ± , y ±fl , y i+2 . -0 into three mutually exclusive subsets such that \. and p. are either or 1 or arbitrary. In sections k,2 and k.~5 these subsets are used to establish the Boolean form of all minimal L. and R. in which YT -, is restricted to y. to the left of y, n 1 l 1+1 J j J i+1 ID and Y. is restricted to y , to the right of y. . These restricted, minimal L. l J j B °i ' i and R. represent subclasses of cT and CX . A method of obtaining the unrestricted elements of cXL and (K is presented in section k-.k. It is based on knowledge of the restricted minimal L. and R. and the equivalence relations li established by Theorems 5-5 and 5-6. Restricted, minimal L. and R. are 7 11 generally equivalent to unrestricted, minimal R. and L. . The particular L. and R. which produce the canonical, minimal representation are examples of an exception to this . k-.l Analysis of the Minimal Representation To obtain a minimal recoded representation of y it is necessary to maximize the number of zeros occurring in y' . The approach used to solve this problem is outlined below. -llO- (a) The whole or partial representation of y is broken into a unique series of special sequences. These sequences are of three types: the zero sequence, the unit sequence, and the alternating sequence. (b) The gain in zeros achieved by recoding a binary sequence is defined as a function of the sequence type, its length, and the boundary mode digits. By maximizing this gain, the optimum mode digit pattern is determined for each of the three sequence types and for all possible combinations of boundary mode digit values. (c) The optimum value for the next mode digit is not always determined by the special sequence with which it is associated. Therefore, criteria are established for choosing this digit such that the entire series of recoded sequences contains a maximum number of zeros. Fortunately, in most cases only two or three special sequences, including the one which contains the digit being recoded, need to be examined. ^.1.1 Decomposition of the Binary Representation Any segment of y £ Y can be decomposed into a series of special sequences defined as follows. Definition h-5 i The Zero Sequence Let Z denote a sequence of one or more zeros. Definition k-6 : The Unit Sequence Let U denote a sequence of one or more units. -1*1- Definition 4-7 : The Alternating Sequence Let A denote an alternating sequence of zeros and units. The A sequence contains an even number of digits having a zero on the left and a unit on the right. Definition h-8 i Order of Decomposition Any segment of y £ Y is decomposed into a series of A, U and Z sequences in the following order. (a) All A type sequences are removed, (b) The remaining sequences are then classified as type U or Z, The definitions of A and the order of decomposition were chosen such that the resulting series of sequences would be unique for a given segment of y 6 Yo This is proven as a theorem below. There are others sets of defini- tions [lk] which also satisfy the uniqueness requirement and no special claim is made for the particular set chosen. Theorem 4-1 : The decomposition of a given segment of y G Y in accordance with Definition 4-8 yields a unique series of A, U and Z sequences. Proof : Any segment of y £ Y may or may not include one or more A sequences. If it contains one or more A sequences, each of these sequences must be bounded by a single zero or two adjacent units on the left and by a single unit or two adjacent zeros on the right. This also applies to the left and right boundaries of y if we define y = y = y (a natural left extension of y in the binary -In- case) and y , = y _ = 0. In all cases the initial zero and the terminal n+1 n+2 unit of the A sequence is well defined. After the A sequences have been deleted, the remaining sequences must he U or Z sequences containing one or more elements . If the segment of y contains no A sequences, then it must consist of a single Z sequence, a single U sequence, or a single U sequence followed by a single Z sequence. Theorem h-2 : The ZU sequence can not occur. Proof: If ZU occurs, the representation was not properly decomposed. The terminal zero of Z followed by the initial unit of U should have been con- sidered a two element A sequence. Therefore ZAU occurs in place of ZU. In summary, a segment of y £ Y may be decomposed into a unique series of special sequences. Under the given definitions only the following pairs of special sequences may occur in this series. UZ, UA, AU, ZA, AZ 4.1.2 The Gain Function Since our goal is to develop minimal recoded representations, it is useful to define a function which provides a quantitative measure of the dif- ference in the number of zeros between the recoded and the original representa- tions. Consider a segment of y starting with y. and ending with y. . Suppose this sequence of p bits is recoded using Eq. 2:1 with given values •4> for the boundary mode digits m . . and m. , . The number of nonzero digits 0-1 J+P-1 in the original sequence can be expressed as follows. J+P-1 N = E y. (4:1) Since y' = y. + m. - 2m. , and -1 < y! < 1, the number of nonzero digits in i l l l-l — l — the recoded representation is given by Eq. 4:2, J+P-1 P N' = E (y. + m. - 2m. . ) (4:2) . . i i l-l i+J Definition 4-9 : The Gain Function The gain function, G, represents the number of zeros gained by recoding a binary sequence, P = (y., y. , , ... f j. ) } into a base 2 signed-digit sequence, P' = (y!, y! , «.., y' ), with a given pair of boundary mode digits (m. , , m. , ). J-l J+P-1 G(m. _, P, p, m. _ ) = N - N* j-1' ' *' J+P-1 In this equation N and N' are defined by Eqs . 4:1 and 4:2 respectively. 2 Since y. = y., it is written as J+P-1 G(m. , P, p, m. . ) = - E (2y. + m. - 2m. _ )(m. - 2m. . ) (4:3) •]_> > n i+p-1 . . J i l i-l /v i l-l' v ' J+p - i-j -44- Definition 4-10: Optimum Mode Digit Sequence An optimum mode digit sequence is any sequence (m , m . . . m ) j-l' J j+P-1 which recodes P = (y., y. , > . . . y . ,) with a given pair of boundary mode digits (m. ,, m. ., ) such that G(m. .. P. p. m. n ) assumes its maximum J-l J+P-1 J-l J+P-1 value G. We now determine the optimum mode digit sequence or sequences and the corresponding G for each of the special sequences with all allowable boundary mode digit pairs. 4.1.2.1 Analysis of the Zero Sequence Since y. = for j the optimum mode digit sequence must be m. =1 for j-l 2, the J+l J+l - - ' choice of m. . = or 1 does not dictate the choice of m. , . Likewise the J-l J+P-l choice of m. , does not dictate the choice of m. J+P-l J-l Theorem U-12: Given an A sequence with m. , = m. , = 0. the optimum mode J-l J+P-l digit sequence is m. =0 for j-l k, we consider k = and 1 < k < — — — separately. For k = 0, we have -m. - (2 + m. n - 2m.)(m. n - 2m.). Note that this term is J J+l J J+l J zero for m. , = m. = 1 or m. ., =m. =0 but is negative for any other allowable J+l J J+l J o combinations of m. , and m.. If k > 0, we have -(m. „., - 2m. ^, , ) J+l J J+2k j+2k-l - (2 + m. - 2m. _. )(m. 01 . - 2m. __ ). If m. _. . = 1, then m. must j+2k+l j+2k j+2k+l J+2k j+2k+l ' J+2k be 1 to satisfy -1 < 2 - 2m. _, < 1. The above expression is zero when - J+2k — m. . = m. __ =1 and m. _. n = or 1 or when m. 01 . = m. _. = m. ,_, , = 0. j+2k+l j+2k j+2k-l j+2k+l j+2k j+2k-l It is negative for any other allowable combination of these mode digits. This shows that an optimum mode digit sequence must consist of a series of zeros on the left followed by a series of units on the right. Since m. , = m. _ = 1. the series of units always contains two elements. If it j+p-1 J+P-2 contains three units it must contain four to satisfy the range restriction. Thusj there are ^ different optimum mode digit sequences, including the case p = 2, for which G(0, A, p, l) = 0. -51- Theorem ^-14: Given an A sequence with m. _, = 1 and m. , = 0, there are ^ J-l J+P-l 2 optimum mode digit sequences of the form m. = 1 for j ~ 1 < i < J + 2k and p - 2 m. = for j + 2k + l G } we consider the sum of the (k + l) term in the first summation and the k term in the second summation. The combined term for 1 ^ k ^ ^ 1S - (m j+2k+2 " 2m j+2k+l )2 - (2 + m j+2k+l- 2m j+2k )(m j+2k+l " 2m j+2k : If m. _. , = 1. then m. _, must be 1 to satisfy -1 < 2 - 2m. _, < 1 and j+2k+l ' j+2k J - j+2k - m. must be 1 to satisfy -1 < m. _. _ - 2 < 1. Substitution in the above j+2k+2 J - j+2k+2 - term yields a zero result. This term is also zero if m. .. = or 1 and J+2k m = m. ^ n _ = 0. It is negative for any other allowable combination of j+2k+l j+2k+2 & J UNIVERSI: ILUNQIS LIBRARY ■52- these mode digits. Since the term corresponding to k = 1 in the first sum is associated with -1 + m. . as in the case p = K, the maximum gain when J+ 1 p > 6 is also G(l, A, p, 0) = -1. The optimum mode digit sequence therefore consists of a series of units on the left followed "by a series of zeros on the right. There are always two elements in the series of units since m. , = m. = 1. If there are three J-l J units in the series, there must be four to satisfy the range restriction. It follows that there are ^ different optimum mode digit sequences for p > 2 with G(l, A,, p, 0) = -1 in all cases. Theorem 4-15: Given an A sequence with m. _ = 1 and m. , .= 1> the optimum mode J-l J+P-1 digit sequence is m. - 1 for j-l 6, we consider the sum of the k terms in the first and p - k second summations „ The combined term for 1 < k < — - — is therefore ■ (m j + 2k " 2m j + 2k-l )2 " (2 + m j + 2k + l ' 2m j + 2k )(m j + 2k + l " 2m j + 2k } ° If m. _. . = 1. then m. ^ must be 1 to satisfy -1 < 2 - m. _. < 1. Under this j+2k+l ' J+2k J - J+2k - condition the above expression is zero for m. ^ n , = or 1. Note that if j+2k-l m. , = 0, the only way to make the next lower term (replacing k by k - l) J+2K-1 equal to its maximum value of zero is to choose m. „, _ = m. „, _ = 0. By j+2k-2 j+2k-3 induction this same choice must be made when k = 1 which would demand that m. = m. =0 contrary to the hypothesis . On the other hand, if m. = 1 J J-1 j+2k-l m. „, _ must be 1 and the next lower term is zero. If k = 1, m. =m. , =1 J+2k-2 j j-1 which satisfies the given boundary conditions. It follows that the only optimum mode digit sequence is m. =1 for j-l«:i 2. ^-,1.3 A Summary of Maximum Gains In later sections the value of m. ^ or m . associated with the J+P-2 J maximum gain over a special sequence with given boundary mode digits will be of interest. Whether the value of m. _ or m. is desired will depend on J+P-2 J whether a left or right directed recoding is being analyzed. To distinguish these two cases G(m. _, P, p, m. n ) will be listed as J-1 J+P-l G(m. _, Po p. m. _ i m. _) and G(m.: m. ., P. p, m. , ) in Tables ^-1 and j-1' *' J+P-1' J+P-2' v j' j-1' ' *' J+P-l k-2 respectively. The optimum mode digit sequence associated with a given set of allowable boundary mode digits usually does not allow both values of -5fc- OJ I ft + •i~3 o -p > •H -p rH ft •H o •H H i W 3 H II OJ I ft + •<-3 ft + •<~3 ft ft H i IO o OJ I ft + I ft + ft ft H i IO 1 ft + ft ft OJ [si ft i o H ! o o H O O H H OJ H Al II Al Al eg ft ft tsl ft ts) ft tsl O H ft CD ft O OJ ft O o o o H H H OJ H Al II Al Al S3 ft C3 ft ft D ft o o o o H O O O OJ OJ OJ -=f OJ Al Al II Al Al < ft < ft < ft < ft < ft ■55- o -p CD H > i •H ft -p + ri T"3 H £ 0) ft •\ ft Pj •H *n tf ft O *\ g H 3 i 6 ■•"a •rH S i9 '0\ s o II CVJ H pq < Eh ft + ••""3 ON ft ft ! • |_ 3 IO IO I ft + ft i ft ft ft IS] ISJ ft ft i I o o o o Al IS3 ft o Al ft ft Al ft IS1 ft S3 ft [Xl 1=3 ft ft o o o o o o o ft H ft OJ H Al ii Al Al ft ft ft D ft o o o o o o o o o o H ft OJ CM -3- OJ CVJ Al II Al Al Al < ft < ft < ft < ft < ft ■56- m and m.o In many cases the value which is not included can be specified J+P-2 J as an additional restriction on the maximum gain. The method of evaluating the maximum gain under this restriction is similar to the one used in the preceding sections. The results of these calculations are included in Tables 4-1 and 4-2. A dotted line indicates that the value of m . _ or m. J+P-2 J is not compatible with the given boundary mode digits. The maximum gain with m unspecified is always the larger of G(m. n , P, p, m. ; 0) and G(m ,, P, p, m. ., ; l). The maximum gain with m. unspecified is similarly j-1' * *' J+P-l J defined. 4.1.4 Choice of the Next Mode Digit In left or right directed mode functions the choice of m. is determined by K. or S. when m. is arbitrary with respect to the range restric- tion. In this analysis K. and S., as defined by Eqs . 3-3 an( i 3-6, are minimal characteristic functions. They must determine m. such that the recoded representation has a maximum number of zero digits for all y £ Y. 4.1.4.1 An Example It can be shown that the minimal requirement is not sufficient to uniquely define m. in all cases. For example, consider a left directed minimal recoding in which m. -0 ; y. =y. = 1 and y. = for < j < i - 1. Decomposition of this partial representation in accordance with Definition 4-8 yields a ZAU series of special sequences, where Z contains (i - l) elements, A contains two elements and U contains one. The choice of m. in this case is l clearly independent of the range restriction. It is equally clear by the results of the preceding section that the maximum gain in zeros over the three sequences combined is a function of the mode digits at their boundaries. -57- z A U m ra o m l *•• m i-2 m i-l m. l Vi = X ... o o 1 i The boundary mode digits are 0, m. , and m. . Since m. =0, Theorems 4-8 and 4-9 apply. Because p = 1 in the U sequence, G(m., U, 1, 0) = for m. = or 1. Our goal is to maximize the zero gain over all three sequences, so it is necessary to examine the effect of m. on A. By Theorem 4-12, G(m. , A, 2, 0) = when m = 0. By Theorems 4-13 and 4-15, G(m. , A, 2, l) = for m. = or 1. Thus G(m. , A, 2, m., U, 1, 0) = G(m. , A, 2, m. ) + G(m., U, 1, 0) = when m. = or 1. We still can not say that an arbitrary choice of m. will yield a minimal recoding of the given representation. Note that m. = demands that m. _ = to achieve a maximum gain of zero over AU. If the maximum gain over 1-2 the special sequence to the left of A is always less than m. = than when m. = 1, the optimum choice for m. is 1. In this case the Z sequence appears on the left of A and has a maximum gain of zero when m. = since m =0. Since m. = necessarily or by choice when m. = or 1, a minimal recoding of ZAU can be achieved with m. = or 1. The maximum gain in either case is zero. The two possible minimal recodings are given below. z A u z A u m i 1 1 1 1 X | 1 1 1 1 1 1 X 1 1 1 1 1 1 I -58- It is easy to construct other examples in which the minimal char- acteristic uniquely determines m. . If the partial representation is a U sequence with m. = or 1 and p > 3^ then m. = 1. If the partial represen- tation is a Z sequence with m. n = or 1, then m. =0. l+l ' l Although these examples are stated in terms of a left directed recoding_, their counterparts can be constructed for right directed recodingSo In either case^, the choice of m. to achieve a minimal representation may or may not be arbitrary . This suggests a class of minimal characteristic functions corresponding to the class of minimal mode functions . 4.1, ^.2 Special Restrictions on the Set of Independent Variables The theorems of section 4,1.2 and the preceding example make it apparent that the minimal characteristic function, K. , must depend on y.,-, and some number of digits to its left. To simplify the development of the class of MiniMal K. and, therefore, the class of m ini m al L.,<£, * , is initially 1 ' » 1/ ' 1+1 restricted to those digits which lie to the left of y. n . It will be shown & J i+1 later that these classes include K. and L. in which i. n contains digits on l i l+l both sides of y. J i+1 A minimal L(y) may consist of n identical minimal L. . Even with Y. , restricted. L _ may be a function of n + 2 bits, i.e., \ l+l ' n-1 n-1 = L _ (X 3 y , i ) where Y = (y.; < i < n - l). To allow L. to have the n-1 n' n n n x — — i same Boolean form for < i < n - 1, we let YT 1 , include at least 'n digits - - ' l+l to the left of y. even though (n - i - l) of these are always duplicates of y . Because of this convention and the fact that we are dealing with minimal I., it is also possible to define y n = \ ■, = 1> n (\ . y . i ). l' r J -1 -1 -l x o' o^ o Y 1 It is easy to visualize a recoder in which Y7 . is restricted as J l+l described above. Imagine that the recoding occurs at the n position of a -59- shift register containing y. During each recoding step, y is shifted right th one position with y duplicated in the sign position. The n position and any number of positions to the left of the n up to and including the position are inputs to the recoder. A similar set of comments apply to right directed recodings. Here again the theorems of section U.1.2 make it apparent that the minimal char- acteristic function, S., must depend on y. and some number of digits to its right. The development of the class of minimal S. and^ therefore^ the class of minimal R.,l/l, is simplified by restricting YV to those digits which lie to the right of y. . As in the left directed case,, it will be shown later that these classes include S. and R. in which YV contains digits on both sides of 11 l y i' A minimal R(y) may consist of n identical minimal R. . We note that R may be a function of n + 2 bits even though YV is restricted, i.e., P = R (p ... y , i ) where i = (y. : 1 < i < n). By allowing TV to include o o -1' o o o i' — — 1 at least n digits to the right of y. even though i of these are always zero, R. may have the same Boolean form for 1 < i < n. Because of this convention and the fact that we are dealing with minimal R., it is also possible to define = p = R (p ., y , Y^). n n n-1 n' n A recoder in which YV is restricted as described above is easily visualized, The recoding in this case occurs at the position of a shift register containing y. During each recoding step, y is shifted left one position with a zero inserted in the n position. The position and any number of positions to its right up to and including the n are inputs to the recoder. -60- 4.1.4.3 Criteria for Choosing the Next Mode Digit The method of selecting the next mode digit in either a left or right directed recoding may be described as a generalization of the technique used in section 4.1.4.1 In the left directed case the partial representation is treated as a unique series of special sequences with X. representing the right hand boundary condition for the right most sequence, In the right directed case the partial representation is treated as a unique series of special sequences where p is the left hand boundary condition for the left most sequence. In either case the analysis begins by considering the given boundary mode digit and the special sequence associated with it. In certain cases several special sequences beyond the first must be considered before the choice of m. is determined. The following definitions and theorems establish the criteria upon which this choice is based. Definition 4-11 : Partial Sequences Let X(w) define a left or right directed partial sequence. X T (w) = (y. ., , ... v., y. .,) L \ / VJ i+l-w' J i' J i+l y X R (w) - (y., y. +1 ... y. +w ) where < w < n + A with A - if n is even and A = 1 if n is odd. X and X can each be represented by a unique series of special L n sequences. Let these sequences be denoted by P where P is associated with iC _L the given boundary mode digit X. or p . . x L (w) = p t ... p k ... P p l x r («) = p i; p 2 ... P k ... P -6i- The variable w is related to t by t w(t) = Ep (4:7) where p n is the number of digits in P, . If w - n + A, the total number of k k partial sequences will be designated by T. Thus,, w(t) = n + A. Definition 4-12 : Allowable Sequence of Boundary Mode Digits A sequence of boundary mode digits is allowable with respect to a given m. , m. and X(w) if and only if adjacent boundary mode digits satisfy Theorems 4-3, 4-7 and 4-11 . An allowable boundary mode digit sequence with respect to a given X(w) will be denoted as follows, B(m._ ,,\. m._ / 1 1 m. ) = (m._ / , \ ... m._ , n \. m._ / \; m. ) v i+u(t)' i+u(o.r i' v iTu(t) iTu(l)' iTu(o)^ i' The function u(t) is defined as t u(t) = -1 + Ep, (4:8) k=l k where u(o) = -1 Definition 4-13: Composite Gain Function The composite gain over X(w) with m. and m. given is defined as follows -62- G[X(w), B(m. Tu(t); m. ±1 ; m.)] = G^^y P ±t P] _, m. ±1 ; m. ) + J Q G(m i-u(k)> V V %(k-l) ] .K. — c. Definition ^--l^ : The Set of Optimum Boundary Mode Digit Sequences Let Q(m._ / , \= m. n ; m.) denote the set of all B(m._ /, >, . m. _, ; m. ) v i+u(t)' 1+1/ l i+u(tj' i+l' l which for a given X(w), m. and m. cause G[X, B] to assume its maximum value, G[X(v), Q(m._ ,,\. m. , ; m.)J„ The following theorem provides a method of generating Q( m - — t^M m - -, y m - ) given X(w), m. _ and m. . More importantly, it yields the i+u(tr i±l i i±l i maximum composite gain,, G[X, Q] . Theorem U-l6: Given X(w), m. , and m. , let l+l i' G[X(w - p t ), Q(m._ u(t _ ir m. ±1 ; m.)] = gO*^^)). Let G Q (t) - G(m._ u(t) , P^ p t , 0) + gO*^^ = 0) and Gl (t) = G(m._ u(t) , P^ p t , l) + gO^^) = D where m._ / \ = or 1, lTu ( t ) If G (t) > G^t) (^:10) then m._ / ,\ = is the (t - l) boundary mode digit in any element of Q(m._ /, v. m. .; m. ) and g(m._ /, %) = G (t). i+u(t)' i+l' i toV iTu(t) o -63- If G Q (t) < G 1 (t) (4:ll) \th m. /, \ = 1 is the (t - l) boundary mode digit in any element of Q(m i+u(t)> II W m i } and g(m i-u(t) } = G l (t) - If G Q (t) = G 1 (t) (4:12) th m / \ = or 1 may be the (t - l) boundary mode digit in any element of Q(m._ /.>, m. .. ; m. ) and g(m._ ,,% = G (t) = G, (t). i+u(tj i±l i iTu(tJ o 1 In these equations G(m._ , , \, P, , p, , m /, ., \ is assigned an ^ v i+u(t)' V t' i+u(t-l) arbitrarily large negative value if m /, % and m.^. - _, s are not allowable J to to i+u(t) lTu(t-l) boundary mode digits with respect to P t Proof: For a given value of m._ / ,\. G(m._ / \, P , , p, , m._ /, n \) must have to i+u(t)' i+u(tj' t' t' i+u(t-l) a finite value for either m._ /_, n \ = or 1 or both since at least three sets i+u(t-l ) of boundary mode digits are allowable for any special sequence. Since P. . m. , and m. are given, g(m._ /, \ = 0) = G(0, P n , p, , m. . ; m. ) 1' i±l i ' i+u(lj ' V 1 i±l i and g(m._ ,. \ = 1 ) = G(l, P, , p, , m. n ; m. ) . If m /n \ and m. . are not iTu(l) v ' 1 } *l/ i±l' i i+u(l) i±l st allowable mode digits with respect to P n , then m /. \ can not be the 1 1 i+u(l; digit of any optimum boundary mode digit sequence. Taking the other value of ■ -r /-, \) g( m -^ f n \ ~ 0) an ^ g(m._ /_x = l) are formed as follows. i+u(l) i+u(2) i+u(2j m g(m i+u(2) = 0) = G( °' P 2' P 2' m i+u(l) } + g(m iTu(l) ) g(m i+u(2) = X) = °" (l > P 2' P 2> m i+u(l) } + g(m iTu(l) ) If either of these are negatively infinite, the maximum composite gain over P n P^ and the choice of m._ fn \ are clearly defined. The process continues 1 2 l+u ( 2 ) when g(m._^ /.% = 0) and g(m._ / , \ = l) have finite values. iTu(t) iTu(t) -6k- Assume that g(m._ /, , \ = O) and g(m._ , . N = l) are finite for toV lTu(t-l) &v i+u(t-l) some t > 1. The value m / s must assume for maximum composite gain over X(n) is not obvious since the special sequences beyond the (t - l) have not been examined. It is possible to avoid simultaneous consideration of all these sequences by computing the maximum composite gain corresponding to the sets Q(m /.\ = 0, m. n ; m.) and Q(m._ ,,\ = 1, m. _,: m.). Depending on i+u(t) ' i±l' l i+u(t) 1+1 1 the special sequences which follow the (t) sequence, the elements of either or both of these sets represent partial optimum boundary mode digit sequences . This follows from the fact that the optimum boundary mode digit sequence must include m._ ,, % = or 1. i +u ( t ) If m._ /, N = 0, then by trichotomy G (t) must be greater than, less i+u(t) ' o ■ ' than or equal to G (t). If G (t) > G, (t), then G (t) is clearly the maximum composite gain over X(w) given m. _, and m.. with m._ ,, \ = 0. Therefore, * & v / b 1±1 x i+u(t; ' g(m.- ,, % = 0) = G (t ) . It follows that m._ /, n \ = must be the (t - l) i+u(t) o v i+u(t-l) boundary mode digit of Q(m,_ / , » = 0, m. , ; m. ). A similar argument follows i+u(t) ' 1±1' 1 if G (t ) < G., (t ) . In this case g(m._^ ,, % = 0) = G.ft) and m._ ,, . \ = 1 must o v l x ov iTu(t) 1 i+u(t-lj be the (t - l) boundary mode digit of Q(m / \ = 0, m. ; m. ). Likewise if G (t) = G n (t) = g(m.__ . v = 0), then m._ ,, _ v = or 1 may be the (t - l) o 1 toV i+u(t) ' i+u(t-l) boundary mode digit of Q(m._ / \ = 0, m. ; m.). If m._ /, ^ = 1» the same arguments apply but note that G (t) may lTu ( t ) ' o v not bear the same relationship with G, (t) as in the case m._ ,.\ = 0. It r l v i+u(tj follows that the (t - l) boundary mode digit in Q(m / \ = 0, m. ; m. ) and Q(m._ / . \ = 1, m. ,; m. ) may not be the same. Note also that v i+u(t) ' i±l' i' J g(m / , \ = 0) is not necessarily equal to g(m ,,\ = l) even if G (t) bears i+u(t) j i e\ 1+u (t) o v the same relationship to G (t) in both cases. -6 5 - Since P is the only special sequence examined initially, it is necessary to consider the choice of m. when m.— ,_, \ = and 1 assuming that J i i+u(i; to both of these values are allowed. The possible choices of m /n \ and m. can i+u(l) 1 be divided into three basic combinations. Each of the following three theorems concerning the optimum choice of m. deals with one of these l combinations . Theorem h-YJ i If P., and m. , are such that only one value of m._ /., \ is 1 i±l iTu(lJ allowed, then m. is never arbitrary and is always determined by the optimum mode digit sequences corresponding to the allowed value of m._ /_, \. i+u(l; Proof : Tables ^-1 and k-2 show that the following cases satisfy the hypothesis Left Directed Right Directed G(0, Z, p > 1, 0; 0) = G(l; 1, Z, p > 1, 1) = -p. G(l, U, p > 1, 1; 1) = p U G(0; 0, U, p > 1, 0) = In all cases m. _, P., and the allowed choice of m._ /. N establish i±l' 1' i+u(l) a single optimum mode digit sequence over P in which the value of m. is fixed, By Theorems h-k } h-G } k-Q and J+-10 any alteration to permit a different value for m. will produce a disallowed mode digit sequence. Theorem U-l8: If P., and m. . are such that m._ /n N 1 l+l iTu(l) may be or 1 and the m. corresponding to the maximum gain over P.. has the same fixed value in either case, the optimum choice for m. is this value. ■66- Proof : Tables 4-1 and 4-2 show that the following cases satisfy the hypothesis Left Directed Right Directed G(0; 0, Z, p > 2, 0) = G(0; 0, Z, p > 2, l) = -1 G(0, A, p > 2, 1; l) =• G(l, A, p > 2, 1; l) = G(l; 1, U, p > 2, 0) = Pu -1 G(l; 1, U, p > 2, 1) = J \J G(l; 1, A, p > 2; 0) - -1 G(l; 1, .A, p > 2; l) = Since the optimum mode digit sequences associated with m.__ , \ - and 1 all include the same fixed value for m., any change in m. will produce either a disallowed mode digit sequence or a lower gain over P . Therefore, regardless of the special sequences beyond P , the optimum value of m. is determined. Theorem k-lQi If P n and m. n are such that m.— ,. \ may be or 1 and the m. 1 l+l i+u(lj 1 corresponding to the maximum gain over P has a different value in each case, the optimum choice of m. is determined by the following procedure. Starting with t = 1. Q(m. /,\ = 0, m. n ; m. ) and ' v i+u(tj ' 1+1 1 Q(m / \ = 1, m. ; m. ) are developed according to Theorem k-±6 until one of the following conditions occurs. m. = if i G[ X > Q(m i-u(t)' m i±l' ° )] > G[X ' Q(m iTu(t)' m i±l' 1)] (k:13) for m /, \ = and 1. i+u(t ) -67- m. = 1 if 1 G[X, Q(m m iTu(t)' i±l i 0)] < G[X, Q(m iTu ( t ), ^ i±1 ^ 1 )J (^:1^) for m /, v = and 1. i+u(t ) m. = or 1 if i G ' X > «»iTu(t)' °W 0)1 = G[X ' Q(m iTu(t)' "W 1)J (k:13) for m . _ / ^ \ = and 1 , i+u(t ) Proof ; Tables ^--1 and k-2 show that the following cases satisfy the hypothesis Left Directed G(0, Z, p > 1, 1; 0) = -1 G(l, Z, p > 1, 1} 1) = -p z G(0, U, p > 1, 0; 0) - G(l, U, p > 1, 0; 1) = Pu -1 G(0, A, p > 2, 0; 0) = G(l, A, p > 2, 0; 1) = -1 Right Directed G(0; 0, Z, p = 1, 0) = G(l; 0, Z, p = 1, 1) = -1 G(0; 1, U, p = 1, 0) = G(l; 1, U, p = 1, 1) = 1 G(0; 0, A, p > 2, 0) = G(l; 0, A, p > 2, l) = In these cases the conditions described by Eqs . k\Y^, ^:1^- and U:15 are never satisfied for t = 1 since Tables ^— 1 and k-2 show that G[X, Q(m._ u(l) = 0, m. ±1 ; 0)] > o[X, Q(m„ u(l) = 0, m.^; l)] G[X, «(m l:pu(l) = 1, mi±1 ; 1)] > 3[X, , <, or equal to G[X, Q(m._ ,,\. m. n ; l)] for either value of i+u(t) i±l' m._ / , \ "by the law of trichotomy. If one of the conditions described by iTu(t) Eqs. 4:13, 4:l4 and 4:15 is satisfied after examining t special sequences, it is not necessary to consider additional sequences. This follows from the fact that the maximum composite gain over the special sequences beyond P must occur for m._ , « = or 1, i+u(t ) If the Eq. 4:13 is satisfied for example, then ° [X > «K*u(t)< °W ° )] > ~ GlX ' Q(m Wu(t)' m i±l' 1)] for either value of m /, \. Thus m. = is the only value of m. that can be i+u(t) 1 l associated with the maximum composite gain over the entire partial sequence regardless of what the special sequences beyond P happen to be„ Similar statements apply if Eqs. k:lk or 4:15 are satisfied for m , \ = and 1. If none of the conditions given by Eqs. 4:13, 4:l4 and 4:15 occur for t < T, then one must occur when t = T. Since m / \ = y . in a left ' l+u(Tj -1 directed recoding and in a right directed recoding, one of the conditions must be satisfied for either m , \ = or m ,\ = 1. i+u(T) i+u(t) The criteria established by Theorems 4-17, 4-l8 and 4-19 will be used to develop the subclasses of restricted, minimal L. and R. in sections 4.2 and 4.3 respectively. •69- k.2 The Subclass of Restricted, Minimal Left Directed Mode Functions This section is divided into two subsections. In the first sub- section the set consisting of all left directed partial sequences, X (n + A), J_i and X. -, is partitioned into three subsets by an exhaustive case analysis, l+l These subsets correspond to the three possible ways of choosing X. to achieve a minimal recoded representation. In the second subsection these subsets are used to establish a necessary and sufficient restricted, minimal L. with an auxiliary set of min terms. The subclass of restricted, minimal L. contains all L. that can be formed by joining any combination of min terms to the necessary and sufficient L. . The particular L. which yields the canonical, minimal representation is investigated. ^+.2.1 Case Analysis of the Partial Left Directed Sequence Theorems ^--17^ ^-18 and U-19 are used to partition the set (X (n + A), X. ) into three subsets corresponding to X. = 0, X. = 1 and X. - or 1. For convenience, the notation for the maximum composite gain is modified so that the boundary mode digits separate the special sequences. For example, if UA has boundary mode digits X. ,^\ = 1, X, /n N = 1 and i-u(2J i-u(l) X - 0, then the maximum composite gain appears as G(1U1A0; X. ) = p - 1. For identification, the maximum gain over each sequence is summed in order of occurrence. No attempt is made to show all possible optimum boundary mode digit sequences . Case I: X , = 1 l+l Let P., = U so that y. . =1. Theorem +-17 applies so X. - 1 1 l+l l Let P n ^ A so that y. n =1. Theorem U-l8 applies so X. = 1 1 J i+1 ** l -TO- Case II: \. - = 1 1+1 Let P = Z so that y = 0. Theorem 4-19 applies, so the opt lmum choice of X. depends on sequences to the left of Z UZ; Pu > 1, 1 < p z < 2 Table k-1 and Theorem 4-l6 are used to obtain the following composite gains G(0U0Z1; 0) = - 1 G(0U0Z1; l) = + q G(1U0Z1; 0) = ( Pu -1) - 1 G(1U1Z1; 1) = Pu - p z If p z = 1, q = -co; if p = 2, q = -2, satisfied, so AUZ must be analyzed. None of Eqs . 4:13, k:lk or 4:15 are AUZ; p A > 2, Pu > 1, 1 < p z < 2 G(0A1U0Z1; 0) = + (p„-l) - 1 G(1A1U0Z1; 0) = + (Py-l) - 1 G(0A1U1Z1; l) = + Py - p z G(1A1U1Z1; l) = + p T . - p 7 U Li If p = 1, Eq. 4:l4 is satisfied so X. = 1. If p = 2, Eq. 4:15 is satisfied so X. =0 or 1. l UZ; p > 1, p > 3 G(0U0Z1; 0) = - 1 G(0U0Z1; l) = - 2 G(1U0Z1; 0) = ( Pu -1) - 1 G(1U0Z1; 1) = (Py-1) - 2 Eq. 4:13 is satisfied, so X. - 0, -71- AZ; P A > 2, 1 < p z < 2 G(0A0Z1; 0) = - 1 G(1A0Z1; 0) = -1 - 1 G(0A1Z1; l) = - p G(1A1Z1; l) = - p r Since none of Eqs . 4:13, h:lk or 4:15 are satisfied, UAZ and ZAZ are analyzed next. UAZ ; p n > 1, p > 2, 1 < p < 2 U A G(0U0A0Z1; 0) = + - 1 G(0U0A1Z1; l) = + - p r G(1U1A0Z1; 0) = p - 1 - 1 G(1U1A1Z1; 1) = ?u + - p z AUAZ ; P A > 2, P y > 1, P A > 2, 1 < p z < 2 G(0A1U1A0Z1; 0)=0+p-l-l G(1A1U1A0Z1; 0)=0+p-l-l G(0A1U1A1Z1; 1 ) = + p TT + - p 7 U Zi G(1A1U1A1Z1; 1 ) = + p TT + - p^ U Zi If p = 1, Eq. 4:l4 is satisfied so X. = 1. If p = 2, Eq. 4:15 is satisfied Li 1 Zj so X. =0 or 1. l ZAZ ; p z > 1, P A > 2, 1 < p z < 2 G(0Z0A0Z1; 0) = + G(0Z0A1Z1; l) = + - p r G(1Z1A0Z1; 0) = -p - 1 - 1 G(1Z1A1Z1; 1) = -p z + - p z UZAZ; p > 1, p > 1, p > 2, 1 < p < 2 U A G(0U0Z0A0Z1; 0)=0+0+0-l G(0U0Z0A1Z1; l)=0+0+0-p r G(1U0Z0A0Z1; 0) = (p n -l) +0+0-1 G(1U0Z0A1Z1; l) ( Pu -1) +0+0 If p„ = 1, Eq. 4:15 is satisfied so \. =0 or 1. Zi i If p„ = 2, Eq. 4:13 is satisfied so X. = 0. z i -72- AZAZ; P A > 2, p z > 1, p A > 2, 1 < ?z < 2 G(0A0Z0A0Z1; 0) = + + 0-l G(1A0Z0A0Z1; 0) = -l+O+O-l G(0A0Z0A1Z1; l) G(1A0Z0A1Z1; l) + + - p r = -1 + + If p = 1, Eq. 4:15 is satisfied so X. =0 or 1, CJ 1 If p = 2, Eq. 4:13 is satisfied so X. = 0. Li 1 AZ; p A > 2, p z > 3 G(0A0Z1; 0) = - 1 G(1A0Z1; 0) = -1 - 1 G(0A0Z1; l) = - 2 G(1A0Z1; l) = -1 - 2 Eq. 4:13 is satisfied so X. = 0, Case III: X. _ = l+l Let P = U so that y. =1. Theorem 4-19 applies so the optimum choice of X. depends on sequences beyond U. The order of decomposition insures that only an A sequence may appear on the left of U. AU; P A > 2, P y = 1 Table 4-1 and Theorem 4-19 a ^ e used to obtain the following composite gains . G(0A0U0; 0) = + G(1A0U0; 0) = -1 + G(0A1U0; l) = + G(1A1U0; l) = + ■73- UAU; Pu > 1, p A > 2, Pu = 1 G(OUOAOUO; 0) = + + G(0U0A1U0; l) = + + G(1U1A0U0; 0) = p - 1 + G(1U1A1U0; l) = p + + AUAU; p A > 2, Pu > 1, P A > 2, ^ = 1 G(0A1U1A0U0; 0) = + p-l + G(1A1U1A0U0; 0) = + p-l + G(0A1U1A1U0; l) = + p+0 + G(1A1U1A1U0; l) = + p+0 + Eq c ktlk is satisfied so X. = 1 l ZAU; p > 1, p > 2, p = 1 A U G(OZOAOUO; 0) = + + G(0Z0A1U0; l) = + + G(1Z1A0U0; 0) - -p - 1 + G(1Z1A1U0; l) = -p_ + + Lx AZAU; p A >2, p z > 1, p A > 2, V]J = 1 G(OAOZOAOUO; 0)=0+0+0+0 G(1A0Z0A0U0; 0)= -1+0+0+0 G(1A0Z0A1U0; l)=0+0+0+0 G(1A0Z0A1U0; l)= -1+0+0+0 Eq. 4:15 is satisfied so X. = or 1, UZAU; Pu >1, V„> 1, P A > 2, p TT = Z - ' ^A - U G(OUOZOAOUO; 0)=0+0+0+0 G(0U0Z0A1U0; l)=0+0+0+0 G(1U0Z0A0U0; 0) = (Py-l) +0+0+0 G(lUOZOAlUO; l) = (p y -l) +0+0+0 Eq. i+ : 15 is satisfied so A.. =0 or 1, ■lh- AU; P A > 2, Pu > 2 G(0A1U0; 0) = + (Py-2) G(1A1U0; 0) = + (Py-2) G(0A1U0; l) = + (Py-l) G(1A1U0; l) = + ( Pu -1) Eq. k'.lk is satisfied so X. - 1. l Let P., = A so that y. . 1 i+l "beyond A must be considered. 1. Theorem U- 19 applies, so sequences UA; Pu > 1, p A > 2 G(0U0A0; 0) = + G(0U0AG; l) = - 1 G(1U0A0; 0) = (Prj-l) + G(1U1A0; l) = p - 1 AUA ; p A >2, Pu > 1, p A > 2 G(0A1U0A0; 0) = + (Py-l) + G(1A1U0A0^ 0) = + (Py-l) + G(0A1U1A0; l) = + p - 1 G(1A1U1A0; l) = + p - 1 Eq. U : 15 is satisfied so \. =0 or 1. ZA; p z > 1, p z > 2 G(0Z0A0; 0) = + G(0Z0A0; l) = - 1 G(1Z1A0; 0) - -p + q G(1Z1A0; l) = -p - 1 If p = 2, q = -oo; if p > 4 ; q = -1. None of Eqs . ^:13, htlk or U:15 are satisfied, so UZA and AZA are analyzed next. ■75- UZA; p n > 1, p > 1, p > 2 U A G(OUOZOAO; 0) = + + G(lUOZOAO; 0) = (Py-l) +0+0 Eq, 4:13 is satisfied so X. = 0. G(OUOZOAO; l) = + - 1 G(1U0Z0A0; l) = (Py-l) +0-1 AZA ; p > 2, p 7 > 1, p > 2 A A G(OAOZOAO; 0) = + + G(1A0Z0A0; 0) - -1+0+0 G(OAOZOAO; l) = + - 1 G(1A0Z0A0; l) = -1 + - 1 Eq. 4:13 is satisfied so X. = 0, Case IV: \. , = i+I Let P., = Z so that y. . =0. Theorem 4-17 applies so X. = 0. 1 i+I l This completes the partitioning of the set (X (n + A), X. ). Table 4-3 contains a summary of the results. In this table X is used to represent the portion of the partial sequence that is not given explicitly in terms of special sequences. The special sequences and their corresponding lengths are listed in order of occurrence. If the length is fixed, the number of digits is given, otherwise p , p or p represents an arbitrary length. 4.2.2 Derivation of the Restricted, Minimal Left Directed Mode Functions The minimal L. derived in this section have X. , , y. n and l i+I' i+I YT J =(y. .;05 O H O O O H O O O O rH O rH o o H rH o o o + l-l X X X o H o X X! X i >< I i I i i X > rH o CO w Eh O 3 o w H O ft S CO H sa W CO p ft ft rH OJ CM rH H OJ OJ co p ft < ft P ft < ft < ft < ft Al < ft < ft Al < ft P ft < ft P ft Csl ft IS] ft (Si ft csl ft eg ft tsl ft < ft < ft P ft < ft D ft p ft < ft < ft CO w H CO p X < X g 3 X g 3 s 3 <; p n cq x < p < XXX g X ^ ^ ^ CNl CnJ X p < X X CO < o H ■77- H H rH •H ^ o\ <"\ ^ nH H O O o o o o + o O O o o o o o •H ^ rH + rH H H H H rH rH o •H ^ •H H rH .H H O o o , t>S H i O ° O O ° ° ° • •H !>j • • • • • • • X • H • • rH o O 1 -H O O O ■ • • 1 • • ■ • • ■ • 1 1 • ■ • • rH rH H ' ^~-. i H X! H H o „ O ! < •r"3 + •H O O ■ ■ ■ • 1 a , (, X . 1 i-i X 1 X X X 1 X 1 1 X 1 X X X X X X X 1 X CO w Eh H cu H -H < < < &a O ft ft ft ft S < A| < < ^3 ft ft ft p tsl tsl ft ft ft H P P IN) ts) O W ft ft ft ft < p < w o ft ft ft ft s < < < P CO H ft ft ft ft 8" w CO CO P CD D D < < < Cxi P < <: 3 p N cq X H ^) X E^ < P < K < < £D X X X w X X X CO H CO H < M > o 1 M H -78- Definition 4-15: X. = NL. (\. n , y. ,, Y 1 _ ) 1 i i+l' i+l' l+l Let NL. be a minimal left directed mode function in which l Y i + 1= (y i-j' 0 ( °°° HOlO); (... 110) Therefore, two distinct types of Boolean functions may be joined to NL. (l, 0, Y7 , ). The general form of each is expressed below. AL. . (1, 0, Y 1, . ) = y. „, ij v ' ' i+1' i-2j ir - 5k-i y i-2k a 10 (k:l&) HL„(l, 0, Y^) ==y._ 2 . 1C— U ij ■i+i' rd-i b 10 (^■19) In these equations, a. . and b. . represent arbitrary Boolean functions of the / \ o(n + A - 2j ) (n + A - 2j ) digits to the left of y. . Any one of the 2^ -i- *"^- j different a. . and b. . functions may be associated with each AL. . (l, 0, Y7 -, ) ij ij J ij ' ' i+l -80- and BL. (l, 0, Y7 , ), and any combination of these functions for 1 < j < n* may be joined to NL. (l, 0, Y7 , ) to form a particular L. (l, 0, Y7 ) . The partial sequences associated with Case III of Table 4-3 are used to develop the family of L. (0, 1, Y7 ) functions . L. (0, 1, Y7 ) must be 1 for all of the following partial sequences beginning with y. „ ... y ± _j ... y^i = (••• 1101 ••• 01; ... ; ... 1101; ... 11) Since these are the same sequences as those listed for L. (l, 0, YT" n ), the l ' ' l+l 3 necessary and sufficient L. (0, 1, Yl ) is also defined by Eq. 4:17. NL.(0, 1, Y 1 _ ) = NL.(1, 0, Y 1 n ) (4:20 ) i\- l+l i v ' ' l+l v L. (0, 1, Yf - ) may be 1 for any of the following partial sequences beginning with y. . ... y **« y±-i? ± = (••• ° 0101 ■•■ 01 ^ ••■ > (••• 00101 )i (••• ° 01 ) ... y i . J ... y ± . 1 y ± = («.. noi ... 010); ... ; (... 11010); (... 110) This set of partial sequences is identical to the set obtained for L. (l, 0, YT 1 , ). Therefore, the two general types of Boolean functions that may be joined to NL. (0, 1, YT 1 ) to form a particular L. (0, 1, Y7 , ) are defined by Eqs h:lQ and k:lQ with a. . and b. . replacing a. . and b. . . The subclass of restricted, minimal K. functions is formed by using Eq. 3-3« Let NK. represent the necessary and sufficient K. . NK. (Y 1 _) - NL.(0, 1, Y^ _ ) = NL.(1, 0, Y^ . ) (>:2l) l i+l' l ' } l+l i v } 3 l+l ■8l- Note that NK. does not depend on y. , . The general forms of AK. . and BK. . 1 i+l ij ij are given below. AK. .(y. n , Y L n ) = y. n AL. . (0, 1, Y 1 _ )V y. .AL, .(l, 0, ^ . ) lj^i+l' i+l y J i+1 ij i+l' J i+1 ij v ' ' i+l (4:22) BK. .(y. ., Y 1 . ) = y. n BL. .(0, 1, Y 1 . ) V y. ,BL. .(l, 0, Y L , ) ij w i+l' i+l i+l ij i+l J i+1 ij i+l (4:23) Any combination of AK. . and BK. . joined to NK. forms a particular K. . ij ij i i These functions are used to define NL., AL. . and BL. .. NL.(\. ., y. _, Y L _) = X. _y. . V (\. n V y. JNK. (4:24) i i+l i+l' i+l i+l i+l i+l i+l i AL. .(X. _, y. _, Y 1 . ) = (X. _ V y. , )AK. . (4:25) IJ V 1+1' J l+1 ; 1+1 V 1+1 J l+1 IJ \ Si BL. .{X. ., y. ., Y 1 _ ) = (\. . V y. , )BK. . (4:26) l j v i+l' J i+1' i+l ' v i+l J i+l y ij v ' Any minimal L. (X. ,, y. _, Y7,)in which FT" n includes only those digits to J i v i+l' J i+1' i+l ' i+l J & the left of y. can be constructed by joining an appropriate combination of AL. . and BL. . to NL. . To reduce the number of L. which must be considered, the following i restrictions are imposed. Let L. (0, 1. r J = L. (l, 0, Y7 1 , ) with i ' i+l i v ' ' i+l a.. =b.. = a. . =b.. =1 for all j. Under this restriction Eqs. 3:22 and 3:33 ij id id ij become AK. .(Y L .) = AL. .(0, 1, Y 1 J = AL. ,(l, 0, Y 1, J (4:27) ij i+l ij i+l id 1+ 1 BK -J . .(Y 1 _) = BL. .(0, 1, Y? .) = BL. ,(1, 0, Y 1 _) (4:28) ij i+l i,i i+l ij i+l ■82- Since NK. is not a function of y. , . any K. formed under these restrictions 1 i+l' l Y 1 is a function of Y7 only. The minimal K. constructed under these restrictions are called l symmetric, minimal left directed characteristic functions. Likewise all L. formed with symmetric, minimal K. are called symmetric, minimal left directed mode functions. Symmetric, minimal mode functions are also restricted. The functions defined below are used to illustrate certain symmetries in the subclass of symmetric, minimal L. „ Definition k-l6: AK. , BK., AL. and BL. l' l' l i n* AK. =~V AK. . (4:29) j=l J n* BK = V BK (4:30) j=l J AL i = ^i + l^i + l^i (U:31) BL. = (X. +1 Vy i+1 )BK. (4:32) In the developments which follow, it is convenient to simplify NK. , AK. and BK. and obtain their complements and duals. The lemmas in the 11 Appendix are introduced for this purpose. Using Lemmas A-l, A-2 and A-3, NK. , AK. and BK. may be written as follows . •83- n* j-1 ™ ± - Vyi.2j.iTyi.2k-2 (4:33) j=0 J k=-l n* j-l _ n M i = "V Vi- 2J T yi. 2k -i ■ BK i <^> J— 1 K-U i-fe^S^i-v (u:35) j-i - 2J k=o ' i - A simplified expression for NK. is obtained starting with Lemma A-k , l n*-l j-l _ _ n*-l M i = V y i-2j % y i-2k-l V (y i-2n^ ^n*-^ % y i-2j-l j=0 ° k=0 j=0 In the worst case i = n - 1, so y^.^V V^^-l = y -l-A^ y -2-A" By definition y_ ± _ A = y_ 2 _ A for A = or 1. Thus y ± _ 2n * = y^n*-! for a11 i ' n* j-l "i = y y i- 2 j tt y i- 2 k-i (u:36) j=0 J k=0 Lemma A-6 is used to derive AK. . i _ n*-l j-l n*-l M i "" y i ^ .V y i-2j+l ,•' y i-2k * ^ y i-2n*+l^ y i-2n*^ .'' y i-2j J=l k=l j=l In the worst case, y n _ 1 _ 2 n* + l V Vl-2n* = y -A V y -l-A* ForA=0orl y -A = y -l-A SO y i-2n*+l = y i-2n* f ° r a11 ± ' K - y i v V yi . 2J+1 f y ± . 2k = K (^37) j=l ° k=l -84- The simplified expression for BK. is derived from Lemma A- 5 by usin£ the same argument to eliminate the final product term. n* ,1-1 "i-^ywiFi-a-"? (U:38) BK. The dual of NK. is obtained by taking the dual of the complement of Eq. 4:36. j=0 d k=0 The following identities can now be easily verified, AK. = y.NK. (4:4o) ill BK. = y.NK (4:4l) ill NK. V NK° = NK (4:te) ill AK. V AK = AK (4:43) ill BK. N/ BK - BK (4:44) ill Of the many restricted, minimal L. that can be formed, there are three of particular interest. One is NL. as defined by Eq. 4:24. The other two are defined below. -85- Definition 4-17: X. = SL. (X. _. y. n , Y7 , ) L i l - 1+1/ "'i+l' i+l SL. is called the simplest, minimal left directed mode function. SL.(\. n , y. n , Y 1 n ) = \. v , / (\. n V y. Jy. (4:45) i v i+l' ^i+I' i+l' i+I^i+I T v i+l r J i+1 /J i v Definition 4-l8: \. = EL. (\. ., y. ,, Y 1 . ) l l i+l ; J i+1^ i+l EL. is called the entire, minimal left directed mode function with i *L ■ (J ± .y < j < n + A - 1). EL. = 1 whenever X. has a value of 1 either by necessity or choice 11 according to Table 4-3. EL. =0 whenever X. must be according to Table 4-3. li B .. D Theorem 4-21: SL. = NL. V AL. = SL 1111 Proof: NL. V AL. = X. _y, , V (\. , V y. n )(NK. V AK. ). Using Eq. 4 : kO and l l i+l J i+l ' v i+l J i+l' v 1 i' & *1 observing that y.NK. = NK.. it follows that li i' NL. V AL. = X. _y. . V (\. , V y. , )(y.NK. V y.NK.) = SL. . l i i+l J i+l v i+l v J i+l' w i i J i V i SL D =(V.Vy.. )(\. v. . V y. ) = SL. . l i+l i+l v l+l^i+l J i i Theorem 4-22 : SL. yields the canonical , minimal representation as defined by Definition 4-2. Proof : Since SL. yields a minimal representation, it is only necessary to show that nonzero recoded digits are always separated by at least one zero -86- recoded digit. To do this, we assume that y! . = y. , + \. _ - 2X. is nonzero ' "'i+l J i+1 i+l 1 and show that y! must he zero when X. = SL. . l 11 The only way y! can be nonzero and still satisfy the range restriction is for (y. _, , X. _, , X. ) to equal one of the following combinations i+l' i+l l (010), (Oil), (100), (101 ). In each of these y. f \. Therefore, substitution in Eq. 4:45 yields X. = y. . Using this result in SL. yields X. , = X.y. = X. . It follows that y! = y. + X. - 2X. , = 0. l-l li i ill l-l Theorem +-23: EL. = NL. V AL. V BL. = SL. V BL. = NL D (4:47) i i ' l i 11 i v ' Proof : As defined by Eqs . 4:31 and 4:32, AL. V BL. has a value of 1 whenever X. = or 1 according to Table 4-3. Since NL. has a value of 1 whenever X. i & J i l must be 1 according to Table +-3, EL. = NL. V AL. V BL. . B ' l l l l Substituting Eqs. 4:40 and 4:4l into Eqs. 4:31 and 4:32, the expression for EL. becomes EL. - X. _y. _ V (X. _ V y. . )(NK. V y.NJT V y.NK ) l i+l^i+l i+l v i+l i i li l EL. = \. _y. .V (X.^Vy.,. )NK D l i+l i+l ' i+l v i+l l EL D = X. v. . V (X n V y. , )NK. = NL. l i+l i+l J i+l i+l l l An interesting series of symmetric, minimal L. can be formed as follows. Successively larger AL. . min terms are joined to NL. without using any BL. .. When all of the AL. . have been joined to NL., SL. is obtained. J ij iJ l' l -87- Successively smaller BL. . min terms are then joined to SL. . EL. is obtained ij i i when all BL. . are included, SL. represents the center of this series with L. of' progressively greater complexity lying on either side. These L. and the many others which can be formed using combinations of AL. . and BL. . are not investigated in this dissertation. h. 3 The Subclass of Restricted, Minimal Right Directed Mode Functions The organization of this section is identical to that of section 4.2, The set consisting of all right directed partial sequences, X (n + A), and K P. , is partitioned into three subsets in the first subsection. These subsets l-l correspond to choosing p. =0, p. =1 and p. = or 1 to achieve a minimal recoded representation. In the second subsection a necessary and sufficient restricted, minimal R. function is established with an auxiliary set of min terms, The subclass of restricted, minimal R. is derived from these. This ' l subclass contains all minimal R. that can be formed by joining any combination of min terms to the necessary and sufficient R. , h-.^.l Case Analysis of the Partial Right Directed Sequence Theorems k-l'J, U-l8 and 4-19 are used to partition (p. , X (n + A) ) l-l K into three subsets corresponding to p . - 0, p. =1 and p. = or 1. The notational conventions adopted in section 4.2.1 will also be used in this section with appropriate modifications for the right directed case. For example, if AU has boundary mode digits p. _, =0, P. ,., N = 1 and p. ,_\ = 1 l-l ' i+u(lj i+u(2J then the maximum composite gain appears as G(p.; OAlUl) = - p . -88- Case I: p. , = 1 l-l Let P, = U. Note that U is the only special sequence containing y. = 1. Theorem 4-19 applies if p = 1. Theorem k- 18 applies if p > 2. UA; Py > 1, P A > 2 Table 4-2 and Theorem 4-l6 are used to obtain the following composite gains. G(0; 1U0A0) =0+0 G(l; 1U1A0) = p - 1 G(0; 1U0A1) = + G(l; 1U1A1 ) = p + If p = 1, none of Eqs . 4:13> h:lk or 4:15 are satisfied; therefore UAU and UAZ must be analyzed. If p > 2., Theorem 4-l8 applies so p. =1. G(0; 1U0A1U0) = + + (Py-l) G(l; 1U1A1U0) = 1 + + (Py-l) G(0; 1U0A1U1) = + + p G(l; 1U1A1U1) = 1 + + p Eq. k:lk is satisfied so p. =1* i UAZ ; p = 1, p > 2, p z = 1 G(0; 1U0A0Z0) =0+0+0 G(l; 1U1A0Z0) =1-1+0 G(0; 1U0A0Z1) =0+0-1 G(l; 1U1A1Z1) =1+0-1 UAZA; Pu = 1, p A > 2, p z = 1, p A > 2 G(0; 1U0A0Z0A0) =0+0+0+0 G(l; 1U1A0Z0A0) =1-1+0+0 G(0; lUOAOZOAl) =0+0+0+0 G(l; 1U1A1Z1A1 ) =1+0-1+0 Eq. 4:15 is satisfied so p. = or 1. -89- UAZ; Pu = 1, p A > 2, P z > 2 G(0; 1U0A0Z0) =0+0+0 G(l; 1U1A0Z0) =1-1+0 G(0; 1U0A0Z1) =0+0-1 G(l; 1U1A0Z1 ) =1-1-1 Eq. 4:15 is satisfied so p. = or 1 i UZ; P y > 1, 1 < P z < 2 G(0; 1U0Z0) =0+0 G(l; 1U0Z0) = q + G(0; 1U0Z1) = 0-1 G(l; 1U1Z1 ) = p.. - p 7 U Li If Pu = 1, q = -co; if p y > 2, q = Pu -1. If p y = 1, none of Eqs . 4:13, 4:l4 or 4:15 are satisfied so UZA is analyzed below. If p > 2 } Eq. 4:l4 is satisfied so P. = 1. i UZA ; p n = 1, 1 < p z < 2, P A > 2 G(0; 1U0Z0A0) =0+0+0 G(l; 1U1Z1A0) = 1 - p„ - 1 Li G(0; 1U0Z0A1) =0+0+0 G(l; 1U1Z1A1) = 1 - p - If p = 1, UZAU and UZAZ are analyzed below. If p = 2, Eq. 4:13 is satisfied so p. = 0. l UZAU; ?u = 1, p z = 1, p A > 2 } P y > 1 G(0; 1U0Z0A1U0) = + + + (Py-l) G(l; 1U1Z1A1U0) = 1 - 1 + + (Py-l) G(0; 1U0Z0A1U1) = + + + p G(l; 1U1Z1A1U1) = 1 - 1 + + P U Eq. 4:15 is satisfied so p . = or 1. -90- UZAZ; ?u = 1, p z = 1, p A > 2, P z > 1 The last composite gain shown below is conditional on the length of the right most Z sequence. G(0; 1U0Z0A0Z0) =0+0+0+0 G(0; 1U0Z0A0Z1) =0+0+0-1 G(l; 1U1Z1A0Z0) =1-1-1+0 G(l; 1U1Z1A1Z1) =1-1+0-1 (Valid if p„ = l) G(l; 1U1A1A0Z1) =1-1-1-1 (Valid if p„ > 2) If p = 1, none of Eqs . ^:13, 4:1^ or k:15 are satisfied so UAZAZ must be Zj analyzed. If p > 2, Eq. k:13 is satisfied so P. =0. Zj 1 UZAZA ; Pu = 1, p z = 1, p A > 2, p z = 1, p A > 2 G(0; 1U0Z0A0Z0A0) =0+0+0+0+0 G(l; 1U1Z1A0Z0A0) =1-1-1+0+0 G(0; 1U0Z0A0Z0A1) =0+0+0+0+0 G(l; 1U1Z1A1Z1A1) =1-1 Eq. U:13 is satisfied so P. = 0. + 0-1 + UZ; Pu = 1, p z > 3 G(0; 1U0Z0) =0+0 G(0; 1U0Z1) =0-1 G(l; 1U0Z0) = -co + G(l; 1U1Z1) = 1 - p_ Eq. ^:13 is satisfied so p. = 0, UZ; Pu > 2, P z > 3 G(0; 1U0Z0) =0+0 G(0; 1U0Z1) =0-1 Eq. k:lk is satisfied so p. = 1, G(l; 1U0Z0) = (Py-l) + G(l; 1U0Z1) = (Py-l) - 1 ■91- Case II: P. , = 1 l-l Let P., = A so that y. = 0. Theorem if-l8 applies so P. = 1. 1 i i Let P = Z so that y. =0. Theorem ^--17 applies so p. = 1, Case III: p. = l-l Let P = U so that y. = 1. Theorem k-17 applies so p. = 0, Case IV: p. . = l-l Let P = A so that y. = 0, Theorem if-19 applies so the choice of P. depends on sequences to the right of A. AU; p A = 2, p n > 1 G(0; 0A0U0) = + G(l; OAIUO) = + (lU-l) G(0; OAOUl) = - oo G(l; OAlUl) = + p If p„ = 1, Eqs. k:13, ij-:lU and if: 15 are not satisfied so ADA and AUZ must he analyzed. If p > 2, Eq. k:lh is satisfied so p. = 1. AUA ; p A = 2, Pu = 1, p A > 2 G(0; 0A0U0A0) =0+0+0 G(l; OAIUIAO) =0+1-1 G(0; 0A0U0A1) =0+0+0 G(l; OAlUlAl) =0+1+0 AUAUi p. = 2, p TT = 1, p. > 2, p TT > 1 G(0; 0A0U0A1U0) = + + + (Py-l) G(l; 0A1U1A1U0) = + 1 + + (p^-l) G(0; 0A0U0A1U1) =0+0+0+ Pu G(l; 0A1U1A1U1 ) =0+1+0+ ^ Eq. k:lk is satisfied so P. = 1. i ■92- AUAZ; p A = 2, Pu = 1, p A > 2, P z = 1 G(0; OAOUOAOZO) =0+0+0+0 G(l; OAIUIAOZO) =0+1-1+0 G(0; OAOUOAOZl) =0+0+0-1 G(l; OAlUlAlZl) =0+1+0-1 AUAZA; p A = 2, Pu = 1, ?A > 2, ?z = 1, p A > 2 G(0; OAOUOAOZOAO) =0+0+0+0+0 G(l; 0A1U1A0Z0A0) =0+1-1+0+0 G(0; OAOUOAOZOAl) =0+0+0+0+0 G(l; OAlUlAlZOAl) =0+1-1+0+0 Eq. 4:15 is satisfied so P. =0 or 1. AUAZ; p A = 2, Pu = 1, p A > 2, P z > 2 G(0; OAOUOAOZO) =0+0+0+0 G(l; OAIUIAOZO) =0+1-1+0 G(0; OAOUOAOZl) =0+0+0-1 G(l; OAlUlAOZl) =0+1-1-1 Eq. 4:15 is satisfied so p. = or 1. AUZ; p A = 2, ?u = 1, p z = 1 G(0; OAOUOZO) =0+0+0 G(l; 0A1U0Z0) =0+0+0 G(0; OAOUOZl) =0+0-1 G(l; OAlUlZl) =0+1-1 AUZA ; p A = 2, Pu = 1, p z = 1, p A > 2 G(0; OAOUOZOAO) =0+0+0+0 G(l; 0A1U0Z0A0) =0+0+0+0 G(0; OAOUOZOAl) =0+0+0+0 G(l; OAlUlZlAl) =0+1-1+0 Eq. 4:15 is satisfied so P. =0 or 1. -93- AUZ; p = 2, p n = 1, p_ > 2 A U G(0; OAOUOZO) =0+0+0 G(0; OAOUOZl) =0+0-1 Eq. 4:15 is satisfied so p . = or 1. G(l; 0A1U0Z0) =0+0+0 G(l; OAlUOZl) =0+0-1 AU; P A > h, Pu > 1 G(0; 0A1U0) = + (Py-l) G(0; 0A1U1) = + p G(l; 0A1U0) = + (Prj-l) G(l; 0A1U1) = + p y Eq. 4:15 is satisfied so p . = or 1. AZ; p A > 2, p z = 1 G(0; OAOZO) =0+0 G(0; OAOZl) =0-1 G(l; OAOZO) = -1 + G(l; 0A1Z1) =0-1 AZA; p A > 2, p z = 1, p A > 2 G(0; OAOZOAO) =0+0+0 G(0; OAOZOAl) =0+0+0 Eq. 4:13 is satisfied so p. = 0, G(l; OAOZOAO) = -1 + + G(l; 0A1Z1A1) = 0-1 + AZ; p A > 2, p z > 2 G(0; OAOZO) =0+0 G(0; OAOZl) =0-1 G(l; OAOZO) = -1 + G(l; OAOZl) = -1 - 1 Eq. 4:13 is satisfied so p = 0, l -94- Let P = Z so that y. =0. Since p =0, Theorem 4-19 applies if p = 1. If p > 2, Theorem 4-18 applies. Zi Li ZA; p z = 1, p A > 2 G(.0; 0Z0A0) = + G(0; OZOAl) =0+0 Eq. 4:13 is satisfied so p. = 0, G(l; 0Z1A0) = -1 - 1 G(l; 0Z1A1) = -1 + ZA; p z > 2, p A > 2 Theorem 4-l8 applies so p. = 0„ This completes the partitioning of the set (p. , X (n + A) ) . i-1 R Table 4-4 contains a summary of the results. As in Table 4-3, X is used to designate the portion of the partial sequence that is not given explicitly in terms of special sequences. The special sequences and their corresponding lengths are listed in order of occurrence . 4.3.2 Derivation of the Restricted, Minimal Right Directed Mode Functions The minimal R. derived in this section have p. , , y. and YV 1 i-l' 1 1 = (y. .? 1 < j < n + A) as independent variables. Table 4-4 forms the basis for the following definitions and analysis. Definition 4-19: p. = NR.(p. , , v., YV) 1 i v l-l 1' 1 Let NR. be a minimal right directed mode function with y* = (y i+1 ; 1 < j < n + A). NR. =1 whenever P. must be 1 according to Table 4-4. 11 NR. = whenever the choice of P. is or arbitrary according to Table 4-4, -95- ■H a o QJ CJ ■H O ,£{ o 0) p o -p M a •H ■d £h O o o < } ^ — n X X u o » ° rH <1 1 + ! • • X H • • X o O P B B O O rH „ o O X K X H rH ■ O O • • ■ • • O ' o • • ■ H • ■ ■ X ■ • • • • H O rH r-{ o • X CVI + „ H , H <-H O O O O o . •H ^ rH + H O rH O o O O O O o rH o •H >> •H H rH H rH rH rH r-\ rH rH r-{ O o >i H i H rH H H H r-\ r-\ <-\ H H rH rH •H a CO ta ts] Eh Ph O CO < s Ph V| Ph hJ H < tsl < t> < ^ Ph Ph Ph VI Ph CVI H tsl M D Ph o w £3 Ph D H C\J < < < < w u Ph Ph Ph Ph Ph Ph VI PM s < < < CO H VI Ph VI Ph Ph rH C\J H rH en < to a? C\J H CVI rH rH H rH rH H H Ph Ph w CO co H Q < g < § < IS] to < < CO g 3 S CO £j D D D D D D iS I=> tD w CO < H o ! n H -96- HH O CD O •H O Xi o -p o -p 2 ■H t3 ^H o o o < 0) o •H -p •H -p u $ Ph + K X -P a o o -4- rH H H H H •H a ■\ •\ •\ »\ •N o H rH O O O O O O o o 1 1 X X X 1 X 1 X X X X X X 1 1 X X •m 1 , X i , + •H >» X • 1 1 5 H + o H rH rH H H rH H r-{ H • •H t>» ■H H O o o O O o O o O o >> rH l O O o O O O o o o O o •H a CO td IS] Eh Ph O < S Ph VI txl 33 ID Ph rH OJ < Ph Ph H ft Ph VI < isa O W o H H -97- Theorem 4-24 : NR. is the necessary and sufficient restricted, minimal right directed mode function. Proof : The proof follows directly from Definition 4-19 and Table 4-4, The following general expression for p. can "be obtained by inspection of Table 4-4. P. = R^P^, J ± , ij) = P,.^ V Pi.^ACl, 1, Y*)Y P^ACO, 0, Y*) (4:48) Note that Eq. 4:48 is the same as Eq. 3-4 when Eq. 3:6 is substituted for S.(y., Y*). Table 4-4 is used to develop the R. (l, 1, ^) and R. (0, 0, Y R ) functions. Case I applies to the former and Case IV to the latter. R. (l, 1, Y?) must be 1 for all of the following right directed partial sequences beginning with y. . y i+i y i+2 ••• y i+j ••• = (1 ••• ' 011 ••• ' ° 1011 ■••;■•■; 01 ••• 011 •••) It is convenient to define NR. (l, 1. YV) in terms of NR. (l, 1, 0, YV ., ) . NR.(l, 1, Y*) = y. +1 V NR.(l, 1, 0, Y** +1 ) (4:49) nr. (i, i, o, ij +1 ) = 'f y i+2j+3 y i+2j+2 T yi+ 2k + 3 y i+2k+2 ^S50) -98- where n* = — - — with A - if n is even and A = 1 if n is odd. On the first step of a right directed recoding y. = y . Thus when i = the definition of n* guarantees that y. ~ „ ~ = y A ^ = with n odd or even. to i+2n*+2 n+A+2 R. (l, 1, YV) may be 1 for any of the following partial sequences beginning with y. l+l y i+i y i+2 °°° y i+j "°° = (010 ° "•• ); (° 10100 ...);...; (oi ... oioo ... ) y i+i y i+2 °°° y i+j °°° = (0011 ••• ^ (ooioii ...);...; (ooioi ... oil ... ) The Boolean functions given below represent an arbitrary sequence in each of these sets. CR..(1, 1, Y^) = y. _CR. .(1, 1, 0, Y R - _ ) ij ' i l+l ij i+l (+:51) CR. . (1, 1, 0, Y^ n ) = y. n . n ij v ' ' ' i+l ' J i+2j+2 TT k=0 _TT y i+2k+3 y i+ 2 k+ 2j c ij ii DR. .(1, 1, Y R ) = y. n DR. . (l, 1, 0, ^ . ) ij v ' ' 1' J i+1 ij i+l (4:53) DR. .(1, 1, 0, ^ _ ) = y. . _ ij v ' ' ' i+l / J i+2j+2 j-l LkK y i +2k+ 3 y i+2k+2_ d 1 ^ (k:5k) As in the left directed case, c. . and d. . represent arbitrary Boolean functions of the (n + A - 2j ) digits to the right of y. . Any one of these functions may be associated with each CR . (l, 1, Y?) and DR. . (l, 1, Y?). Any combination ij i ij i of these functions for 1 < j < n* may be joined to NR.(l, 1, Y?) to form a particular R. (l, 1, Y?). R. (0, 0, YV) must be 1 for all of the following partial sequences beginning with y. , . D J i+l -99- y. . y. _ ... y, . ... = (ill ...; 11011 . ..; . ..; 110101 ... Oil ...) °i+l J i+2 J i+j v ' ' ' ' R R Here it is convenient to define NR. (0, 0, Y.) in terms of NR. (0, 0, 1, Y. ,) NR.(0, 0, Y R ) = y. . NR.(0, 0, 1, Y R _ ) NR. (0, 0, 1, Y R +1 ) = NR. (1, 1, 0, Y R +1 ) (+:55) (+:56) R.(0, 0, Y.) may "be 1 for any of the following partial sequences "beginning with y i+1' y i+l y i+2 y, . ... = (1100 ...); (110100 . ..); . ..; (1101. . . 0100 . ..) i+J y i+l y i+2 y ... = (1011 ...); (101011 ...); ...; (101 ... 1011 ...) The Boolean functions which represent an arbitrary sequence in each of these sets are given below. CR. .(0, 0, Y R ) = y. . CR. .(0, 0, 1, Y R _ ) (+•57) CR. .(0, 0, 1, Y R _) = y. _. _ lj ' ' i+l y 1+2J+2 ,*L y i+2k+3 y i+2k+2 - k=0 00 c . . ij (+:58) DR. ,(0, 0, Y R ) = y. . DR. .(0, 0, 1, Y R _ ) ij l J i+1 ij i+l (+:59) DR..(0, 0, 1, Y i+1 ) =y. +2 . +2 j-l TJ" y i+2k+3 y i+2k+2 L k=0 d 00 ij (k:6o) As in Eq. k:52 and h'.^k, c. . and d. . are arbitrary Boolean functions of the ij ij ,R- (n + A - 2j) digits to the right of y. _. n . Any combination of CR. . (0, 0, Y.) R R and DR. .(0, 0, Y.) with 1 < j < n* may be joined to NR.(0, 0, Y.) to form a particular R.(0, 0, Y R ) . The subclass of restricted, minimal S. functions is constructed by substituting the above equations into Eq. 3:6. Let NS. represent the necessary and sufficient S. -100- NS.(y., Y R ) = y.y. +1 V (y. © y. +1 ) NR.(l ; 1, 0, Y* +1 ) (h:6l) CS . . and DS . . are defined as follows . • DS i.^i' Y l) =^i DR ij^ ^ Y i> Y ^i D V°' °> Y i) (^ 6 5) Any combination of CS. . and DS . . joined to NS. forms a particular S.. ij ij i i These functions are used to define NR. , CR. . and DR. ,. NR^p,.,, y ± , I») = Pul y. V (p.^ V J ± ) NS. (U:6U) D Rl .( Pl . r y ± , Y E ) . (p.^ V y.) CS. . (*:66) Any R.(p. , , y., Y.) in which Y. includes only those digits to the right of y. can "be constructed by joining an appropriate combination of CR. . and DR. . to NR. . i The number of minimal R. that may be defined in this manner is very large. In the work that follows we limit our attention to those R. for which R.(l, 1, 0, Y? n ) = R.(0, 0, 1, Y R J with c 1 ] = d 11 = c°° = d°° = 1 for all j. Equation Ik 56 shows that the necessary and sufficient portions of these partial functions are always equal* Since c. . = d. . = 1, comparison of Eqs . ki^2 and ki^k with Eqs . ki^Q and *4-;60 shows that 0R ± (1, 1, 0, Y R +1 ) = CR (0, 0, 1, Y R +1 ) (ki6l) DR.^1, 1, 0, Y R +1 ) = DR ±J (0, 0, 1, Y R +1 ) (4:68) To guarantee that R ± (l, 1, 0, Y R +1 ) = R.(0, 0, 1, Y R +1 ), CR (l, 1, 0, Y^ +1 ) -101- must "be joined to NR.(l, 1, 0, Y. .) if CR..(0, 0, 1, Y7 , ) is joined to NR.(0, 0, 1, Y. ). A similar statement applies to DR..(l, 1, 0, Y. ) and DR.^0, 0, 1, Y^ +1 ). Under these restrictions Eqs . 4:62 and 4:63 "become DS ij ■ <*i • '1*1) "V 1 ' 1; °' ^ ih '- 70) As in the left directed case, the minimal S. formed under these restrictions are called symmetric, minimal right directed characteristic functions. All R. formed with these S. are called symmetric, minimal right directed mode functions. The functions defined below are used to illustrate certain symmetries in the subclass of symmetric, minimal R. . Definition 4-20: CS., DS., CR. and DR.. ■ ill i n CS . = "V cs - • (+:7i) 1 j=l 1J n DS. = }/ DS. . (4:72) 1 j=l 1J CR i = (p i-l V ^1 } CS i (4:73) DR. = (p i _ 1 V y.) DS. (4:7+) NS., CS. and DS. are now simplified by using Lemmas A-l, A-2 and A-3. NS, = y n -102- y. if i+2j+3 k 'J _ x y i+2k+4 * CS. i DS, - <*i • y 1+ i) r y TV ~ T y i+2 y i+2j+2 jJJq y i+2k+3j = DS. l D (y . © y. . ) w i ** J i+l' V 0=1 y-? j_o y-,- . o ■? 7T y.- i+2 J i+2j+2 '_' J i+2k+3_ CS. l (^75) (hilG) (.km) Lemmas A-k, A-5 and A-6 are used to obtain NS., CS. and DS. i' l l NS i " *i y i+ i v ^i 9 y 1+1 ) V o-i lT y : j=0 i+2J+2 k'='o Ji+2k+ 3j V (Y ± Q y 1+1 )(y i+2n ^2 y y i + 2n* +3 ) n*-l TT 0=0 y i+2j+3 In the worst case i = 0, so y 2n*+2 y 2n*+3 y n+A+2 * y n+A+3° Sin ce y n+A+2 := y n+Af 3 for A = or 1. y. ,- „ _= Y. n » , for all i. ; J i+2n*+2 J i+2n*+3 = 1 #■ »S = y y V (jr © y ) V yi+2j+2 Jl y i+2k+3 j=0 k=0 (^78) Lemma A-6 is used to obtain CS. „ l n*-l CS, - (y. y. ) v h + S Y y. j-i y.-. i " i " " i+1' ' J i+2" .V- J i+2j+l .'" J i+2k+2 .1-1 J k=l n*-l * ^ y i+2n*+l V y i.+2n*+2^ /' 0=1 i+2j+2 In the worst case i = 0, so v yp n *, p y n .i-/V4-i V y r Since y^ . , = y„^.o = ° for A = or 1, y. _, „ . =y. _ ,, _ for all i. ' °i+2n*+l J i+2n*+2 -103- _ _ n* 0-1 CS = (y. © y. +1 ) V y i+2 V y y 1+2i+1 TT y 1+2k+2 = ^ (4.79) 0=1 k=l DS. is derived from Lemma A-5 "by using the same argument to eliminate the last product term. Yl,,,, it ,D ds, . ( 7l e y 1+1 ) v j i+2 v y y 1+2J+1 II y 1+21[+2 =<^ (4:8o) J =1 k=l The dual of the complement of Eq. 4:88 yields NS.. NS ? ■ Vi+i * ^ © r i+ i> ^V y i+2 j+2 IT y i+2k+3j (4:81) These equations can now "be used to verify the following identities. CS. = (y. y ) y. +2 NS~ (4:82) DS. = (y. y. +1 ) y i+2 NS° (4:8 5 ) NS_. V NS? = NS? (4:84) (4:8 5 ) (4:86) Three symmetric, minimal R. are of particular interest „ One is NR. as defined by Eq. 4:64. The other two are defined below. Definition 4-21: p. = SR. (p. , . v., Y7) SR. is called the simplest, minimal right directed mode function. 1 1 l cs. V cs D = i i . cs D 1 DS. V DS D = l l . DS D 1 SR i = p i-i y i v Pi.i(y 1+ i v y i+2 ) y j&wPm ^ :8 ?) Definition 4-22 : p. =ER.(p. ., y., Y?) ER. is called the entire, minimal right directed mode function with Y i = (y i+j ; 1 - J - n+A) * -104- ER. = 1 whenever p. has a value of 1 either by necessity or choice iccording to Table 4-4< ER. = "whenever p. must be according to Table 4-4, Theorem 4-23 : SR. = NR. V CR. = SR D (4:88) — — ■ <*• 1111 v ' Proof: NR. V CR. = p,^ y. \/ (o ± _ 1 V y 1 )(NS.V CS.) Note that y i y 1+1 V (y ± © y ±+1 ) y i+2 ns. = ns.„ (4:89) By using this equation and Eq. 4:82, we obtain NS. V CS. =y.(y. ,V y . J \/ y . n y„ . Therefore, 1 1 J i J i+l J i+2 / v J i+l J i+2 > SE i = Pi-i^i V Pi-i(y i+ i V y 1+2 ) V y> 1+1 y 1+2 SR i - ^i-i v *i>^iV y 1+1 V y i+2 ) - sh,. Theorem 4-26: ER. = NR. V CR. V DR. = SR. V DR. = NR D (4:90) — — - — — ■ liiiii l Proof: CR. V DR. as defined by Eqs . 4:73 an( i 4:74 has a value of 1 whenever n. = or 1 according to Table 4-4= NR. has a value of 1 whenever p. must ■ l & l l be 1 according to Table 4-4. It follows that ER. = NR. V CR. V DR. . ° 1111 By substituting Eqs. 4:82 and 4:83 into Eqs. 4:73 an d 4:74 and expressing NS . as in Eq. 4:89, ER. becomes y 1 y 1+1 V(y 1 © y 1+1 > TT (y- v s. ) -n II l-r i-r r=0 < i < n - 1 J Ok 92) If «?I were known, all possible minimal K. could be determined by writing each L. e c£ in the form of Eq. 3:1. Likewise, if \J\ were known, all possible minimal S. could be determined by writing each R. e(j\ in the form of Eq. 3°^' Knowledge of cC is sufficient to determine Q\ by use of Eqs . 4:91 and 3°9» Similarly, knowledge of (A is sufficient to determine cs- by use of Eqs. 4:92 and 3:10. At present, only the subclasses of restricted, minimal L. and R. are known. A typical restricted, minimal L. has a corresponding K. = NK. V y AK. . V V BK. . where the functions on the right are defined by Eqs. 4:21, J J 4:22 and Ik 23. A typical restricted, minimal R. has a corresponding S. = Vcs . . y V e Ik 62 and 4:63. NS. V VCS. . V YDS. . where the functions on the right are defined by Eqs. ki6l, J J Equations 4:91 and 4:92 involve (n + 1) K. and S. functions respectively, These may be chosen independently of each other. Equation 4:91 yields a new class of J. by substituting fn + li independent choices of K. from the subclass of restricted, minimal K. . Likewise, Eq. 4:92 yields a new class of T. by -107- substituting (n + 1) independent choices of S. from the subclass of restricted, minimal S.. These new classes must contain minimal J. and T. since the K. 1 ill and S. used to define them are minimal. Furthermore, J. and T. are, in general, l l l ' " functions of y. to the left and right of y. and y. . Consequently, by sub- v •*• X~r_L stituting J. and T. in Eqs. 5*9 an( i 3:10 minimal R. and L. are obtained which, ° 1 l 11 in general, are not restricted. The classes of minimal J. and T. are used to generate new classes of 11 minimal R. and L. respectively. After all identities have been taken into account, the new and larger classes of minimal S. and K. are used to obtain ' D 11 even larger classes of minimal J. and T.. The process continues until the new o 1 1 classes of J. and T. contain the same elements as their predecessors. 11 ■Two examples are given below to illustrate the process by which J. and T. are obtained. In the first example the R. which is equivalent to SL. is obtained assuming that L. = SL. for i < ,i < i + n. In the second example J i - - the L. which is equivalent to SR. is obtained assuming that SR. = R. for 1 l l j i - n < j < i. The canonical, minimal L(y) is defined by SL. for < i < n - 1. The R. which defines the equivalent R(y) is obtained by use of Eqs. 4:91 and 3:9. We let L. = SL. for n < i < 2n - 1 so that K. is defined in Eq. 4:91 ^ ' j l - d - l+q ^ for < i < n - 1. Equation 4:45 shows that SK. = y. . Substituting this in Eq. 4:91 yields ST. which is then simplified by the following theorem. Theorem 4-27: Under the assumption that 0=y „ = y „=...: ■- * °n+l J n+2 n q-1 SJ i = Vy i+ ( q+ l) y i + q TT (y i+(r+l) V y i+r } q=0 x ' r=0 (4:93) = "V" y i + 2j + l V T 1 y i + 2k + 2 V X y i+2j l" y i+ 2k + l .1=0 ° k = -1 .1=1 k=0 -108- where < i < n-1, and n* = — - — -with A = if n is even and A = 1 if n is odd. Proof : Only the relative portion of the indices is retained in the proof. Let n q-1 VX + i y oL 7T q=t r=t It is clear that H(0) represents the left side of the equation given in the hypothesis. Consider H(n-l) and H(n-2). **> V Vi \ T (y r+i v r r ) . Assume that H(n-i) =y n y n . 1 Vy n+1 y n H(n- 2 ) = y n y n _ ± V y n _iy n _ 2 Vy n+1 y n y n . 2 H(n-2s-l) = Y n y } JT y n -2h V g=0 & h=g s-1 s-1 V" y n -2g JT y n-(2h+l) g=0 & h=g H(n-2s) . V^-CSg-l) "TT y„-2h V g=0 & h=g s-1 -1 VI y n-2g Jl y n-(2h+l) g=0 & h=g We use H(t = n-2s+l) to verify that the expression for H(t-1 = n-2s) is correct. H(n-2s) = (y _ ^y _ ) H(n-2s+l) \/ y n n y x ' w n-2s+l v J n-2s' x ' y J n-2s+l ,, n-2s s-2 s-1 = y n-2s+2 y n-2s+l V V^ y n-2g Jl y n-(2h+l) V g=0 fa h=g s —1 s V'n-te.U 1fV2hVV2s + l y n-2s " H(n " 2s) g=0 & h=g -109- By using H(t = n-2s+2) we verify that the expression for H(t-1 = n-2s+l) is correct. H(n- 2s+ l) = (y n . 2s+2 V y n . 2s+1 ) H(n-2s + 2) V V 2 s + ^n-2s + l ~ y n-2s+3 y n-2s+2 V s-2 s-1 s-2 s-1 V y n -(2g-l) T y n -2hV Y y n-2g JT y n -(2h + l) V g=0 to h=g g=0 & h=g y n-2s + 2 y n-2s + l = H(n-2s + l) Set s = n* and let y = -j ■+• n* and n = -k +> n* - 1. If n is odd, n* j-1 n* -1 H(o) - V y 2 j X y 2k+ i v V" y 2yl IT y 2k . j=l d k=0 j=l d k=0 If n is even, n * J" 1 - n - J -1 h(o) ■ x y 2j + i ,T , ^ +2 v y J* -— k-="-l — j=l ^ iJo 2k+1 ' The two expressions for H(o) are now made identical. Substitute j - j '-fl and k = k'+l in the second join of H(o) when n is odd. The resulting join is equal to the first join in H(o) when n is even except that the upper limit is n*-l instead of n*. Let the upper limit he n* and note that y. o_.jfc.n = f° r n even or odd and any < i < n-1. The expression for H(o) with n even or odd is therefore the right side of Eq. 4:93 as given in the hypothesis . Substituting SJ. in Eq. 3°9 an( i simplifying yields ■110- R i (p i-l' y i> ^ = p i-i y i V p i-l I V y i + 2j + l IT y i + 2k +2 J V j-l - j=0 r n* y i V- j-1 S yi+2k+i (4:94) This is the minimal R. which is equivalent to SL.. It is clearly restricted •p since Y. includes only those y. to the right of y.. As used in Eq» 3°9> SJ. assumes the role of S. . It is shown below that SJ. does not represent a symmetric, minimal S. as defined in section 4.3-2. A comparison of the right-hand side of Eq» 4:93 with Eqs. 4:75 , 4:76 and 4:77 reveals that J. can not be constructed by joining CS. and/or DS. to NS.. The minimal S. which equals SJ. can be constructed as follows l ^ l R.(l, 1, Y R ) = NR.(l, 1, Y R ) i x ' } l i v l (4:95) n* n* .(0, 0, Y*) = HE.(0, 0, Y*) V)f C (0, 0, Y*) V ">/ D (0, 0, Y*) j=i - J x A 1J In these equations c. . = d. . = 1. It follows that S. = y. R.(l, 1, Y R ) V y. R.(0, 0, Y R ) l i i x ' ' i * ^ i i ' ' l (4:96) (4:97) By using Lemmas A-l, A-2 and A-3, R.(l, 1, Yv) and R.(0, 0, Y.) may be written as R n* r ± > x / j 1+± r n* Vy< ■1 >J+3 h T]\i y i+2h + 4 y y i+l n* "V" i+2 ,/ i+2g+2 H , 'i+2h+3 =1 h=0 -1 n* i+l Y y i+2 y i+2g+2 c==l It y± h=0 +2h+3 -Ill- Lemma A-7 is now applied to the first two joins in R.(0, 0, Y.) _R r.(o, o, ij) = y . +iy . +2 V G n* g=0 V y ) i+2g+2 °i+2g+3 _ y i + l r n* _ g-1 V. y i+2 y i+2g+2 TL y i+2h+3 - g=l h=0 Since y. . ~ = 1 for any i > with A = or 1, this expression becomes r \ -\ n r g_1 r ± (o, o, y.) = y i+1 y i+2 V y i+1 V y i+2 g + 2 JT y ±+2h+3 • '- e=l h=0 J R We now let g = j - 1 and h = k - 1 in both R.(l, 1, Y.) and ■p R.(0, 0, Y.). Since y. = for any i > with A = or 1, the upper A limit on the two joins can remain n*. With these modifications S. can be l written as A S i = y i y i+l V 7 ± n* 3-1 V 1 y i+2j+l "IT y i+2k+2_ v y i+ iy i+2 v r n* i+1 V y. t y. i + 2j ^ *i + 2k + l After collecting terms this expression equals SJ. as given by Eq. 4: 93- As a second example, we consider the restricted, minimal R(y) that is defined by SR. for < i < n - 1. The L. which defines the equivalent L(y) is obtained by means of Eqs . 4:92 and 3:10. We let R. = SR. for - n < j < - 1 so that S. is defined for < i < n - 1 in Eq. ki92. The SS. which corre- l-q — — ^ y l sponds to SR. was obtained in the proof of Theorem k-25- It may be written as SS. = NS. V CS. = y.(y. . V y. J V y. J. . i 11 J i VJ i+l Y J i+2' v J ±+r i+2 ' Substitution in Eq. h:92 yields ST. which is then simplified by the following theorem. -112- Theorem 4-28 : Under the assumption that ... y =y . = y : ST i " "Jf Wi-(l-l) y i-(q-2) J[ G i-r V y l-(r-l) V y ± . (r . 2) > V n-1 yi-n (y i-(n-l) V y i-(n-2) } TJ (y i-r V y i-(r-l) V ^.(^a) ) n* n* j-1 " ")£ y i-2j + l Jf- 1 yi - 2kV X yi " 2J kTTx y i-2^-l where < i < n-1, and n# = — - — with A = if n is even and A = 1 if n is odd- Proof; Only the relative portion of the indices is retained in the proof. Let H(t) = V y y y Jf (y r V Y T _ ± V Y T _ 2 ) V q=t ^ ^ r=t n-1 y n (y n-l V y n . 2 ) TT ^ y r V y r-l * y r-2 } ' r=t H(o) represents the left side of the equation given in the hypothesis. Consider H(n-l) and H(n-2). H(n-i) = y n y n _ 2 v ^.^.g V v^^.j V y n . 2 y n -3 H(n-2) = y n J n _ 2 y n _ k tf ^.1^-2^-4 V y n - 5 y n-4 V y n y n-l y n-3 * y n-2 y n-3 Assume that s —1 s —1 s H(n- 2s+ i) = V y„.(2eti) TT y n . (2h+2 ) V T v 2g V g=0 & h=g g=0 s s V. y n-2g Jl y n-(2h+l) • g =0 to h=g Using H(t = n-2s+l) we verify that the expression for H(t-1 = n-2s) is correct. -113- H(n- 2s ) = (y n _ 2s v 3 r n . 2s y n . 2s . 1 v y n . 2s y n . 2s . 2 ) X«**D V y n-2s y n-2s -l y n-2s -2 s-1 s y n-2s y n-2s-l V \A y n-2g Jl y n-(2h+l) V g =0 & h=g s-1 s s+1 V y n-(2 g+ l) IT y n-(2h + 2) * IT y n -2g = H(n " 2s) g=0 x to h=g N ' g=0 We now use H(t = n-2s+2) to verify that the expression for H(t-1 = n-2s+l) is correct. H(n-2s+l) = (y „ . \/ y „ v n V y n J „ J H(n-2s+2) V K ' VJ n-2s+l y J n-2s+l J n-2s Y ,y n-2s+l ,y n-2s-l y v ' y n-2s+l y n-2s y n-2s -1 y n-2s+i y n-2s r s-2 s-2 "V" y n-(2q+l) 7^" « / n-(2h+2) V - g=0 h=g J -1 y n-2s+i y n-2s IL y n-2g V y n-2s+i y n-2s g=0 y n-2s+i y n-2s-l s-1 s-1 s "TT y n-2g^ V" y n-2g JT y n -( 2 h+l) V g=0 & g=0 & h=g y n-2s + l y n-2s y n-2s-l = H ( n - 2s +D Set s = n* and let g = -j+n* and h = -k + n* -1. If n is odd, n* j-1 n* n* j-1 h(o) - V r 2i _ 2 T ^ v J Q ^ V -£ y^ JT mi y 2k If n is even, n* -1 n* n* j-1 H(o) ■ )£ ^j-i k T-i 7a v jT-i y2 J y X y£J icT-i y2M Since < i < n - 1, the two product terms can be absorbed by the corresponding joins even when i = n-1. If the indices in the two expressions -111*- for H(o) are temporarily written in the form i - x, we note the following when i = n-1. y n-l-2n^l = y -l = y o = y n-l-2n* + 2 (n ° dd) y n-l-2n y ~l ~ y o " y n-l-2n*+l (n even) Having absorbed the product terms, the two expressions for H(o) are now made identical. Let j = j " +■ 1 and k = k ! + 1 in the first join of H(o) when n is odd. The transformed join looks like the second join of H(o) when n is even except that the upper limit is n* - 1 instead of n*. This dis- crepancy is corrected by allowing the upper limit to be n* and. using the fact that y p = y -, = y « Observe that when i = n-1 and n is odd, n*-l n*- 2 y i-2n* Tl . y i-2k-l = y i-2(n*-l) . |l . y i-2k-l * k = -1 ' k = -1 The resulting H(o) with n odd or even is the right side of Eq. k: 98 given in the hypothesis. By substituting ST. in Eq. 3^10 and simplifying we obtain V x i+i' y i + r Y i + i } = \ + i y i + i v y ±+1 y ±+2 v (^99) n* j-1 n* -1 \ + i X y i-2j+i V T n y i-2kJ v ~\f y ± _ 2 j JT , y±. - J-l K - =1 j=o - 2 J k 1 !./ 1 * 1 Since y. is included in the set of independent variables, the L. defined by this equation is not restricted. ST. represents K. as used in Eq. 3;10. Inspection of Eq. ^98 shows tbat ST. involves y. ^. Therefore ST. is not restricted and furthermore can not 1 i+2 1 -115- be constructed by simply joining an appropriate combination of AK. . and -^ J BK. . to NK. . The minimal K. that equals ST. is constructed as follows. n* n* L.(0, 1, YT _) = ML.(0, 1, YT,,) V "V AK. .(0, 1, YT , ) V'"V~BK. .(0, 1, YT _) 1 v ; > 1+1 / x \ j > 1+1 / V 1J ' 1+1 ."_ 1«] 1+1 0=1 ° j=i L.(l, 0, Y L . ) = NL.(1, 0, Y L _) In these equations a. . = b. . =1. It follows that K - y i+ i L i (0 ' x » *£n> v y i +2 "i + i L i (1 ' °' ^ v y i+ ^i + i By using Lemmas A-l, A-2 and A-J we obtain a* j=o j-1 y k = -1 i-(2k+2) V* n* y y i"i-2.i j-i . =1 _-2j ^ y i-(2k+l) V n* _ j-1 Y y i y i-2,i JT yi-(2k + l) . 3=1 n* k=0 1-1 , ± (1, 0, YT +1 ) = "\f y ± _ 2 g=U h = -1 T y ^ h = -1 Applying Lemma A-7 to the first two joins in L.(0, 1, YT , ) yields (4:100) (4:101) (4:102) 1+1' L.(0, 1, YT" n ) = y. i v ' ' i+l' °i n* .y ^i- 2J v 7^^)j v n* _ j-1 V7 y i y i-2j TC y i-2 J=l k=0 Since y. A = y . . . for all < i < n-1 with A = or 1, J l-n-A "'l-n-A-l — — ' l. ( o, i, t5 +1 ) = ?1 vY y± . 2j if y^^ k=0 -116- In L.(l, 0, YT .) let g = j - 1 and h = k - 1. Since i l+l ° y i-2(n*+l)+i y i-2n* = y i-2n*+l f ° r ° - i - n_1 with n even or odd ^ the u PP er limit on the join can "be left as n*. Substituting these modified forms of L.(0, 1, Y. ) and L.(l, 0, Y. ) in the expression for K. yields *i = y i-H y i V y i + l v y i_ 2 j TT y i_j j=l L ^ J k=0 y i+2 n* j-1 -. V y i-2Ul Tf y i.-2k * y i+2 y i+l j=l k=0 J After collecting terms, this expression equals ST. as given by Eq. ki^8, k. 5 Summary Sets of recoding functions which transform a binary representation into an extended signed-digit representation having a minimum of nonzero digits were investigated in this chapter. Both left and right directed sets of minimal recoding functions, F (y) and F (y), were considered with primary li K emphasis on the corresponding sets of minimal mode functions, L(y) and R(y) • It was observed that all possible minimal L(y) and R(y) correspond to all possible sets of minimal L. and R.o li In section I4..I the minimal recoded representation was analyzed and a procedure for determining the optimum choice of the next mode digit, m., was established. A unique decomposition of an arbitrary binary sequence was defined and the concept of a maximum gain of zeros in the recoded representa- tion was introduced. In both the left and right directed cases, the maximum gain over each of the three special sequences, Z, U and A was determined for all possible boundary mode digit conditions. The results are listed in Tables ^-1 and k-2 according to the choice of m. . A maximum composite gain in zeros was defined as the sum of maximum gains over a series of special -117- sequences. A theorem was introduced concerning the calculation of this gain over a series of special sequences with "both and 1 as the terminating "boundary mode digit. Three theorems followed which "based the optimum choice of m. on a comparison of maximum composite gains. It was shown that in certain cases the choice of m. is arbitrary. In section k.2 and 4.3 "the theorems established in section 4.1 were used to partition the sets of left and right directed partial sequences (X T (n+A), \. ) and (p. , X (n+A)), into three mutually exclusive subsets. In two of these subsets the optimum choice of \. or p, is or 1 while in the third it is arbitrary. These results are summarized in Tables 4-3 and 4-4. Using these tables, subclasses of restricted, minimal mode functions were developed in terms of necessary and sufficient minimal mode functions and sets of arbitrary min terms. In both sections subclasses of symmetric, minimal mode functions were defined and some of the basic symmetries were investigated. In section 4.4 a theoretical procedure for obtaining all minimal L. and R. belonging to cJT and Ul was suggested. This procedure is based on knowledge of the subclasses of restricted, minimal L. and R. and the equivalent relations developed in section 3-3- Two special cases involving the simplest, minimal mode functions, SL. and SR„, were considered as examples. ' l x 5. APPLICATIONS OF MINIMAL RECODING TO MULTIPLICATION AND DIVISION ALGORITHMS In the past various minimal recoding techniques have been used or suggested as the basis of fast multiplication and division algorithms for digital computers. In this chapter minimal left and right directed recoding functions are used to define multiplication and division algorithms which minimally recode multipliers and generate minimally recoded quotients. The canonical, minimal recoding of multipliers has been widely used. This is undoubtedly due to the fact that it involves the simplest, minimal left directed recoding and possesses the unique property that at least one zero must separate every nonzero digit in the recoded representation. As indicated in the introduction to Chapter h, Reitwiesner [9] has developed a division algorithm which generates a quotient in canonical, minimal form. This algorithm can also be derived from the right directed recoding which is equivalent to the canonical, minimal left directed recoding. Freiman [h] has shown that the S-R-T division algorithm, proposed independently by Sweeney and described by MacSorley [6], Robertson [10] and Tocher [13] » produces a minimally recoded quotient for normalized divisors, D, in the range 3/5 < |d| < J>jk. Wilson and Ledley [15] have presented a division algorithm which yields a minimally recoded quotient for all normalized divisors. Metze [7] has recently shown that the S-R-T method also yields a quotient in minimal form for all normalized divisors if the shifted partial remainders are compared with one of four constants each associated with a particular range of |D|. In the first section of this chapter we extend certain results of the preceding chapters to permit infinite representations. This is done so that Y includes the binary radix complement representation of all y in the interval - 1. < y < 1. Having established these extensions, the representation of y may be considered, finite or infinite as the situation demands. -118- -119- An arithmetic interpretation of the minimal recocting functions is developed in section 5«2. This permits the determination of the next mode digit by knowledge of the value or approximate value of a weighted representa- tion which includes the preceding mode digit and pertinent y. digits. It also provides an important link between the minimal right directed recoding functions and the minimal division algorithms. Minimal multiplication and division algorithms are discussed in the next two sections. These algorithms are defined in terms of minimal left and right directed mode functions respectively. Their use guarantees minimally recoded multipliers and quotients. Examples are given for n = 6 to illustrate the multiplication and division algorithms defined by SL. and SR. . These examples also provide an illustration of the interrelation of minimal multi- plication and division algorithms. The classes of semi-universal, minimal multiplication and division algorithms are defined. The latter class is shown to include the Wilson-Ledley algorithm and the Metze modification of the S-R-T algorithm. In the final section the interrelation of minimal multiplication and division algorithms is discussed. 5.1 Minimal Recoding Functions for Infinite Representations The definition of minimal multiplication and division algorithms is accomplished with less difficulty if infinite representations of y are allowed. We rule out all binary expansions which end in an infinite sequence of l's so that every real number, y, in the interval - 1 < y < 1 has a unique binary representation [2]. Having established uniqueness for the representation of y, most of the definitions and theorems of the preceding chapters may be extended to the -120- infinite case without difficulty. In this chapter we will be particularly- interested in the interpretation of Tables 4-3 and 4-4 when n is infinite. Inspection of Table 4-3 shows that Cases I and IV present no problem. Only the boundary sequences for X. = 0, 1 need to be examined in Cases II and 00 III. If A denotes an infinite alternating sequence, these boundary sequences are: y i-l y i y i+l J A A A 1 Case II \. ., = 1 l+l Case III \. n = l+l In Table 4-4 we note that Cases II and III are not affected by allowing an infinite n. In Cases I and IV. only the boundary sequences for p. =0, 1 need to be examined. These are? 1 A y i y i+l y i+2 < 1 A 1 1 A Case I Pi-1 = ± Case IV p i-l It is necessary to determine the values of X. and p. which guarantee a maximum gain in zeros over these sequences. To accomplish this, we define 00 A as an A sequence of infinite length. The inductive arguments used to prove Theorems 4-11, 4-12, 4-13, 4-14 and 4-15 are valid for p infinite. It follows that the maximum gains for A sequences listed in Tables 4-1 and 4-2 also apply 00 to A sequences. Theorem 4-16 is also valid and is used to determine the maximum composite gains over the sequences in question. ■121- In the left directed sequences, we allow a single unit to appear on 00 the left of A and set X = 1 as the left boundary condition if y < 0. If y > 0, the unit does not appear and \ , = 0. By using Theorem k—l6 and Table k-1 the following results. y > AVZ: p A = -, p z = 2; X. +1 = 1 => X.=0 — , 00 . — . 00 . G(0A 0Z1;0) = - 1 > G(0A 0Zl;l) =0-2 Al_Z: p A . », p z . i; X±+i . 1 =-, X. = 0, 1 G(0A°° 0Z1;0) =0-1 = G(0A°° 1Z1;1) =0-1 A°° U : P A = », P g = 1; \ +1 = z-$. \ ± = 0, 1 G(0A°° 0U0;0) =0 + = G(0A°° 1U0;1) =0 + : P A = °°; X. n = ^^ \. = A l+l ^^ l G(0A 0;0) =0 > G(0A 0;l) = - 1 y < 00 UA Z: Pu = 1, p a = oo, p z = 2; x ±+1 = 1 =^ \. = 0,1 G(1U0A°° 0Z1;0) =0 + 0-1 = G(1U1A°° 1Z1;1) =1 + 0-2 m_^: Pu = 1, p A = oo, p z = 1; x. +i = i -p, x± = i G(1U1A°° 0Z1;0) =1-1-1 < G(lUlA°° lZl;l) =1 + 0-1 UA_U: Pu = 1, p A = oo, Pu = !- x. +1 = => X. = 1 G(1U1A°° 0U0;0) =1-1 + < G(lUlA°° lU0;l) =1 + + UA°° : p TT = 1, p ft = oo; \ - o — -^ \. = 0, 1 *U A ' l+l 9 l ' — / 0° \ i 00 . G(1U1A 0;0) =1-1 ss G(1U1A 0;l) =1-1 -122- 00 00 It is convenient to assign \. a value of for the A 00, and A sequences 00 00 and a value of 1 for the A and A 1 sequences . This eliminates the need to differentiate on the basis of the sign of y. In the analysis of the four right directed sequences, we always choose the right boundary condition p = as n — > °° . The following results are obtained with the aid of Theorem k-l6 and Table k—2. UZA i P TT = 1, -P z = 1, p a = °°; p i _ 1 = 1 -=^- o i = G(0;1U0Z0A°° 0) = + + > G(1.;1U1Z1A°°0) =1-1-1 ua°° < p y = i, p a = °°; p ± _ ± = i ==^- p ± = o, i G(0_;1U0A°° 0) = + = G(l;lUlA°° 0) = 1 - 1 AUA : p A = 2, Pu = 1, p A = °°; p i _ i = o :=£► p. = 0, 1 G(0;0A0U0A°° 0) = + + = G(l;0AlU0A°° 0) = + + oo A__: P A = «. p i _ i = =^ p. = G(0;OA 0) = > G(l;OA 0) = - 1 00 00 00 00 Therefore, p. =0, 1 for 1A and OllA , and p. = for 10A and A . 5 .2 An Arithmetic Int erpretatio n of Minimal Mode Functions It is convenient to assign an arithmetic value to the partial sequences listed in Tables h-J> and k-k when discussing the application of minimal recoding functions to multiplication and division processes. Both the left and right directed partial sequences for n finite or infinite are interpreted as unique binary representations, y*, lying in the range -2 < y* < 2. Therefore, every minimal recoding function has a value of 1 over a unique set of values, y*, in the range -2 < y* < 2. -123- 5.2.1 The Left Directed Case Definition 5~1 « The Arithmetic Value of a Partial Left Directed Sequence Let every partial sequence, 3C. (n + A), X. , for n finite or infinite, be assigned a unique value, y , as defined below Li n+A-1 * y L (l+l) = y i + l 2X. . + l+l y i-j 2 -j-l (5:D j=0 By considering all possible partial sequences, it is clear that -2 < y T < 2. Table 4-3 as extended in section 5-1 yields the following results Case I: Case II: - 1 < y L (i+i Case III: - V3 5 y L ( i+1 - 3/2 < y^ 14 " 1 - 5/3 < y£(i+i - 4 - 2 y T *U+i Case IV: 5/3 < yj(i+i 3/2 < y*(i+l V3 < y*U+i l < y£(l+l o < y*(i+l < o < - l < - V3 < - 3/2 < - 5/3 < 2 < 5/3 < 3/2 S V3 < l X. = 1 1 X. = 1 1 X. = 1 o, 1 X. = 1 o, 1 X. = 1 X. a 1 1 X. = 1 o, 1 X. = 1 o, 1 \. = X. = In correlating these intervals with the mode functions defined in Chapter 4, it is convenient to partition the intervals over which X. =0, 1 into a set of disjoint subintervals . The intervals -3/2 < y T < - V3 an( 3- 5/3 < y T < " 3/2 are partitioned into a series of subintervals having end -124- points ax . and bx . . These end points are defined by Eqs . 5:2 and 5:3 J J which are valid for < j < n . 10 ax . J J - 3/2 ♦ £ 2 ' 2k ' 1 k=l x. 10 bx . J - 3/2 - ^ s"^- 1 (5:2) (5:3) k=l The intervals 3/2 < y* < 5/3 and 4/3 < y < 3/2 are partitioned into a series of subintervals having end points ax. and bx . . These end points are defined J J AL by Eqs . 5:4 and 5 '• 5 and are valid for < j < n . 01 , 10 fez \\ ax . = 3 + ax . (5:4} J u , 01 10 /_ _» bx . = 3 + ^x . (5:5) J J We can now make the following observations. NL.(l, 0, YT J =1 over the interval - 4/3 < Vt < - 1. Assuming that a. . = b. . = 1 in Eq. 4:l8 - L & ij ij and 4:19, AL. .(l, 0. Y^ . ) = 1 over ax 10 n < y* < ax 10 and EL. .(l, 0, YT , ) = 1 ' ij ■ ' l+l' j-1 — J L j ij ' l+l 10 * 10 / i \ / * over bx . < y T < bx . n . NL.(0, 1, YT , ) = 1 over 5/3 < y T < 2. Assuming j — L j-1 i v ' i+l' ' — "'L 01 ,01 , n n _Jj x 01 ^ * ^ 01 that a . . = d . . = 1 . AL..(0, 1 , YT , ) =1 over ax . . < y T < ax . and ij ij ' ij v ' » i+l' j-1 - J L j BL. .(0, 1, Y L J = 1 over bx 01 < yf < bx 01 n . As defined by Eqs. 4:31 and ij v l+l' j - J L j-1 4:32 it is also clear that AL. = 1 over - 3/2 < y T < - 4/3 and 3/2 < y T < 5/3; and BL. = 1 over - 5/3 < y < - 3/2 and 4/3 < Y T < 3/ 2 - J. Ij Li It follows that every restricted, minimal L.(\. ,, y. ., YT , J ' i x l+l' ^i+l l+l assumes a value of 1 over a unique set of subintervals in the range - 2 < * / o T j.i n / • 10 ,10 01 , -01 , .. y T < 2. In the most general case (i.e. when a. ., b. ., a. . and b. . are arbitrary J L & ij' ij' ij ij Boolean functions) a subinterval in the ranges - 5/3 < Y T < ~ V3 and V3 < Y L < 5/3 ma Y contain only one value •125- The set of symmetric , minimal L. defined in Chapter k can be easily- visualized in terms of the intervals over which X. = 1. Every symmetric, minimal L. has a value of 1 over - k/j> < y < and 5/3 < y T < 2; and may have i L L a value of 1 over any combination of the interval pairs i 10 ^ # . 10 01 - * . 01 x ( ax . ., < y7 < ax . : ax . n < y T < ax . ) and j-l-^L j j-l-^L j y , 10 . * ^ , 10 . 01 ^ * ^ , 01 n ( ^ F (-y) = -y' . This implies that if +1 appeared in y' ; then a -1 appears in -y' and conversely. Note that -y can be represented "by the diminished radix complement of y with X = 1. To interpret this in terms of a restriction on L . we examine the "basic recoding equation y! , = y. _ + X. , - 2\.„ Of the six allowed combina- & ^ J l+l J l+l l+l l tions of (y. . , \. . , A..), y! _ = for (0, 0, 0) and (l, 1, l): y! _ = 1 for w i+l' i+l' i" J l+l \ t > / \ } ) t> j 1+1 (010) and (100); and y! = -1 for (Oil) and (lOl). When y is replaced by -y, the first element in each combination is complemented. If yl , =0 for y, then y! =0 for -y. To insure this, the second and third elements of the combination must also be complemented. This also insures that +1 is replaced by -1 and vice versa. It follows that \. = L.(\. ., y. ., Y^ _) = (L.(\. ., y. ,, Y L .)) i i v i+l' J i+1' i+l 7 v i v i+l' "'i+l' l+l" where Y. implies that every element of the set is complemented. Since L.(\. ., y. .,■£.)= [L.(\. ., y. ., Y 1 . ) D ] , it is clear that X. = l i+l' ''i+l' i+l L i v i+l' J i+1' i+l' J ' l L.(\. . , y. . , YT n .) = L. (\. n , y. n , YT . ) . Note that X = 1 as required. l i+l' ''i+l' i+l' i v i+l' ''i+l' i+l' n Part II If L. = L., then L. = L. . This implies that if y is replaced by ii'ii its diminished radix complement, then X must also be replaced by its dual. In doing this X = 1 so, in effect, y has been replaced by -y. As shown above, the basic recoding equation replaces y'. . by -y'. ,. Therefore, if F T (y) = y', 1+1 1+1 1j then F (-y) = -y ! . It follows that any L. which satisfies the condition Ju 1 L. - L. must be an element of c< . li a -127- It has already "been shown that SL. = SL. . The canonical, minimal recoding which SL. produces is easily shown to have the property of arithmetic X symmetry. NL. and EL. are clearly not elements of The minimal L. e cZ in which "T7 . includes only those y. to the left 1 a l+l J ° j of y . , can be readily interpreted in terms of y' . The interval map of every i+1 L restricted, minimal L. that is self -dual can he constructed by the following procedure. For every y (i+l) in the interval h/j> < y < 5/3 assign X. a value of or 1 as desired. Over the intervals < y < k/ 5 and 5/3 < y T < 2, X. has the required values of and 1 respectively, The value of X. that is assigned to every y'(i+lj in the interval - 2 < y < is now determined. For every y in the interval < y < 2 there is y^ in the interval -2 < Li — L L "- *D < . We require that X. be associated with y T ^ if A., is associated with J L * i °L 1 y . This requirement is automatically satisfied for those intervals over which the value of X. is fixed for a restricted, minimal L.. Therefore, to insure 1 ' 1 ' that L. = L. it is only necessary to guarantee that the requirement is satisfied for the intervals in which the value of X. may be arbitrarily chosen. It is clear from this interpretation that SL. is the only symmetric, minimal L., as defined in Chapter k, that is also an element of _ 5.2.2 The Right Directed Case Definition 5~3 ° The Arithmetic Value of a Partial Right Directed Sequence. Let every partial sequence, p. , , X (n+A), for n finite or infinite, 1--L K -* be assigned a unique value, y_., as defined below. n n+A **M ' y i " 2p i-i + I y i +j 2 " J (5:6) ■128- *, This definition of yd) is used to obtain the following interpre- tation of Table 4-4 as extended in section 5»1« Case I: -2/3 < y R d, > < p i = 1 - 3/4 < y R d ) < - 2/3 p i = o, 1 - 5/6 < y R d ) < - 3/4 p i = o, 1 - 1 < y R d ) < - 5/6 p i = Case II: - 2 < y R d > < - 1 p i = 1 Case III: 1 < y R d ) < 2 p i = Case IV: 5/6 < y R d. i < 1 p i = 1 3/4 < y R d. > < 5/6 p i = o, 1 2/3 < y R d, i < 3/4 p i = o, 1 < y R d, i < 2/3 p i = As in the left directed case, it is useful to partition the intervals over which p. =0, 1 into a set of disjoint subintervals . The intervals - 3/4 < y R < - 2/3 and - 5/6 < y R < - 3/4 can be partitioned into a series of sub- R intervals having end points ex. and dx . . Equations 5*7 an d 5°8 define ex. J J J and dx 11 for < j < n*. ex 11 k=l J dx 11 = - 3/4 J -2k-2 -2k-2 (5^7) (5:8) k=l -129- The intervals 3A < y D < 5/6 and 2/3 < y^ < 3A can be partitioned into a — n — r\ series of sub intervals having end points ex. and dx . . Equations 5^9 an( i J J 5:10 define ex. and dx . for < j < n . J J ex°° = 3/2 + exf ( 5 :9) J J dx°° = 3/2 + dx 11 (5:10) J J Note that NR.(l, 1, Y?) = 1 over the interval - 2/3 < y * < . By 11 K setting c 11 = d 11 = 1 in Eqs. i+:52 and k:5k, CR. .(l, 1, Y R ) = 1 over ex 11 , < y* < exf and DR (l, 1, Y?) = 1 over dx^ 1 < y* < dx^ 1 . NR (0, 0, Y*) = 1 K J IJ 1 J — K J-l 1 1 over 5/6 < yj < 1. If we let c°° = &°.°. = 1 in Eqs. l+:58 and k:60, CR. .(0, 0, Y?) K ij ij ij 1 = 1 over ex . < y* < ex . and DR. . (0, 0, Y. ) =1 over dx . < y^ < dx . . . By J - - 1 - — R J ij 1 J — R J-l Eqs. 1^:73 and ^:7^, it is apparent that CRi = 1 over - j/k < y* < - 2/3 and 3A 1 Yr 5 5/6; and DR. = 1 over - 5/6 < y* < - 3A and 2/3 < y* < 3A- Every restricted, minimal R. has a value of 1 over a unique set of subintervals in the range - 2 < y < 2. The set of symmetric, minimal R. — K 1 includes those R. which have a value of 1 over - 2 < y^ < -1. - 2/3 < y„ < 1 — J R ' ' ^R and ^6< y* < 1; and may have a value of 1 over any combination of the interval t 11 , * . 11 00 , * . 00x , , , 11 . * , 11 ,00 pairs (cx.^ < y R < cx^ ; cx.^ < y R < ex. ) and (dx.^ < y R < dx . ; dx._ ± * 00 \ < y_. < dx . ). The symmetric, minimal R. defined as NR., SR. and ER. have — "'R j ' 1 11 1 the following interval maps . NR. = 1 over - 2 < y* < - 1, - 2/3 < y* < and 5/6 < y* < 1. SR. = 1 over - 2 < y* < - 1, - 3/^ < y* < and 3A 1 Y^ < 1- ER. = 1 over - 2 < y*.< - 1, - 5/6 < y* < and 2/3 < y* < 1. Right directed recoding functions which possess the property of arithmetic symmetry are of interest in the study of division processes. This ■130- property is not limited to minimal R., so the following definition and theorem are stated in rather general terms . Definition 5-k : The Set of Arithmetically Symmetric Right Directed Mode Functions Let U\ denote the set of R.(p. . , y., YV) in which Y. may include a i^i-l' 1 l l y. to the left and right of jr., and whose corresponding recoding functions J -*- F T3 (y) have the property of arithmetic symmetry. F 1D (y) = y' has the property of arithmetic symmetry if and only if F_(-y) = -y 1 . (R. X D Theorem 5-2: The necessary and sufficient condition that R. e \J\ is for ■ — — - — ■ ° l a R. = R i l Proof: The proof of this theorem follows the same pattern as the one given for Theorem 5-1° In Chapter k it was shown that SR. s SR. , so SR. e Q\ . Since i i' i a NR. = ER. neither NR. nor ER. are elements of 0\ . 11 11 a The restricted, minimal R. which are self -dual and therefore elements ' l of \J\ are represented by a unique set of interval maps. The procedure used 3. to construct these maps is identical to one used for the minimal L. ecx . It ^ i a is clear from this set of maps that SR. is the only symmetric, minimal R., as defined in Chapter k, that is also an element of _ = y^ = 1. Proceeding in this manner we obtain X, = X = and consequently y = y and y, = y, . At y we note that y (3) = 1 + 0.011111 where three units have "been added to account for negative sign propagation as y is shifted right. Since < y.(3) < 3/2, ^« = and y_, = y_. On the next - 1 2 3 3 ^. step y*(2) = 0.111111. Since 5 y T (2) < 3/2, \ = and y' = y . Continuing Li J.J 1 2 2 we obtain 3/2 < y L (l) = 1 + 0.111111 < 2, so X = 1 with y' = y - 2 = 1. At y , - 3/2 < y*(0) = -1 + 0.111111 < 0, so \ = 1 with y' = y +1-2=0 which satisfies the boundary condition X = y . It follows that y' = 0.101001 = - 23/61+. By using -M = 1.010011, the multiplication, P = y'M, is accomplished with three additions. 0.000000101101 0.000101101 1.1010011 10J5 t \f k5 p 7 . 1.101111110101 In working with L. it is convenient to extend the definition of y . i L> This is accomplished by replacing the term (y. - 2X. ) in Eq. 5:1 with the term (y • -, + 2y. - k-X . -, ) • Note that every extended partial sequence still corresponds to a unique y . Substituting K. in Eq. 5:12 yields -Li I A J i "i+l'i+l v "i+r 7 i+l- 7 i+2 "i+r 7 i+l J i+2 ~i v ~> ^ *i+l " — - — L L . =K^y<^ V \.^y, ,-,y, l0 V \, , n y, , n y, i0 l, (o, i, Y^,J y \+l y i+l y i+2 L i (l > °' 4l } where L.(0, 1, Y 1 ) and L.(l, , ^ ) are defined by Eqs . 4:100 and 4:101. In terms of the extended definition of y T ; X. n y. j. _ L.(0, 1. YT , ) =1 J 1/ x+r i+l* 7 1+2 i N ' ' i+l y over 4/3 < y* < 2 . an * X i+ iyi + iy i+ 2 L i (l ^ °' ^+1^ = 1 over " k ^ - y L < " lm Likewise x ±+1 y ±+1 (y ±+2 V y i+2 ) = 1 over - 3 1 y L < - 2 and - 1 < y * < while ~X-,-,y - +1 y • , p = 1 over 3 < y < 4. Thus in the interval - 4 < y < 4, L. = 1 over - 3 < y* < - 2, - 4/3 < y* < 0, 4/3 < y£ < 2 and 3 < y£ < 4. A Note that L. = over exactly those intervals obtained by taking the dual of a A A D each of the L. =1 intervals. It follows that L. = L. which also can "be verified i 11 by Boolean operations. A We now recode y by L. using the arithmetic interpretation given above. Since X^ = and y = 0, y*(6) = 1 + 0.001011. It follows that X = and yl = yg since < yA6) < k/j. At the next step, 2 < y (5) < 3 so \. = and y R = y . Proceeding in this manner we obtain y' = 0.011001 = - 23/6*4-. The multiplication , P = y' M, is completed with one addition and two subtractions of M. 0.000000101101 1.111010011 1 . 11010011 -1035 P ? = 1.101111110101 = -^ If -y were used as the multiplier, SL. would yield -y' = 0.101001 A _ A and L. would yield -y ! = 0.011001 because SL. and L. are both self -dual. 1 J J 11 Definition 5-6 ; Universal, Minimal Multiplication Algorithm (u.m.m.a.) A u.m.m.a. is based in Eq. 5°H with X. = L. where L. is any element ^ ' 11 1 of cC > a subset ofc-C. Since a minimal L. is, in general, a function of y.to the left and 1 J right of y. , the corresponding multiplication algorithms are not always practical. To improve on this, we consider the class of semi-universal, minimal multiplication algorithms as defined below. Definition 5~7 ° Semi -Universal, Minimal Multiplication Algorithm (s-u.m.m.a.) A s-u.m.m.a. is any u.m.m.a in which oC includes only restricted, minimal L. . 1 I -155- An easy way to visualize the class of s-u.m.m.a. is in terms of the values of y T (i+l) for which \. = 1. Since YT . includes only those y. to the J L l l+l j left of y. , , the interval - 2 < y < 2 suffices for this purpose. We know i+1 J-i from section 5-2.1 that \. must equal 1 over - h/~$ < y T ( i+ l) < ° and 5/3 < 1 — Li — y (i+l) < 2 and \. may equal 1 over - 5/3 < y (i+l) < - k/j and k/j < y (i+l) L/ 1 Li L < 5/3- For any s-u.m.m.a., X.( 0< i < n-l) must he 1 over the first pair of intervals. For a particular s-u.m.m.a., \. = 1 over some set of values in the second pair of intervals, hut the values included in that set may change with i. The simplest s-u.m.m.a. is the minimal multiplication algorithm based on SL.. In specifying the simplest s-u.m.m.a. we choose the set 0. Substituting this in the modified form of Eq. 5:1^ for i = yields p " 2d -1 + ^0 + y R (0) = y o + p o " 2p -l + - Simplifying, rearranging, multiplying by 2 and substituting j + 1 for j in 3 y p (0) yields -137- 2P — = y i " 2p o + y R (1) - 2P It follows that -7— = y*(l). JJ K 2P * "X* .y.y. We now assume -=— = y_,(i) = y. - 2p. + y_ (i) . By substituting JJ Ja 1 1-1 n this equation in the modified form of Eq. k-:lk and simplifying as before we 2P i+1 "*/ \ obtain — - — = y i+1 -2p j[ + y R (i+1). 2P. Corollary : - 2 < -rp < 2 . Proof: We know that < p. . < 1 since p. , = R. _(p. _. y. _, Y. .). The — l-l — "i-l l-l i-2 l-l l-l uniqueness of the representation of y was established in the infinite case by ruling out all representations which terminate in an infinite series of units. Therefore, < y_ (i) < 1. — n X3 Theorem 5-5 : If p . = R.(p. , , y . , Y.)% and R. is arbitrarily chosen from the — - 1 11-I 1 1 ' 1 total class of right directed mode functions, then y- = - 1 if - 2 :h and its characteristic function, S.(y., Y.). If R. is arbitrarily chosen, the value of p. is not always uniquely defined. In essence, p. = 1 -158- if p. =1 and y. = 0; p. = if p. = and y. = 1: and p. =0, 1 if l-l i "i "i-l J i ' K i ; Pi-1 = y i" If - 2 < y (i) < - 1, then examination of Eq. 5:6 shows that p. . — R 1-1 must he 1. By adding 2p . , to this inequality we ohtain _< y. + y (i) < 1 l-l i R which shows that y. must be 0. When (p. , y.) = (l, 0), p. = 1 by Eq. 3:^; = -L and y ± = y i + p ± - 2f> 1 _ 1 If -1 < y R (i) < 0, then Eq» 5:6 again shows that p. must be 1. ,y y y y Adding 2p . to this inequality yields 1 < y. - y_ (i) < 2 where y (i) is i-1 — i R R defined by Eq. 5°l6° Since < y D (i) < 1, y. must be 1. When (p. , y.) — K 1 l-l i = (1, l), p. = 0, 1 as defined by Eq„ ^:k with S. = 0, 1. It follows that 7-1= -1, 0. If < y„(i) < 1, then Eq, 5:6 shows that p . . = since < — R 1-1 — y-D (.ij < 1. Therefore 0 Y i> ■ Pi.i^i v (pi-i v V *± (5:19) A In this equation S. = SJ. is defined by Eqs . 4:95, 4:9b and 4:97 of section 4.4. Let 2P = 1.101111110101 = - i~H and D = 0.101101 = g| . Since the division is exact, y' (6) must be a minimal recoding of y = 1.101001 = - 23/64. Note that this division is the inverse of the multi- plication example given in section 5- 3° We consider SR. first. The interval map for SR. given in section 5,2„2 shows that p = 1 for - 2 < y R (i) < - 1, - 3/4 < y R U) < and 3/4 < y R (i) < 1. By Theorem 5-5 and its Corollary y. must be uniquely specified over the entire range of - 2 < y^Ai) < 2. The rules for choosing y. when — K l p. = SR. are given below, H i 1 & 7[ = -1 if - 2 < y*(i) < - 3/4. y- = if - 3/4 < y*(i) < 3/4. y!_ = 1 if 3/4 < y*(i) < 2. -143- Note that in the class of minimal division algorithms the "boundaries on y (i) are sharp. In this case y. must be for y*(i) = ~5>/h - e for e K i rv arbitrarily small but not 0. If e = then y". must equal 1. If this is not true, then one or more minimal R. v other than SR., govern the choice of y' near the boundaries. Division algorithms, which permit this, belong to the class of universal, minimal division algorithms which is considered later. To insure that the boundaries are sharp all of the bits of D and 2P. must be used in determining y (i). That is, precise knowledge of y*(i) must be available at n K every' step. For this reason the class of minimal division algorithms is impractical. In the present example, y!t(°) = y = ~qI • Therefore, y' = yielding P ± = 2P - 0. It follows that y£(l) = - || so y^ = 0. P 2 = 2P 1 - = kP Q and y*(2) = - f| so y^ = - 1 . P^ = 2P 2 + D = (y*(2) + 1) D = - ^H and y*0) = - J so y^ = - 1 . p^= (y*(3) +dd-5^ «* *>> =1 bo y ; = o. P 5 = 2P^ - and y*(5) = | so y^ = 0. P/- = 2P„ Therefore , > 6 = 2P 5 - and y*(6) = 1 so y g = 1 P ? = (y*(6) - 1) D = — — 2^ The recoded quotient y' (6) = 0.011001 = - zr which is identical to the recoded multiplier that was obtained in the preceding section by using a minimal multiplication algorithm based on L.. This was expected since L. is equivalent to SR. - ■Ikk- We now develop the rules for choosing y. in the minimal division A algorithm based on R.. Equation 5*19 ma y be written as P. = P- -, y. V P- i y. NR.(1, 1, Y R ) V p. - y. NR.(0, 0, Y R ) y l l-l l l-l l l l T 'l-l i i ' ' i pi-i ? i C V ' °> Y i> v p±.i 'i DR i(°' °- Y i ) • From the results of section 5.2.2 p, =1 for - 2 < y„(i) < - 1, - 2/3 < i — R — y R (i) < and 2/3 < y R (i) < !• The corresponding rules for choosing yl are given below o y{ = ■ 1 if - 2 < y*(i) < - 2/5. y!_ = if - 2/3 < y*(i) < 2/3. y!_ = 1 if 2/3 < y*(i) < 2. As before, y R (0) = y = - 23/6^ so y' = 0. P = 2P - and y R (l) = - 23/32 so y[ = - 1. P 2 = (y*(l) + 1) D = (9/32) (>^M) and y*(2) = 9/l6 so yg = 0. P^ = 2P 2 - and y*(3) = 9/8 so y^ = 1. P^ = (y*(3) - l) D and y*(k) = 1/k so y' k = 0. P^ = 2P^ - and y*(5) = l/2 so y^ =0. P 6 = 2P 5 - and y R (6) = 1 so y, = 1. Therefore P = (y R (6) - l) D = 0. The recoded quotient y 1 (6) = 0.101001 = - 23y / 6^- is identical to the recoded multiplier obtained in section 5 "by using the canonical, minimal multiplication algorithm. As in the previous example, this was expected A because SL. is equivalent to R. . If 2P were replaced by - 2P , the algorithm based on SR. would yield - y'(6) = 0.011001 and the algorithm based on R. would yield -y' (6) = — _ A 0.101001, This is a consequence of the fact that both SR. and R. are elements ) ■H5- Definition 5~9 ° Universal, Minimal Division Algorithm (u.m.d.a.) A u.m.d.a. is of (A , a subset of (jt A u.m.d.a. is based on Eq. 5°!^ with p. = R. where R. is any element To limit the discussion, we consider a subclass of u.m.d.a. desig- nated as the semi-universal, minimal division algorithms, s-u.m.d.a. A typical element of this subclass is defined as follows. Definition 5-10 ° Semi -Universal, Minimal Division Algorithm (s-u.m.d.a.) A s-u.m.d.a. is any u.m.d.a. in which (j\ includes only restricted, minimal R. . 1 A typical s-u.m.d.a. is defined by (j\ = (SR., R.). The corresponding rules for choosing y. are given below. y[ = - 1 if - 2 < y*(i) < -3/k. y! = -1,0 if - 3/k < y*(i) < - 2/3. Y ± = if - 2/3 < y*(i) < 2/3» y[ = 0, 1 if 2/3 < y*(i) < 5A- y[ = i if 3/^- < y*U) < 2, This s-u.m.d.a. is equivalent to the Wilson-Ledley algorithm [15]- In that algorithm the partial remainder is always normalized and then (depending upon the range of the approximate partial quotient) multiplied by 2, 1 or 2 before adding or subtracting the divisor. If Q(j) represents the absolute value of the partial quotient based on a normalized partial remainder, the shift rules and the effective quotient digit before shifting are as follows. 1 or + 1 + 1 o, + : L ( Dr + 1 or + 1 -146- RANGE SHIFT EFFECTIVE y 1/2 < Q(j) < 2/3 2 2/3 < Q(j) < 3/4 2 or 1 3A < Q(J) < V3 1 4/3 < Q(j) < 3/2 2" 1 or 1 3/2 < Q(j) < 2 2" 1 Let [ y ( i ) | represent the absolute value of i partial quotient in K the s-u,m.d.a. defined above . If < |y (i) | < l/2 ; the partial remainder is not normalized and y. = 0. This agrees with the Wilson-Ledley algorithm since a quotient digit is inserted during each shift to normalize the partial remainder. If 2/3 < |y*(i) | < 3/4, y[ = 0, + 1. If 3/4 < |y*(i)| < 4/3, y. = + 1. Both of these cases agree directly with the Wilson-Ledley algorithm. If 4/3 < |y (i)j < 3/2, then y. = + 1. In the Wilson-Ledley algorithm we may shift the normalized partial remainder right one bit position at this point* The corresponding range for |y R (i-l) J is derived from the above range by assuming y. = 0. Thus 2/3 < |y*(i-l)J < 3/4 so that y! = or + 1. If yl , =0, we have already observed that y. = + 1. If y. = + 1, then the new range for y£(i) is - 2/3 < y R (i) < - l/2 so y. =0. Likewise, if y. = -1, then the new range is l/2 < y R (i) < 2/3 so y! =0. If 3./2 < |y R (i)| < 2, then y. = + 1. In the Wilson-Ledley algorithm we always shift right in this case. The corresponding range for y (i-l) j is again obtained by assuming y = 0. Thus 3.A < |y (i-l)| < 1 so y! = +_ 1. This shows that a right shift of one bit position is necessary. In the given s-u.m.d.a. ; we obtain 3/2 < |y*(i) | < 2 only if y!^ = + 1. If y\ ^ = + 1, then the new range for y R U) hased on 3/4 < y*(i-l) < 1 is - l/2 < y*(i) < so y! = 0c If yl = -1, the new range is < y R (i) < l/2 so y! =0. -147- In the given s-u.m.d.a. , if y! n = + 1 and y! £ then yl must equal + 1, and if y' = - 1 and y! £ then y! must equal - 1. Let j/k < y*(i-l) < 2, then y! _ = + 1. It follows that + l/2 < y*(i) < 2 so y! = 0, + 1. * R l-l — K l Likewise, if - 2 < y*(i-l) < - 3A, then y! = - L Therefore, -2 < y*(i) < — n 1-1 — n l/2 so y' =0, - 1„ This is a characteristic property of the Wilson-Ledley algorithm. In the physical realization of any s-u.m.d.a. the amount of hardware 1 that is necessary to determine y. is a function of the width of the ■boundary- intervals. The precision to which y^i) must "be known is clearly less for larger widths. In the preceding example the width is l/l2. Theorem 5-7 shows that a maximum width of l/6 is possible. To achieve this maximum width we con- sider the s-u.m.d.a. defined by CM = (ER., NR.)„ The corresponding rules for choosing y. are those given in the hypothesis of Theorem 5-7* The S-R-T algorithm is equivalent to this s-u.m.d.a. for 3/5 < |D| - 3/4 as verified by Freiman's statistical analysis [k]. In the S-R-T algorithm, the shifted partial remainders, 2P., are always compared with the constant l/2. The rules for choosing y! may be stated as follows. •- 1 lf w - y R (1) < m - ° if m- y R (1) < m -x ■ x lf m- y R (1) < w In order for this algorithm to yield minimally recoded quotients, the conditions of Theorem 5-8 must be satisfied where w = z and 2/3 < z < 5/6. Therefore 1 -. 1 > z__. and -r^T < 2z„ . It follows that a minimal quotient 2 1 D I — Mm I D I — Max will be generated for 3/5 < |d| < 3/4„ -148- The Metze modification of this algorithm [7] permits generation of minimally recoded quotients over the entire normalized range of D. The rules for choosing y! are similar to those for the S-R-T algorithm except that I */ \ I K K y„(i) is compared with -r=rr where K is chosen such that z r „. < —=— < z., |J R V /( * \D\ Mm - D - Max is always satisfiedo The range of |d| for a given K is therefore 6/5 K < |d| < 3/2 K. Metze has shown that three constants will suffice to cover the entire range of |D| but that four or more require less precision. Another prediction technique that takes advantage of the s-u.m.d.a. defined by (/[_. = (ER., NR„) is now considered. Note that y^Ci) may be compared 1 i K with 3/4 with a precision of + 1/12. Let y R (i) represent the approximate value */ \ of y_(ij. The rules for choosing y! are given below. a 1 y. = - 1 if - 5/3 < y R < - 3A • y[ = if - 3/4 < y* < 3/4 . y ± = 1 ^ 3A < y R < 5/3 • A-& . . / Provided the error in y (i) is never greater than 1/12 in absolute R value, the outer limits of + 5/3 are guaranteed. Let A A |2P. I = |2P. I + a and |d| = |d| + where |a| M&x = |p Max A A A A We form 3/4 |d| and compare with |2P. | at each step. If |2P. | < 3/4 |d|, y. = 0. It is necessary to insure that in the worst case this implies that |2P. I < 5/6 |D|. Therefore, we let |2P.| - |a ^ < 3/4 |d| + 3A |p| M&x and require that 3/4 |d| + 7/4 |a| < 5/6 |d|. This implies that |dL. < -W- • In the worst case Id| = l/2, so Ice I., = IpL < l/42. The maximum precision for both D and 2P. is therefore 2 „ A similar argument for the lower bound of 2/3 |d| yields the same precision requirements. -149- 5-5 Interrelation of Minimal Multiplication and Division Algorithms Minimal multiplication and division algorithms are defined by a particular minimal mode functions, L. and R., where L. . = L. and R. = R. _ . * '11 l-l i l i+l for < i < n - 1. Because of the identity requirement, the corresponding sets of minimal mode functions, L(y) and R(y), are completely defined when L. and R. are specified. Under these conditions there exists a unique minimal R. which is equivalent to a given minimal L. and conversely. This equivalence was established by Theorems 3-5 an( i 3-6 and modified slightly in section k.k. Definition 5-11 : Inverse Multiplication and Division Algorithms If the product xy is formed by a multiplication algorithm in which the multiplier, y, is recoded as y', then the inverse division algorithm generates a recoded quotient, y' ' = xy/x, which is identical to y ! for all yeY. Theorem 5-9 • For every minimal multiplication algorithm there exists an inverse minimal division algorithm and conversely. Proof : Every minimal multiplication algorithm is uniquely defined by some L.ejl where L. . = L. for < i < n - 1. If we extend this definition such l l-l i — — that L , = L. for n + 1 < i < 2n, then Eq. Ik 91 defines a J. which, when n-1 j — — ' i substituted in Eq. 3: 9. yields the equivalent minimal R. for < i < n - 1. This R. uniquely defines a minimal division algorithm. By Definition 5-H this division algorithm must be inverse to the given multiplication algorithm since R. is equivalent to L.. By a similar argument the converse is also true, Two examples of inverse minimal multiplication and division algorithms were given in sections 5«3 an( i 5-^« In the first example, the -150- canonical, minimal multiplication algorithm which is defined by SL. was shown to be inverse to the minimal division algorithm defined by R. . In the second example, the minimal division algorithm defined by SR. was shown to be inverse A to the minimal multiplication algorithm defined by L.. The equivalence of SL. A A to R. and SR. to L. was established in section k.h. 1 11 The practical consequences of inverse minimal multiplication and division algorithms are nil since the minimal division algorithms require a full length comparison of divisor and shifted partial remainder. If the minimal division algorithm is not based on a restricted, minimal R., some or all of the quotient digits that have been generated must also be examined . Likewise, if a minimal multiplication algorithm is based on an unrestricted, minimal L., some or all of the previously used multiplier digits must be examined at each A step. The minimal multiplication algorithm defined by L. provides an example of this. Under the condition that L. _ = L. and R. = R. _ for < i < n - 1, l-l l l l+l - - A it is conjectured that SL. and its equivalent R. are the only simple examples of equivalent minimal mode functions which are also restricted. If this conjecture is true, then the only simple minimal multiplication and division A algorithms that are inverse and restricted are defined by SL. and R. & ' i l respectively. It is theoretically possible to define universal, minimal multiplica- tion algorithms which are inverse to universal, minimal division algorithms L process. Once this is known, Eqs. ki^l and 4:92 provide the link between the and conversely. In order to do this it is necessary to know the minimal L or minimal R.e CX. that is used at each step of the multiplication or division equivalent L. and R. . In practice this information is not available. The practical semi -universal, minimal division algorithms allow R. to range over -151- the set (A. and do not require that it "be precisely defined at each step. For this reason, any practical s-u.m.d.a., such as the Wilson-Ledley algorithm or the Metze modification of the S-R-T algorithm, can not be used to define an inverse universal, minimal multiplication algorithm in the sense of Definition 5-11. 6. CONCLUSIONS 6.1 Summary The purpose of this investigation was to analyze arithmetic recodings in general, minimal "binary recodings in particular and to show how the latter are used to define fast multiplication and division algorithms. A brief summary of the investigation is given below. The analysis of general arithmetic recodings was conducted in Chapter 2. A set of recoding functions was developed which transforms a radix representation having digits, y„, in the range < y. < r - 1 into an alge- braically equivalent radix representation having digits, y!, in the range ! 1 - r < y. < r - 1, It was shown that this transformation can be defined at — J l — each digital position by y! = y. + m. - rrn. where the mode digits, m., have a value of or 1 and are chosen such that the range restriction, 1 - r < y\ < r - 1, is always satisfied. A set of mode functions was introduced which defines each m. in terms of the y. digits and controls the characteristics of i l D the recoded representation. A one-to-one correspondence was shown to exist between recoding functions and mode functions „ Left and right directed recoding functions and mode functions were recognized and defined in terms of the order in which the recoded digits are generated. The existence of equivalent left and right directed mode functions was established. The results of Chapter 2 were specialized to include only the binary case in Chapter 3 an d all following chapters. As a consequence of this, the left and right directed mode functions assumed a Boolean form. It was also demonstrated that every set of left directed mode functions has an equivalent set of right directed mode functions and conversely. Sets of left and right directed mode functions were defined as being equivalent if and only if their -152- -153- corresponding sets of recoding functions produce identical recodings of the original representation. In Chapter k, the added constraint that the recoded representation must contain a minimum of 1 and 1 digits was applied. The introduction of a suitable set of theorems concerning the optimum choice of the next mode digit ultimately led to the explicit definition of restricted, minimal left and right directed mode functions. In this context a left directed mode function was defined to "be restricted if the set of independent variables was void of any y. to the right of the digit "being recoded. A restricted right directed mode function was similarly defined. Three principal mode functions of this type were defined and investigated for both the left and right directed cases. The simplest, minimal left directed mode function was shown to yield the canonical, minimal representation. A method of obtaining all minimal, left and right directed mode functions was suggested. In Chapter 5, minimal left and right directed mode functions were used to define multiplication and division algorithms which generate minimally recoded multipliers and quotients. Algorithms defined by a single minimal mode function were classed as minimal algorithms. Those defined by two or more minimal mode functions were classed as universal or semi-universal, minimal algorithms depending on whether or not the mode functions are un- restricted or restricted. Two examples of minimal multiplication and division algorithms were given. Multiplication and division algorithms were defined to have an inverse relationship if they produce identical recodings of all multipliers and quotients which are algebraically equal. Inverse minimal multiplication and division algorithms were studied in terms of the minimal left and right directed mode functions which define them. -15k- 6.2 Results and Conclusions An arithmetic recoding which converts a unique integral radix repre- sentation into a redundant integral radix representation was effectively analyzed as a one-to-many mapping with algebraic value preserved. In the "binary case it was shown that the characteristics of a minimal representa- tion are governed Toy a set of Boolean mode functions. We may conclude that an appropriate choice of these mode functions can be used to control other properties of the recoded representation in addition to, or in place of, a minimum of nonzero digits „ It was also demonstrated that for every set of left directed Boolean mode functions an equivalent set of right directed Boolean mode functions can be created and conversely. A deterministic approach was successfully used to derive the Boolean form of restricted, minimal left and right directed mode functions. A similar approach might prove useful in the derivation of mode functions which guarantee other characteristics of the recoded representation. It was shown that multiplication algorithms which use minimally recoded multipliers can be uniquely defined in terms of minimal left directed mode functions. In an analogous manner, minimal right directed mode functions were shown to uniquely define division algorithms which generate minimally recoded quotients. The minimal multiplication algorithm defined by the canonical, minimal left directed mode function was shown to be the simplest to implement since the digits of the multiplier are precisely known. The semi- universal, minimal division algorithms which are defined by a set of restricted, minimal right directed mode functions were found to be most practical. This is due to the fact that the choice of the next quotient digit as + 1 or can be based on whether or not the predicted partial quotient, Q. , satisfies y < |Q.| J J where 2-/3 5 f — 5'/ 6. Regardless of where y falls in this range, the recoded -155- quotient is guaranteed, to have a minimum of nonzero digits. The Wilson-Ledley algorithm and the Metze modification of the S-R-T algorithm were shown to "be semi -universal, minimal division algorithms. It was previously known that multiplication algorithms which recode multipliers in a nonredundant manner have corresponding inverse division algorithms which produce an identical nonredundant recoding of the quotient . On the "basis of this investigation, we may conclude that this inverse relation- ship still exists when the multiplication and division algorithms involve redundant recodings. In the case of minimal recodings, the inverse relation- ship was shown to depend on the equivalence of the minimal left and right directed mode functions which define the multiplication and division algorithms It is conjectured that there are no simple minimal multiplication algorithms which have simple inverse minimal division algorithms and conversely. 6.3 Areas for Further Study Many extensions of this investigation are possible. An analysis of the other properties which binary recoding functions possess would be of interest from a practical standpoint. For example, if the time required to change the multiple of the multiplicand or divisor that is fed to the adder is large and the difference in the time to add a fixed multiple or zero is small, a minimal derivative recoding may offer more advantages than a strictly minimal recoding. An approach similar to the one employed in Chapter k might be used to obtain mode functions which guarantee a recoding having this and/or other properties. A greater knowledge of the recoding properties associated with a given class of mode functions would permit selection of the most efficient multiplication and division algorithms for a given computer topology. -156- BIBLIOGRAPHY 1. Avizienis, A., "Signed-Digit Number Representations for Fast Parallel Arithmetic/' IRE Transactions on Electronic Computers , Vol. EC-10, No. 3 (September 196l), pp. 389-^00. " 2. Birkhoff, G. and Mac Lane, S., A Survey of Modern Algebra . (Macmillan Company, New York, N. Y., 1953), PP° 356-368. 3o Burks, A, W., Goldstine, H. H. and von Neumann, John, Preliminary Discussion of the Logical Design of an Electronic Computing Instrument . Part 1, Volo I, Second edition revisedo A Report of the Institute for Advanced Study, Princeton, New Jersey, (September 19^+7) • k. Freiman, C. V., "Statistical Analysis of Certain Binary Division Algorithms," Proceedings of the IRE. , Volo k9 (January 1961), pp. 91-103. 5. Lehman, M., "High Speed Multiplication," IRE Transactions on Electronic Computers , Vol. EC-6 (September 1957), pp. 204-205 . 60 MacSorley, 0. L., "High-Speed Arithmetic in Binary Computers," Proceedings of the IRE , Volo k9 (January 196l), pp. 67-91. 7. Metze, Go, A Class of Binary Divisions Yielding Minimally Represented Quotients , File No. 466 of the Digital Computer Laboratory, University of Illinois, Urbana, Illinois, (July 1962)0 8. Metze, G. and Robertson, J. E., "Elimination of Carry Propagation in Digital Computers," Proceedings International Conference on Information Processing, Paris, France; June 13-23, 1959 - 9. Reitwiesner, G. ¥. , "Binary Arithmetic," Advances in Computers , F. L. Alt, Editor, Academic Press, Inc., New York, N. Y., i960. 10. Robertson, J. E., "A New Class of Digital Division Methods," IRE Transactions on Electronic Computers , Vol. EC-7 (September 1958), pp. 218-222. 11. Robertson, J. E., Theory of Computer Arithmetic Employed in the Design of the New Computer at the University of Illinois . Notes for the University of Michigan Engineering Summer Conference "Theory of Computing Machine Design," Ann Arbor, Michigan; June 13-17> I960. 12 o Staff of the Digital Computer Laboratory, On the Design of a Very High - Speed Computer . Report No. 80 of the Digital Computer Laboratory, University of Illinois, Urbana, Illinois, (October 1957), pp. 17^-220. 13. Tocher, K. D. , "Techniques of Multiplication and Division for Automatic Binary Computers," The Quarterly Journal of Mechanics and Applied Mathematics, Vol. 11 (August 1958), pp. 364-384. -157- 1k. Weinberger, A. and Smith, J. L., "Shortcut Multiplication for Binary Digital Computers/' National Bureau of Standards Circular 59^ > Sec. 1, pp. 13-22. 15. Wilson, J. B. and Ledley, R. S., "An Algorithm for Rapid Binary- Division." IRE Transactions on Electronic Computers , Vol. EC-10, (December, 1961), pp. 662-67O. APPENDIX The set of lemmas contained in this appendix are used to simplify many of the Boolean functions derived in Chapter k and also appear in the proof of several theorems. Lemma A-l: Vq y P±( 2 J +1 ) y P+ 2 J J[ y P±(2k+l) y p±2k n* j-1 "Vq y p±(2j+l) Jl _ ± y p±(2k+2) Proof : For convenience only the relative portion of the indices is retained in the inductive argument which follows. i i-i V y 2j+l y 2j i' y 2k+i y 2k = y y i y y 2 y 3 j=0 k=0 Let H( q ) . "\3r y % y sk+2 . j=0 ° k = -1 q-1 j-1 Assume that y Y^^ J J^ +1 7 2k = H(q-l) J -U K-U Then, V , r % y 2k+i y 2k . H(a-l) V j=0 " " k=0 ^ Note that y 2q+i y 2q !_} y 2k+i y 2k q-1 h(o) V y 2a+1 y 2a _TT y Pk+1 y ?k = h(o) v y y -XT y 2k+1 y q-1 2q+r2q jM 2k+r 2k * ' J 2q+r 2q -158- 2k+r 2k y o ■159- q-1 Assume that H(r) V y 2a+1 y 2a % 7^7^ 2q+r 2q k=0 H(r) V V V K ' ,y 2q+l' y 2q q-1 li yoiri.n« -k=r+l 2k+r 2k r r-l TT 7 J '-k = -1 2k+2 q-1 Then, H(r + 1) V y y TT y 2k+1 y 2k k=0 = H(r) V y 2q+1 y 2q _ y 2k+i y 2k Ha = r+1 r-l .TT y 2k+2 u k = -1 y 2r+3 ,11 . y 2k+2 k = -1 = H(r)V 7r,„,^y, / q-i ( TT y mi- 1 1 « ov / ^oyL? » y^ 7T y ; " 2q+r 2q V . 1 1 ^ 2k+r 2k / ^ 2r+3 ' ^ 2r+3 ' • 2k+2 \k= r+2 ' J k = -1 q-1 = H(r+l) V v V V ; ,y 2q+l' y 2q k = r+2 y 2k+i y 2k r TT J Ha = -1 2k+2 If q - 1 = r - i, then H (»-l) V y y Jf y 2k+1 y 2k k=0 = H(q-l) V y q-1 2q+l k = -1 y 2k + 2 = H((l) The lemma follows Lemma A-2: V^ y p±2j TT y p ± (2k+l) y p ± 2k n* = V w TT P"P+2J k v y 2a+ i TT y 2k+1 y 2 k ■ *M v V 24+2 [ft y 2 * + i y 2 kj q rr ■k=2 irl TT: •k=0 2k+l Assume that H(r) V y JT y 2k+1 y 2k ^ k=0 = H(r) V y y TT . y Pk+ iyp k it y o J 2q+2 . ' I _ * 2k+r 2k ' I ^ 2k+l »-k = r+1 J u k=0 Then, H(r + 1) V y JT y 2k+1 y 2k k=0 H(r) V v y K J v ,y o ,y 2q+2 q ~i r r I' . y 2k+l y 2k .11 y 2k+l L k = r+1 J ^k=0 V y o y 2r+2 r S) y2k+i = H(r) V y L y 2k/ y 2q+2 IjL y 2k+i y 2k/ y 2r+3 y 2r+2 ^ y 2r+2 .1 1_ * 2k+l ^ v k=r-2 - 1 k=^> TT y ; k=0 = H(r+1) V y y TT y 2k+i y 2k /' y 2k+l ^ L k = r-2 J ^k=0 rr-l If a - r + 1, then H(a) V y 2q+£ -Jf y 2k+1 y 2k q k =o ■ H(4) V y y 24+2 TT ^ ■ H(q + 1) . k=0 -161- The lemma follows . Lemma A-3: . n * j- ^ y p±2j T]q y p±(2k+l) y p±2k n* _ j-1 V Vp±2j Jo y P±( 2k+1 ) Proof : The proof is accomplished by taking the dual of the complement of the equation given in the hypothesis of Lemma A-2. Lemma A-k-: V y p±(2j+l) k U_ 1 y p+(2k+2)^ n* j-1 n* = ~Y y P±2j ][ y P±(2k + D v TT y p± ( 2 j + i) Proof: An inductive argument follows V y 2J+1 k T_ x y 2k+2 y = y G ^ y i y 2 ^ y i y 3 y i. ^ y i y 3 y 5 X ^ S F ~ v i Let H (q) = Y y 2 . Jf y, k+1 V JT ^ +1 Assume that ^7^^ /TT\ y 2k+ 2 j = H <*> ' Jrl k = -1 tten > (^ ^ 2j+ l jjf^ w) ■ l^ 2 a + , V .T L "2q+3 ' V y 2k+2 k = -1 H(q) ■162- Note that k = -1 J ,i=0 ° k=0 l ^ > ^=2 J y 2q+3 . Y k = -1 Assume that y 2q+3 . V . y 2k+2 ^ ^ k = -1 H(r) = V y 2J TT y Pk+1 ^ j=0 d k=0 2k+l L 2q.+3 ,-v" k=r 2k+2 H(r) . Then, Y 2q+3 * k V _ y 2k+2_ H(r+l) = V y 2 j TT y 2 k + i v j=0 J k=0 _ ^ _ " y 2q+3 ^ . V y 2k+2 k=r H(r) V -\V i r- /2q+3 V y 2k+2_ [ y 2r+2 V y ^ ^2r+3_ q. r Tl y 2k+l k=0 ■ "VT y 2J ft y 2k+1 V [y 2q+3 V V ^kj H ( r+1 > V j=0 k=0 -"=•-' k = r _i j y 2r+2 H(r) V r . V . y 2k+2 -k = -1 _ y 2r+2 V y 2r+3 r k 7T y 2k + i y 2j TT j=0 J k=0 ffi ^ v r+1 r+1 r+1 r+1 j-1 / 2q+3 v k y * 1-3 V , y 2k+2 : = r+1 H(r+l) V ^ ^ k = r+1 J If q. = r + 1, then y 2q+3 V . V _ y 2k+2 k = -1 H(q) •163- _q r _ J- 1 _ j=0 ^ J k=0 y 2q+3 * y 2q+2 H(q) q+1 _ j-l q+1 = X " 2j K " 2k+iV S " 2j+i = H(4+1) The lemma follows Lemma A- 5: n* j-l ^ Vp±2j TT y p± n* j-l y v Y V(2.i-D TT y p+2 k v IT y. ^ "p+(2j-l) ^ ■ 7 p±2k ' 1^ Proof: An inductive argument follows V v 2J g , 2k+1 = y o V y x V y 2 y 5 V y^ Let H(4) - y Q ^ "$" y 2j -i it y 2k v TT y 2j J =1 k=l j -1 Assume that (^T yj^ Jj y^j . H (q) Then, / -y y y TT y 2k+1 \ j=l ° k=0 y o y y 2q+2 ^ VI y 2k+l k=0 H(q) Note that y o V y 2q+2 V ^ y 2k+1 H(2) y Q vV y 2 j-i JT y 2k v J =1 k=l y 2q+2 ^ Vp y 2q+l_ H(2) -I6i4- Assume that Yq V y V y y '- k=0 H(r) = y o ^ V y 2 ^ f y 2k V j=l u k=l y 2 4+ 2 V "^ y 2 k + lj « r > Then, Y o * y 2q+2 * Vq y 2k+l H(r+l) y o V V y 2 j_! TT y 2k v j=l ^ J k=l _ ^ _ y 2q+2 * n V y 2k+l . k=r H(r) V y 2q+2 y .V y 2k+l k=0 y 2r+l V y 2r+2 TT J k=l y 2k j =1 d k=l y 2q+2 . V y 2k+l ^ k = r+1 H(r+l) V y . H(r) V J 2r+l v ' ~ r I ' y 2k+l -k=0 y V y " y 2r+l ,y 2r+2 TT J k=l y 2k J + ± - J" 1 - = y v V y 2 j-i TT y 2k \/ j=l u k=l y 2q+2 V ,V 1 y 2k+l ■ * k=r+l H(r+l) ^ r+1 r+1 V y 2i-l l y 2k j=l d k=l r+1 _ J-l _ = y o v V y 2 j-i TT y 2k V j=l J k=l y 2q+2 " . V y 2k+l - k = r+1 H(r+1) If q = r + 1, then y o V y 2g + 2 V V ^^1 ' '' k=0 = y V "^ yjy.! jjj y 2k v (/ 2q+2 V y 2q+1 ) h( 4 ) (; q+1 _ jj^ q+1 TT y?*v TT y 2J - h(i + d The lemma follows -165- Lemma A -6: V Vp±2J J[ y p+(2k+l) * , v v -p+(2j-l) J^ ^p+2k T k=L n* VTT y 0=1 P+2j Proof : The proof is accomplished "by taking the dual of the complement of the equation given in the hypothesis of Lemma A-5 Lemma A-7 : n* r=0 V(2j + 1) k = _ ± n* v„ V(2j + D jn _ n v( 2 k +2 ) v y v P ±2j J y P± (2k + D = y. j=o x y V y. p+2j * ,y p+(2j -J Proof : Let H(n*) represent the left side of the above equation and consider the case n* = 2. H(2) = y o ( yi V y 2 V Y^V 7 k V y 5 ) Let I(q) = y, S£ (y 2j ^ y 2j + l). Assume that H(q) = l(q)« It follows that Hfo+1) = 1(0 V y o y 2q+5 fl- y a+? V y^ Tt y 2k+1 q Ho q TT k=0 Note that l(2) V y y fT V \/ v V J o- y 2q+3 .IL y 2k+2 V ' y o' y 2q+2 .|L k=0 k=0 q q q. _ = 1(2) v y o y jr y 2k+2 v y y 2q+2 IT y 2k+i k=2 k=3 •166- Assume that l(r) V yj JT y 2k+2 V VJ^ JT y 2k+1 k=0 k=0 : I ^ r ) V ^0^2^+3 7' y 2k+2 y y o y 2q+2 . TT y 2k+l k=r k = r+1 q. TT k=0 Then I(r + 1) V jj^ TT y 2k+2 V YJT Jf q. TT k=0 iW V y y 2r+2 V y y 2r+J V y o y 2q+3 y 2r+2 . . y 2k+2 u k = r-1 V yy „ l0 y, o'"2q+2 J 2r+3 [_ M p J 2k+1_ TT „ y , Kr+l)V y Q y 7f y 2k+2 V y Q y Tf y 2k+1 v k = r+1 k = r+2 Let r+1 = q H(q+D = i(q) v y y 2q+3 y 2q+2 V y Q y 2q+2 H(q+1) = I(q+1) The lemma follows .