Computers Elect. Engng Vol. 19, No. 3, pp. 193-21I, 1993 0045-7906/93 $6.00 + 0.00 Printed in Great Britain. All fights reserved Copyright © 1993 Pergamon Press Ltd EFFICIENT AND FAST ALGORITHM TO GENERATE MINIMAL REED-MULLER EXCLUSIVE-OR EXPANSIONS WITH MIXED POLARITY FOR COMPLETELY AND INCOMPLETELY SPECIFIED FUNCTIONS AND ITS COMPUTER IMPLEMENTATION MAKI K. HABIBt Control and Systems EngineeringDepartment, Universityof Technology, Bagdad, Iraq (Received 13 November 1990; accepted in final revised form I1 February 1992) Abstract--In this paper a new, very fast, simple and computationally effective algorithm to generate the minimal Reed-Muller Exclusive OR (ExOR) expansion with mixed polarity for any arbitrary, completely and incompletely specified switching function. The major consideration of this algorithm is to obtain a minimum number of product terms in the ExOR function. The algorithm is based on the use of Boolean matrix representation and an efficient technique called "minterm separation operation" developed by the author. The proposed algorithm consists of three procedures: (1) removing the variables on which a given switching function does not depend; (2) generating the positive polarity Reed-Muller expansion coefficients; and then (3) generating the final Reed-Muller ExOR expansion with mixed polarity in the canonical product form directly. A procedure for handling incompletely specified functions to deduce the suitable selection of "Don't care" terms is combined with Procedure 1 and/or Procedure 2. The proposed algorithm can deal with functions of large number of variables because there is no restriction from the algorithm on the number of variables within any given function. Based on the proposed approach, a fast and efficient computer program is developed. This computer program accepts an arbitrary switching function in terms of minterms and returns a mixed-polarity Reed-Muller expansion as an output in its canonical product form. The realization of the developed algorithm and the computer implementation was tested on many examples from the literature as well as on many arithmetic functions. On all examples the solutions were either the same or better than those generated by other methods. Keywords: Logic design, Algorithms, Reed-Muller expansions, Minimization techniques, Boolean matrices, Completely and incompletely specified functions, Mixed polarity. 1. INTRODUCTION Traditionally Reed-Muller equations have been used to represent functions which are to be implemented using ExOR gates. In recent years, there is a growing interest in design of logic circuits with ExOR gates because many useful logic functions have a high degree of ExOR content, and one would expect them to exhibit a particular economy of form when expressed as ExOR sums rather than in the conventional disjunctive normal form, and can have less gates, less connections and smaller VLSI realization [8,11]. What is even more important, such circuits are easily testable, and they are also used in self-testing circuits [1,3,8,14,17-19]. Expressing such functions as minimal ExOR sums is quite important when they are to be implemented with LSI and VLSI technology, as for example, cellular locic arrays [2]. Logic circuits with ExOR gates find applications in linear machines, arithmetic and communi- cation circuits, encrypting schemes, coding schemes for error control and synchronization, sequence generation for process identification, system testing and other applications [14]. Many authors [2,4-14,20-23] proposed algorithms for obtaining minimal Reed-Muller ExOR expansion for a given switching function in a fixed and/or in a mixed polarity of variables. Using these algorithms, a minimal solution can be found for completely specified functions with not more than 5 variables [5] and a nearly minimal solution for functions with 8 variables [14]. A fixed-polarity Reed-Muller expansion is known as a generalized Reed-Muller (GRM) expansion on which each variable can appear in one form, either true or complemented, but not tCurrent address: The Institute of Physical and Chemical Research, 2-1 Hirosawa, Wako, Saitama, Japan. 193