Abstract
We present a new technique for defining, analysing, and simplifying digital functions, through handcalculations, easily demonstrable therefore in the classrooms. It can be extended to represent discrete systems beyond the Boolean logic. The method is graphical in nature and provides complete ‘‘implementationfree” description of the logical functions, similar to binary decision diagrams (BDDs) and Karnaughmaps (Kmaps). Transforming a function into the proposed representations (also the inverse) is a very intuitive process, easy enough that a person can handcalculate these transformations. The algorithmic nature allows for its computingbased implementations. Because the proposed technique effectively transforms a function into a scatter plot, it is possible to represent multiple functions simultaneously. Usability of the method, therefore, is constrained neither by the number of inputs of the function nor by its outputs in theory. This, being a new paradigm, offers a lot of scope for further research. Here, we put forward a few of the strategies invented so far for using the proposed representation for simplifying the logic functions. Finally, we present extensions of the method: one that extends its applicability to multivalued discrete systems beyond Boolean functions and the other that represents the variants in terms of the coordinate system in use.
1. Introduction and Literature Overview
Combinational logic optimization is one of the first steps when designing any digital circuit. This practice helps chip designer save on number of transistors, chip area, and helps reduce logic delays and power requirements. It is no surprise therefore that many efforts have been made to develop fully functional, interactive programs for the industry even in the 80s, such as MIS [1] and SOCRATES [2] and the field has only grown ever since with the advent of many companies competing in this domain. In this section, we discuss various logic optimization methods. Advantages and drawbacks associated with each of these popular methods, especially the ones that offer graphical representation of a function or are simple enough for humans to handcalculate, is the primary focus of this section. In view of the listed advantages and drawbacks, characteristic features of an ideal methodology are then presented.
A Karnaughmap (Kmap) [3, 4] is a graphical technique for combinational logic optimization, which offers a very intuitive way to handcalculate the proposed graphical representation of a Boolean function and its reduction. Using different colour schemes, multiple output functions involving the same inputs can be represented on a single Kmap. However, it is only ideal for a function where the number of inputs is less than five. To represent functions involving more than four variables, one of the proposed implementations splits the graph into subgraphs—each subgraph representing only four variables at a time [5]. Another extension of the Kmaps does not require splitting the graph into smaller units to represent functions with more than four variables, but some of the variable inversions can no longer remain adjacent to each other [6]—like in the case of Kmaps for four inputs.
A binary decision diagram (BDD) [7–10] is also a graphical method that is easy enough to implement and visualise. BDDs are often put to use as a data structure to both represent the Boolean functions and to perform the operations efficiently. Unlike Kmaps, usability of this approach is not constrained by the number of inputs. Optimization is primarily about choosing the correct ordering of input variables and about reducing the number of “nodes” by merging equivalent nodes and by removing redundant ones. Diagram complexity depends a lot on the ordering of the input variables and the respectively applied decomposition type [7, 11], and it is not always easy to devise the correct order by mere visual inspection. This however, to a limited extent, is also a downside of the graphical approaches presented in this paper. As for BDDs, moreover, one cannot translate a given graphical representation back to its Boolean expression just by a quick visual skimming through—it is imperative to trace the entire paths starting from the output nodes back to the first input in order.
Typed decision graphs (TDGs) [12] offer reduction of BDDs into a graph with a lot fewer nodes and connections. The advantages and drawbacks of the method are therefore mostly similar to those of BDDs, including dependence of the size/complexity of the representation on the ordering of the variables. Also closely related to BDDs are graphical techniques called “implicit graph based method” [13–15] and signal transition graphs (STGs) [16].
The Quine–McCluskey algorithm [17–19] (or method of prime implicants) is functionally identical to Karnaugh mapping and is a deterministic way to check that the minimal form of a Boolean function has been reached. The tabular form makes it more efficient for use in computer algorithms, but, not being graphical, it is not as simple or as intuitive as Karnaughmaps for use by the designer himself/herself. Petrick’s method (the branchandbound method) [20] is a technique for determining all minimum sumofproducts solutions from a prime implicant chart and could be looked upon as an extension to the Quine–McCluskey algorithm. The process gets tedious for a human for a large number of inputs and does not scale well on computers likewise. The Espresso algorithm [21] uses a radically different approach by applying heuristics, manipulating the “cubes” representing the product terms in the ON, DC, and OFFcovers iteratively, instead of expanding the minterms. Recently, a new paradigm has been proposed called “MajorityInverter Graph” [22], which is a directed acyclic graph consisting of threeinput majority nodes and direct/negated edges.
Keeping classroom education of Boolean functions at the focus, several methodologies [23–27] that are mostly nongraphical and can best be demonstrated with systems with only a limited number of inputs have been proposed, in addition to more generalised software implementations [28–32] not directly useful for demonstrating the concepts through easy handcalculations. Karnaughmaps—due to the method’s graphical nature—continue to be used as the first method to explain the optimization process in the switching theory textbooks [33] still today.
In the context of the comparison of the methods noted so far, we propose that the following are the desired characteristics of an ideal logic representation methodology:(i)It is not constrained by the number of inputs or outputs and can in theory handle an infinite number of inputs and outputs. That is to say, multiple output functions can be represented simultaneously.(ii)The optimization process should be intuitive; ideally visual inspection should be enough to establish inputoutput relationship. Or it should be based on a paradigm that is intuitive enough for a human to simply handcalculate. Graphical methods like Kmaps do offer that advantage.(iii)If it is graphical, an equivalent numerical method should exist, which can effectively be used as a data structure to optimally represent combinational logic through conventional programming.(iv)Translating a Boolean equation into the graphical representation (or vice versa) is a simple process.(v)Ordering of variables should play no role in the complexity of the representation.
The proposed technique satisfies all of the desired characteristics listed, except the very last one. Ordering of variables contributes to the ease with which a human can optimize a function without using any computing resources.
2. Definitions
(i)The logical operators/symbols “”, “+”, “”, “”, and “” denote the logical negation, OR, AND, XOR, and XNOR operations, respectively.(ii)The symbols “” and “” denote the logical AND and OR operations of the variables in iteration, respectively.(iii) is a set of inputs to the combinational logic block under consideration.(iv) denotes an empty set.(v)SOP = sum of products.(vi)POS = product of sums.
3. Proposed Technique (PanditPlot)
Every Boolean equation is represented by a scatter plot in two dimensions. In effect, in its simplest version, corresponding to four quadrants, four Boolean expressions can simultaneously be represented and optimized on a single plane. By using different markers, one for each function, multiple logic functions may be represented in a single plane and subsequently reduced.
3.1. Coordinate System and Input Correspondence
Every integer coordinate “” corresponds to an input combination such thatOne axis (say axis) represents a condition where the designated inputs are all (also called or logic level ), while the other represents a case where those inputs are all (also called or logic level ). There is, therefore, a onetoone correspondence between the set of all of combinations of the inputs and the set of points on the plane with integer coordinates. With such a representation system in place, every point on the plot with integer coordinates signifies a single product (in a SOP representation) or a single sum (in a POS representation). As an example, for a system with three inputs (), the template of the plot that is restricted to the first quadrant () will be as shown in Figure 1.
Throughout the discussion henceforth, we only consider the template in the first quadrant. The templates in four quadrants are symmetric to each other, with  and axes and the “” and “” lines as the axes of symmetry. We observe that, in the scatter plot from Figure 1, certain datapoints have been marked distinctively using the filled circles. These will be called “redundant” input combinations—for the reasons that will be explained in Section 3.3.
3.2. Representing an Input Combination
Representation of the combinational function “” in graphical form may be done for “” either in POS or in SOP form; the choice lies with the logic designer/user of the plot.
To represent a function in SOP form, every constituent product term is separated into two products, one containing exclusively the direct inputs and the other only the negated inputs. The overall product is represented by a point , where, for example, the coordinate corresponds to the set of input combinations coming only from the direct inputs, while the coordinate corresponds to the set of input combinations from only the negated inputs, using (1). The absence of inputs implies that the corresponding coordinate is 0.
As an example, let us consider the following sum of products:represented by points and , shown in Figure 2.(i)For the first product “” to be , both and need to be . Therefore, the coordinate = , as per (1). Because there are no negated inputs in the first product, no needs to be for to be . Therefore, the coordinate is 0. The product “” is, therefore, represented by point .(ii)Similarly, for the product “” to be , both and need to be . Therefore, the coordinate = , as per (1). Also, needs to be for function to be . Therefore, the coordinate . The product “” is, therefore, represented by point .
Points and will be called “datapoints” as they summarise the function by transforming it into numerical data, corresponding to the chosen coordinate system.
Similarly, for a POSbased representation, we look for () logic outputs to mark the points transforming every sum in the expression.
Every Boolean function can therefore be represented by only two parameters alone in this way, namely, the coordinates of the representative points, irrespective of the number of inputs. This is a huge data compression in itself, where instead of storing the entire truth table, or even all of the combinations for which the output is either T or F (whichever count is less), we can simply represent a function with a few datapoints. The system can further be optimized to remove extraneous information as will be explained in Sections 3.3, 3.5, and 3.6.
3.3. Existence of Redundant DataPoints
It can easily be observed that there exist points on the plot with integer coordinates that correspond to a Boolean product or a Boolean sum that can never occur in a reduced SOP or a reduced POS expression, respectively.
As an example, point corresponds to the () product in SOP which evaluates to , and the same point corresponds to the sum in POS which evaluates to . These input combinations do not have any effect on the final expression evaluation, as the output corresponding to these input combinations is preknown and therefore redundant to be included as part of any Boolean expression (e.g., ). We therefore discard such input cases and term these as “redundant points” in the discussions below, while the rest will be called “valid” points, except the origin, which falls into neither of the two categories, representing simply the trivial case of the output being independent of the inputs.
3.4. Generation of the Template
To translate any logic function to this plot, the first step is to build the necessary template or the canvas with all the input redundancies indicated (Figure 1). Such a template may be generated by exploiting patterns for which the redundancies appear (Algorithm 1).

For example, we note the following for a system with inputs:(i)The  and axes extend from to .(ii)The points on the line are redundant points.(iii)All of the upper diagonal elements are redundant points.(iv)Redundant points because of the input’s logic level extend along both the and directions skipping every other point, that is, skipping the odd integer coordinates. The redundant points associated with input are therefore of the form , where are integers.(v)Alternatively, the template may be generated using cellular automata rules on a brickwalllike automata template as devised in Figure 3 (in contrast to the typical cellular automata template as used in Conway’s game of life [34, 35]—where the borders of the individual cells coincide). This gives rise to the Sierpinski triangle [36, 37] pattern, as desired. The captions for the individual blocks indicate the coordinates of the points that the blocks represent.
3.5. Logic Laws
The logic optimization process is visual, intuitive, and simple—just as for Karnaughmaps. It may alternatively be easily implemented using a computer program by understanding the strategies in place numerically. The basic idea of optimization is to get rid of excess of information by inspecting the scatter plot and bring the datapoints as close to the axes as possible. There exist patterns that need to be utilised to effectively carry out this “reduction.” These patterns need to be formulated into a compilation of “logic laws.” A few examples of a logic law or an optimization strategy follow.
Theorem 1 (integermultiple hypotenuse rule). If two of the datapoints are vertices of an upright right angled isosceles triangle with its equal sides having length = and if the third vertex is not to the right of any of those two datapoints, then the two datapoints could effectively be represented by that third vertex alone, so long as the third vertex is not a redundant point.
Proof. Let datapoints be and , such that and and , , without loss of generalisation.
Because none of the three points, , , and , is a redundant point and because , it follows thatwhere is set of suffixes corresponding to inputs associated with coordinate “.”
Similarly, it follows thatTherefore, the point represents both the direct and negated inputs corresponding to the point , along with the input . Similarly, the point represents both the direct and negated inputs corresponding to the point , along with the input . The two points, and , therefore, effectively represent the inputs corresponding to the point and, in addition, either the direct or the negated version of the input .
Therefore, in SOP form,and, in POS form,where function associated with point .
Thus, as per (5) and (6), this rule is simply a manifestation of the two wellknown equalities and for the template we present here—where and are, respectively, the product terms and the summation terms consisting of variables excluding .
As an illustration, if the plot in Figure 4 represents a Boolean function in SOP form with the points and as its “datapoints,” then per the definitions earlierThis is because point translates to “,” while point represents “.”
Per the law proposed, points and are represented together by point alone, since the right angled triangle is an isosceles triangle with its congruent sides having length , ).
We find here that the hypothesis is true, since
If the scatter plot in Figure 4 were to correspond to a POS representation, then the plot would have been represented asEffectively,
In either case, points and are together represented by alone.
Theorem 2 (symmetry about “” line). Two “valid” points symmetric about the “” line in an SOP plot can be effectively represented by a newly defined logical operation represented by operator , whereTwo “valid” points symmetric about the “” line in a POS plot can be effectively represented by a newly defined logical operation represented by operator , where
Proof. Two points symmetric about the “” line will be of the forms and . It follows that the set of direct inputs corresponding to the point is the same as the set of negated inputs that are represented by point and vice versa .
Because points and are not redundant points, it follows that .
Therefore, for SOP,Similarly, for POS,
For a system with just two inputs, the “” operator represents simply an “XOR” () operation, while the “” operator represents an “XNOR” () operation. The “NANDonly” implementation of “” operation is shown in Figure 5. This newly defined logic gate can then be optimized for given fanin and fanout values as necessary to be used as a building block in the subsequent logic design.
3.6. Process of Optimization
While there is much scope for further research in this area for effective algorithm development in terms of logic optimization, including the ones targeted to novel topologies such as the ones involving IMPLY gates alone, for example (instead of SOP/POS forms presented here, effectively implemented using “NAND alone” and “NOR alone” topologies, resp.), one of the most likely logic flows for such optimization is presented next.
Steps involved in this example algorithm are as follows:(i)“Generate” the template and plot the function.(ii)“Expand” the expression to include every possible product in SOP form (every possible sum for a POS form).(iii)“Reduce” the expression using logic laws.(iv)“Repeat” the above two steps in iteration until no further reduction is possible, as illustrated in Figure 6.
(a) “Generate” step illustrated for
(b) “Expand” step illustrated for the product “”
(c) ‘‘Reduction” using the “integermultiple hypotenuse rule”
(d) The final optimized expression;
As an example, let , and let the representation form chosen be SOPbased as well. ultimately gets reduced to as shown in Figure 6.(1)Generate: plot the product terms (Figure 6(a)).(2)Expand: plot points relevant to each of the current datapoints (Figure 6(b)). Here, is expanded to include points wherever .(3)Reduce: reduce the expression using logic laws. If a new datapoint, replacing one or some of the original datapoints, is obtained through this process and if this data point cannot be further reduced, then it is noted and kept for the next iteration. (We note an example of such datapoint with a label “NEW” in Figure 6(c).)(4)Repeat: repeat steps and until no new replacement datapoint closer to the origin can be obtained (Figure 6(d)).
Similar to the Karnaughmaps, the “do not care” input combinations could be exploited for logic reduction [3, 38].
3.7. As a Data Structure
Because the individual Boolean terms are represented by only two coordinates (irrespective of the number of inputs), any combinational logic may be represented by two parameters alone. This can be viewed as a conversion of a graphical scheme to an equivalent nongraphical numerical scheme, to be handled by computing systems efficiently. The two coordinates may be stored in the memory as a single unit.
Because one can represent any logic expression through a set of coordinates alone, we now investigate the number of bits required to store each of the numbered coordinates. While a proposed template for inputs consists of points (including the origin), the number of valid coordinates is only . This is because a variable can manifest itself in an input combination in its original form () or as a negated version () or it could simply be absent. Thus, there are three possibilities for every input . The number of valid points is, therefore, (excluding the origin indicative of a trivial case where the output is independent of all of the inputs under consideration). Both the total number of points () in a template and the number of valid points () grow exponentially with . The ratio of the number of bits thus required (with and without considering the redundant points) = which varies between and and eventually converges to for large . As an example, for , , and , while, for , , and . Memory savings, thus, grow with if we effectively take into account the redundancies in the template.
However, in comparison to Kmaps ( cells for an input system), our proposed method requires a much higher number of points (, if we consider only the valid input combinations, excluding the origin). This is because the Kmaps do not take into account all of the input combinations, but only the ones where each of the inputs manifests itself by its presence in its original or in its negated form (thus, possibilities). In the proposed method, we explicitly take into account also the reduced input combinations where some of the inputs are absent.
3.8. Possible Extensions and Further Research Scope
(i)Beyond SOP/POS paradigms: more patterns and the resulting optimization strategies need to be investigated in different logic gate methodologies, for example, SOP (“ANDOR”, which is “NANDonly”), POS (“ORAND”, which is “NORonly”), and “IMPLYonly” realisations.(ii)Multilevel logic: the concept could be extended to three dimensions to represent a ternary logic system, where both inputs and outputs can have three possible logic levels . The resulting representation is, thus, in the form of a “logic lattice” instead of the twodimensional grid presented here, where the third dimension would serve a dual purpose. First, it represents a condition where all the inputs are logical level “2” (just as and represented states “1” and “0,” resp.). Secondly, the axis may also represent an output logic level within such a “logic slice.” As an example, output level1 may correspond to a point with integer coordinates, level0 may correspond to a point just beneath this point, and level2 just above (Figure 7).(iii)Alternate coordinate systems: every datapoint symbolises a huge degree of information, but with only two or three parameters (coordinates). Because this information need not necessarily come about using a Cartesian coordinate system alone, one can choose to alternatively employ some other coordinate system and look for patterns and laws for optimization within such schemes. For example, a 2D polar system may be used, where the to transformation is governed by the equations , , and . Note that remains in the range irrespective of the number of inputs (Figure 8). The logic laws for such alternate coordinate systems—where every coordinate of interest follows the equation , —can be devised by recognising the inherent patterns, which remains an open problem with further scope for research.
3.9. Implications to Other Fields of Study
One can use the template to establish three algebraic equalities, as will be discussed in detail in this section. The method, in general, is useful for alternative representation and processing of data whenever there is representation of information (i.e., encoding or decoding) in the form of distinct or discrete states. The basic representation strategy can therefore be extended to represent and optimize operations on qubits [39] or to represent codon tables [40, 41] or design digital synthetic gene circuits [42]. Using the template used in the method proposed, we have derived the following three equalities in relation to . The method gives practical evidence of the equalities invented and presented next.
Theorem 3. or, in other words,
Theorem 4.
Theorem 5. As a consequence,Let us first establish that the equalities being discussed are true, using induction.
Proof. For Theorem 3, we observe that the equalities presented in (15) or (16) are true for and . For , For ,Now, say, for some ,Therefore,For , therefore,Therefore, if the statement is true for , then the statement is true for (). Because the statement is true for and , it is true for every and .
Proof. For Theorem 4 similarly, we observe that the equality presented in (17) is true for :Now, say, for some ,For , therefore,Because the statement is true for , it is true for every and .
In the context of the template for the method proposed, the two theorems can be proven graphically by simply counting the number of valid and redundant points, via different formulations. If for all , we know the following:(i) = = total number of points.(ii) total number of “valid” datapoints, including the origin. ( Every input can manifest itself in the input combination represented by (), either in its original form (input combination represented by th coordinate) or as a negated input (input combination represented by the coordinate) or may not manifest itself at all.)(iii) = total number of redundant points. ( Total number of points = total number of “valid” points including the origin + total number of “redundant” points).
Proof. To establish equality presented in the Theorem 3, we use the formulation of as presented in Figure 9. From Figure 9, it is evident thatThe exponent of 3 translates to a multiplier that represents the frequency of occurrence of the constituent triangle of that specific size in the template.
Proof. Alternately, Theorem 4 can be proven using a recursive formula for , as obtained from Figure 10.
This method can be used in classrooms to quickly handcalculate an optimized form of the logic function using a ruler and a compass alone (Figure 11).
4. Conclusion
A novel graphical technique for digital logic representation and optimization has been proposed, which makes optimization algorithm much more instinctive and easy. Multiple equations can be optimized simultaneously using the template presented. One can, theoretically, therefore optimize simultaneously multiple combinational logic circuits with any number of inputs or outputs. We propose a data structure transformation that can compress a truth table into a few parameters. The approach and the fundamentals involved are likely to generate many novel solutions applicable to other disciplines. A new paradigm is being proposed, which opens up new avenues for research in terms of new methodologies and pattern identification towards better logic reduction tailored to different implementation topologies such as SOP (“ANDOR”/“NANDonly”), POS (“ORAND”/“NORonly”), and “IMPLYonly” realisations or the newer methodologies such as “reconfigurable asynchronous logic automata (RALA)” [43] and the search for most suited template for each in terms of the coordinate system of choice and the template generation rules.
Our proposed technique currently establishes a onetoone mapping between all of the possible variable combinations and the corresponding output states—representing the absence and presence of every variable (in its original and the negated form) for each of the variable combinations. One possible future research direction is to investigate the relationship between the proposed technique herein and other representation techniques—such as QMDDs which, too, rely on quadrants and onetoone mappings and which rather extend way beyond the proposed technique to represent transformation matrices featuring complex entries useful for logic involving qubits. Further research may also be targeted towards multilevel discrete systems beyond Boolean algebra and reversible [44, 45] and hazardfree logic synthesis [9].
Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.