Digital Circuit Design Utilizing Equation Solving over ‘Big’ Boolean Algebras

A task frequently encountered in digital circuit design is the solution of a two-valued Boolean equation of the form ℎ(𝑿, 𝒀,𝒁) = 1 , where ℎ: 𝐵 2𝑘+𝑚+𝑛 → 𝐵 2 and 𝑿, 𝒀, and 𝒁 are binary vectors of lengths 𝑘 , 𝑚 , and 𝑛 , representing inputs, intermediary values, and outputs, respectively. The resultant of the suppression of the variables 𝒀 from this equation could be written in the form 𝑔(𝑿, 𝒁) = 1 where 𝑔: 𝐵 2𝑘+𝑛 → 𝐵 2 . Typically, one needs to solve for 𝒁 in terms of 𝑿 , and hence it is unavoidable to resort to ‘big’ Boolean algebras which are finite (atomic) Boolean algebras larger than the two-valued Boolean algebra. This is done by reinterpreting the aforementioned 𝑔(𝑿, 𝒁) as 𝑔(𝒁): 𝐵 2 𝐾 𝑛 → 𝐵 2 𝐾 , where 𝐵 2 𝐾 is the free Boolean algebra 𝐹𝐵(𝑋 1 , 𝑋 2 … … . 𝑋 𝑘 ) , which has 𝐾 = 2 𝑘 atoms, and 2 𝐾 elemnets. This paper describes how to unify many digital specifications into a single Boolean equation, suppress unwanted intermediary variables 𝒀 , and solve the equation 𝑔(𝒁) = 1 for outputs 𝒁 ( in terms of inputs 𝑿 ) in the absence of any information about 𝒀 . The paper uses a novel method for obtaining the parametric general solutions of the ‘big’ Boolean equation 𝑔(𝒁) = 1 . The parameters used do not belong to 𝐵 2 𝐾 but they belong to the two-valued Boolean algebra 𝐵 2 , also known as the switching algebra or propositional algebra. To achieve this, we have to use distinct independent parameters for each asserted atom in the Boole-Shannon expansion of 𝑔(𝒁) . The concepts and methods introduced herein are demonsrated via several detailed examples, which cover the most prominent type among basic problems of digital circuit design.


Introduction
In a seminal work, done more than half a century ago, Ledley (1959Ledley ( , 1960) ) posed three 'elementary problems of digital circuit design' inspired by the arrangement in Fig. 1, which entails five quantities , , ,  and  that belong to  2  ,  2  ,  2  ,  2  , and  2  , respectively.This arrangement includes a 'parent' combinational network  of two (vectorial) inputs  and  and a vectorial output (, ).Network  consists of two subnetworks  and , where subnetwork  has the single (vectorial) input  and the (vectorial) output (), while network  has the two vectorial inputs () and  and the (vectorial) output (, ), which is exactly the same as the (vectorial) output (, ) of network .The above arrangement involves three vectorial Boolean functions, namely (), (, ) and (, ).Three problems arise when one utilizes the information that ((), ) and (, ) are equal, together with knowledge of two of the three functions (), (, ) and (, ) in order to deduce the third function.Therefore, one obtains three distinct problems, viz.
3. We do not solve the aforementioned equation to obtain values of independent variables ,  and  in  2  ,  2  ,  2  , respectively, but instead we solve for the dependent variables  in terms of the independent variables , and .This means that instead of viewing the function ℎ above as ℎ:  2 ++ →  2 , we treat it as ℎ:   → , where  is a 'big' Boolean algebra equivalent to the free Boolean algebra (, ).As such, the roles of  and  as variables is relegated to those of generators.Since  has ( + ) scalar generators, it has 2 (+) atoms and hence 2 2 (+) elements.The task of solving ℎ(, , ) = 1 over such an algebra is facilitated by a two-century effort that culminated recently in a technique for a compact listing of all particular solutions of any 'big' Boolean equation (Rushdi andAhmad, 2017a, 2017b).4. We avoid the task of extensive search among the solutions of ℎ(, , ) = 1 for those solutions that interrelate  and  independently of .Instead, we employ a technique, recently developed by Brown (2011), that suppresses the undesired variables  in the equation ℎ(, , ) = 1, replacing that equation by another (, ) = 1, where  is not directly interpreted as :  2 + →  2 but is interpreted as :  2   →  2  , where  2  is a 'big' Boolean algebra of  = 2  atoms and 2  elements constructed as () = ( 1 ,  2 … … .  ).
According to Brown's technique the equation (, ) = 1 is constructed such as to have exactly all the solutions for  in terms of  that are independent of .
The organization of the remainder of this paper is as follows.Section 2 reviews our method for handling Ledley's Type-3 Problem of digital design.The section explains how to unify given digital specifications (such as the  =  one) into a single Boolean equation.It also summarizes the method of suppression of variables, derives parametric solutions of any Boolean equation such that they can be recast into a very compact listing of all particular solutions, which enables one to easily locate particular solutions of certain desirable features.Section 3 illustrates the mathematical details of our proposed method by applying it to five examples of Ledley (1959Ledley ( , 1960)).This section demonstrates clearly the dramatic advantages of the method including its conceptual clarity, high speed, avoidance of unwarranted cumbersome tasks, and better control on outcomes.These advantages do not pertain only to pedagogical issues, but also suggest some enhancements of contemporary practice of digital design.The paper is concluded in Section 4.
Fig. 1.An outline of digital networks pertaining to the three elementary problems of digital design posed by Ledley (1959Ledley ( , 1960) )

Steps of the Method 2.1 Unifying Specifications into a Single Boolean Equation
Without loss of generality, let us assume that the digital system at hand is specified by the system of  Boolean equations (suggested by Fig. 1) of the form where   =   (, , ) and   =   (, , ), and occasionally we might have   = 0 or   = 1.
The symbols ∧ , ∨, ⊕, and ⊙ in Equations ( 2b) and (3b) depict the AND operator, the OR operator, the XOR (Exclusive-OR) operator and the XNOR (coincidence or equivalence) operator, respectively, defined as shown in Table 2.The relation between (2b) and 3(b) is just an expression of the two De' Morgan's laws.Note that the AND and OR operators are dual ones, while the XNOR and XOR operators are both complementary and dual ones.

Suppression of Variables
and that the solutions of the derived equation (4a) are exactly those of the parent equation (3a) that do not involve the suppressed variables .
We will herein utilize the dual of the above result, namely that if we use (2a) instead of (3a) as a parent equation, then the resultant of suppression of the variables  is now the complementary derived Boolean equation where (, ) ≡ ∧  ∈ {0,1}  ℎ(, , ) and the solutions of the derived equation (5a) are exactly those of the parent equation (2a) that do not involve the suppressed variables .

Derivation of Parametric Solutions
We seek solutions of the Boolean equation where (, ):  2 + →  2 , is a two-valued Boolean function of  two-valued variables  = [  1  2 ...   ]  and  two-valued variables  = [  1  2 ...   ]  .However, we do not need a listing of binary solutions for  and , but instead we want to express  in terms of .This is a prominent case when the use of 'big' Boolean algebras (ones other than the two-valued algebras) is unavoidable.We view (, ) as (; ) or simply () and rewrite (1) as where ():  2   →  2  , and  2  is the free Boolean algebra ( 1 ,  2 … … .  ) with  = 2  atoms and 2  elements.Now we express () by its Minterm Canonical Form (MCF) (Brown, 1990) () ≡ ∨  ∈ {0,1}  ()   (7) , the symbol   is defined as where     takes the value  ̅  (complemented literal) if   = 0, and takes the value   (uncomplemented literal) if   = 1.For  ∈ {0, 1}  , the symbol   spans the minterms of , which are the 2  elementary or primitive products The constant values () in equation ( 7) are elements of  2  called the discriminants of ().These discriminants are the entries of the natural map of () which has an input domain {0, 1}    2   .The Boolean algebra  2  = ( 1 ,  2 … … .  ), has generators   (1 ≤  ≤  ) which look like variables (In fact, they were originally our input variables before we changed their roles to generators).Therefore, we can accept the name assigned (for historical reasons) to the natural map of (), namely the name of the Variable-Entered Karnaugh Map (VEKM).We now observe that the minterms of  , which are the 2  =  elementary or primitive products are exactly the atoms of the underlying Boolean algebra.For convenience, we call these atoms   (0 ≤  ≤ ( − 1)), and hence () can be written as where we use the symbol   () to denote an indicator of the event that atom   appears in the expression of (), i.e., where the symbol ( / ) = () =1 denotes the Boolean quotient of  by  (Brown, 1990).Equation ( 12) means that   () indicates whether atom   appears in the cell  of the natural map for ().Now, we define   (0 ≤   ≤ 2  ) as the total number of actual appearances of   in the expression (11) for (), i.e., The total number   of unconditional particular solutions of (1a) over  2  (as it is) is given by This number is zero if some   = 0, i.e., if an atom   never makes its way to any expression () where  ∈ {0, 1}  (i.e., if   does not appear in any cell of the map for ()).To avoid such a situation, one must insist on the consistency condition that any atom   such that   = 0 must be forbidden or nullified.This means that the underlying Boolean algebra loses these atoms and hence collapses to a smaller algebra, i.e., to one of its strict sub algebras.The number of solutions over this new Boolean algebra is Now we introduce a set of parameters   (0 ≤  ≤ ( − 1),   ≠ 0) to construct an orthonormal set of tags to attach to instances of appearances of the asserted atom   in the discriminants () (i.e., in the cells  ∈ {0, 1}  of the natural map of ()).The number of parameters for atom   (the length of vector   ) is given by Here, ⌈⌉ denotes the ceiling of the real number , i.e., the smallest integer greater than or equal to .The parameters   can be used to generate a set of   ≤ 2 (  ) orthonormal tags { 1 ,  2 ...    }, such that When   = 2 (  ) the set of orthonormal tags can be visualized as the products of cells in a Karnaugh map whose map variables are the underlying parameters.If 2 (  )−1 <   < 2 (  ) , some cells of such a map are merged, and the map reduces to a map-like structure.
The total number of parameters used in (18) to construct the tags for all atoms is given by The conventional method is to select the parameter vectors from a shared pool of parameters so as to minimize the number of parameters used, which then becomes However, parameters used must then belong to the underlying Boolean algebra (possibly collapsed due to the consistency condition).We now propose to use independent parameters   for each atom   (0 ≤  ≤  − 1,   ≠ 0).The expressions (18) will not be as compact as they are in the conventional case, but the independent parameters   now belong to the two-valued Boolean algebra  2 (Brown, 2003;Rushdi and Amashah, 2011), a fact that facilitates the generation of all particular solutions as will be seen shortly in the next subsection.

Listing of All Particular Solutions
The parametric solutions (18) can be used to generate all particular solutions through the use of an expansion tree.Generally, in the conventional method, this expansion tree is a complete tree that entails the assignment of 2  ′ values to each of  ′ parameters where  ′ ≤  is the final number of atoms of the underlying Boolean algebra (possibly after some collapse due to the consistency condition).Each parent node has 2  ′ children nodes and the tree has  ′ levels beyond its root.Therefore, the tree has (2  ′ )  ′ = 2  ′  ′ leaves.These leaves constitute the whole set of particular solutions, possibly with repetitions.However, to avoid repetitions, we make sure, right from the first expansion level, to combine any sibling nodes that share the same solution value.With this kind of combining, the tree ceases to be a complete one, and its leaves become exactly the particular solutions, i.e., without repetitions.If we further allow combining cousin (same-level) nodes, the tree is replaced by an acyclic graph that lists particular solution compactly (Rushdi, 2012).
In the method proposed herein, a complete version of the expansion tree requires the assignment of binary values {0,1} to each of  independent parameters.Since the complete binary tree has  levels beyond its root, it has 2  leaves.With merging of sibling nodes of equal solution values, the tree is no longer complete, and its leaves are just the particular solutions without repetitions.
The size of the expansion tree in the proposed method is typically less than that in the conventional method since typically  <  ′  ′ (though  >  ′ ).However, the true advantage of the proposed method is that it allows us to avoid the use of an expansion tree (or an expansion acyclic graph) altogether.The key to this is the observation that the parametric solution ( 18) can be rewritten as the weighted sum of the atoms   that appear in the discriminants () (as expressed in ( 11)) of the function (), viz.
where we call the vector (  ) the 'contribution' of the asserted atom   and call the conjunction ((  ) ∧   ) the 'total contribution' of that atom.We now note that (  ) {or (  ) ∧   } has exactly   possible values, which can be conveniently listed via the same Karnaugh-map-like structure used in the representation of the associated tags.Therefore, we interpret (21) as a method of conveniently listing all particular solutions as a disjunction of total contributions of asserted atoms   , where the total contribution is given in all its   possibilities.To obtain a specific particular solution, one has simply to pick up arbitrarily one of the possibilities of the total contribution for every atom, and then add the selected total contributions together.The total number of particular solutions obtained this way agrees with that given by (15).

Picking up a Particular Solution of Specific Features
Equation ( 21) is of a paramount importance, as it provides a listing of a (possibly huge) number of all particular solutions in a compact space.As such, it allows picking up certain solutions enjoying particular desirable features simply by a quick inspection of the aforementioned listing.This point will be clarified further by way of examples in the next section.

Examples
In the following, we illustrate the method of Section 2 by revisiting five Type-3 examples handled by Ledley (1959Ledley ( , 1960)).In each of these, we recover the results of Ledley in a much faster, more systematic and transparent, and less error-prone way.In one particular case, we resolve and circumvent a certain discrepancy that Ledley's technique fell short of handling completely.

Example 1
This example was studied before by Ledley (1960) and Brown (2011).For this example, the  and  functions are scalars of the form where  = .
The function (; ) is computed via its natural map of map variables  1 ,  2 , and  3 in Fig. 3a.
The final result of the computation is shown in Fig. 3b which is again redrawn as Fig. 3c such that every discriminant (cell entry) of (; ) is given as a minterm expansion (disjunction of atoms).Each of the eight atoms of ( 1 ,  2 ,  3 ) appears twice in Fig. 3c, which means that the consistency condition is the identity 0 = 0 (25) and the total number of particular solutions is Each atom   requires a single parameter   to produce a set of orthonormal tags {  , ̅  }.The corresponding auxiliary function (; , ) is shown in Fig. 4. The parametric solution is then given by either of the following equations where the symbols   =   denote the eight atoms of ( 1 ,  2 ,  3 ) and  = ( 1  2  3 ) expresses the integer  in binary notation ( = 4 1 + 2 2 +  3 ).Fig. 5 displays all 256 particular solutions of this example.Each particular solution is a disjunction of possible contributions of atoms   (0 ≤  ≤ 7).Here the contribution of each atom is represented by a single-variable (2-cell) Karnaugh map.As an example of identifying one particular solution (without any deliberate effort to achieve compactness), we select the possible contribution in the top cell for each atom.Hence, we obtain An obvious slight improvement is possible if we use the lower-cell contribution of  6 =  1  2  ̅ 3 , instead of the upper-cell one, to obtain A better solution was found via informal means by Ledley (1960); and re-obtained by branchand-bound search (Brown, 2011).This solution is  Example 2a Ledley (1959Ledley ( , 1960) ) described this example as one that illustrates a normally complicated solution.While this example has solutions such that  = , a minor modification of it in Example 2b produces a situation in which no solutions can be produced such that  = .We start with two scalar functions  and , viz.
The function ℎ(, , ) equivalent to ( ⊙ ) is expressed by the map in Fig. 6.Entries of the cells of this map are ANDed to form the function (, ) in which  1 and  2 are suppressed.The natural map for (, ) is gradually developed in Figs.7(a)-7(d).The final map in Fig. 7(d) has entries in minterm form.It shows that each of the 8 atoms of ( 1 ,  2 ,  3 ) appears once.Hence, the number of particular solutions is 1 8 = 1 and the consistency condition is the identity (0 = 0).Therefore, the map can be used to represent the auxiliary function (, , ) as well (since neither tagging each atom with 1 nor ORing each entry with (0) produces any change).The final answer for () is unique and given by: ℎ(, , ) (, )

Example 2b
Let us keep  as given by (32) in Example 2a and augment  therein by the term  ̅ 1  ̅ 2  ̅ 1 so as to become: ℎ(, , ) (, ) We reproduce Figs. 6 and 7 modified as Figs. 8 and 9.In Fig. 9(d), only 7 atoms still appear (once each) while atom  ̅ 1  ̅ 2  ̅ 3 is missing.Therefore, there is a single particular solution under the consistency condition  ̅ 1  ̅ 2  ̅ 3 = 0, and the auxiliary function is given by Fig. 10.Hence the conditional solution is: (, , ) Example 3 Suppose that both functions  and  are scalars of the form Ledley (1960) labeled this example as one of no solutions.He said that subject to the condition  1 →  ̅ 2 , solutions  1 =  2 , and  2 =  ̅ 1 are antecedent solutions that make   →  but  ≠ .
According to our method, we construct the function ℎ(, , ) according to (2b) in Fig. 11, and then suppress  1 to obtain (, ), represented by the natural map in Fig. 12(a).Out of the four atoms of ( 1 ,  2 ), the two atoms  1  ̅ 2 and  ̅ 1  2 , make a single appearance in Fig. 12(b), while the two atoms  ̅ 1  ̅ 2 and  1  2 make no appearance therein.The number of particular solutions is 1*1 = 1, and the consistency condition is ( ̅ 1  ̅ 2 ∨  1  2 = 0).We construct the auxiliary function (, , ) via the map in Fig. 13 by tagging each of the asserted atoms  1  ̅ 2 and  ̅ 1  2 by 1 and adding each of the nullified atoms don't-care in each cell of the map of (, , ).The parametric solution of  1 involves no parameters and constitutes a single particular solution given by The expression above for  1 might be simplified to either  1 =  ̅ 1 or  1 =  2 .These are not alternative solutions as claimed by Ledley (1960) but are the same solution under the above consistency condition which is equivalent to requiring that  ̅ 1 =  2 .Reading of the map in Fig. 13 (or complementing (40)) yields Substituting ( 40) and ( 41) in (38) produces which is exactly the same as  in (39) under the auxiliary condition that ( ̅ 1  ̅ 2 ∨  1  2 = 0) or equivalently  2 =  ̅ 1 , or  1 =  ̅ 2 .This very simple example reveals many of the shortcoming in Ledley's method, including the inadequacy of splitting solutions into antecedence and consequence ones, and the difficulty of doing without the concept of a consistency condition.
ℎ(, , ) Example 4 Ledley (1960) required just a consequence solution ( → ) rather than a complete one {( → ) ∧ ( → )} for this example, where  and  are given by  =  1 (43) An obvious (albeit trivial and non-genuine) solution for this problem is  1 = 1 (since 1 is implied by anything).We now use Figs.14 and 15 to represent the pertinent maps, noting that now the ℎ(, , ) function represents ( → ) rather than ( ⊙ ).The final map in Fig. 15(c) shows that all atoms are present, with 5 of them making a single appearance and 3 of them making a double appearance each.These three atoms are  0 =  ̅ 1  ̅ 2  ̅ 3 whose instances are tagged by elements of the orthonormal set { 0 , ̅ 0 },  3 =  ̅ 1  2  3 whose instances are tagged by elements of the orthonormal set { 3 , ̅ 3 }, and  6 =  1  2  ̅ 3 whose instances are tagged by elements of the orthonormal set { 6 , ̅ 6 }, while the other 5 atoms are each tagged by (1) as shown in Fig. 16.The consistency condition is the identity (0 = 0), and the number of particular solution is 1 5 * 2 3 = 8.The parametric solution is where each of  0 ,  3 , and  6 ∈ {0,1} according to our novel method (Rushdi and Ahmad;2017a, 2017b).If we employ the conventional method, we use a common value  for each of  0 ,  3 , and  6 , but this  ∈  256 = ( 1 ,  2 ,  3 ).Equation ( 45) can be conventionally written as a display of 8 particular solutions for  1 as follows.
1 = These 8 solutions are also displayed in Fig. 17.They include (beside the trivial solution  1 = 1), the three minimal genuine solutions identified by Ledley (1960).
Fig. 17.Listing of all particular solutions of Example 4

Example 5
This example taken from Ledley (1959) illustrates the handling of genuinely vectorial function  and  (of dimensions  = 3 > 1), given by In (47c), we had to correct a typo in original expression given by Ledley (1959).This example lacks unwarranted  variables, and hence we directly construct the function (, ) such that This function is represented by the map in Fig. 18(b) inspired by the map in Fig. 18(a) and the facts that (1⊙  = ) and (0⊙ ) =  ̅ .We compute the entries of the map in Fig. 18(b) via the conventional Karnaugh maps in Fig. 19.Our final result for (, ) in Fig. 20 shows that there is a single appearance for each of the 16 atoms of  512 = ( 1 ,  2 ,  3 ,  4 ).Therefore, the consistency condition is the identity (0 = 0), there is a single particular solution, and the map in Fig. 20 serves as well to represent the auxiliary function (, , ).The final solution is

Conclusions
This paper introduced dramatic improvements to the techniques used for handling an elementary problem of digital design.These improvements included (a) the use of a transparent algebraic representation all throughout the analysis instead of going to a cryptic numerical representation, (b) the solution of a single equation instead of solving two sets of equations at two sequential stages, (c) the use of powerful techniques of 'big' Boolean algebras to express outputs in terms of inputs, (d) a better conceptual understanding by imposing certain "consistency conditions" that allow complete conditional solutions to emerge instead of resorting to partial solutions or accepting that no solutions exist, and (e) the suppression of unwarranted or intermediary variables, right from the outset instead of making an extensive search as an afterthought.These improvements resulted in much faster (and occasionally corrected) solutions for the examples discussed herein.
Fig. 2 is an expression of ℎ(, , ) in terms of a variable-entered Karnaugh map (VEKM) of map variables  1 and  2 .The map has entries in terms of the ⊙ operator in Fig. 2(a).These terms are rewritten with the ⊙ operator replaced by its POS form in Fig. 2(b).The  variables are suppressed via (5b) by ANDing the entries in Fig. 2(b), namely

Fig. 3 .
Fig. 2. A map expression of the function in Example 1

Fig. 11 .Fig. 12 .
Fig. 11.Map representation of a function ℎ(, , ) whose assertion is equivalent to equality of  and  in Example 3

Fig. 19 .
Fig. 19.Conventional Karnaugh maps used in the evaluation of entries in Fig.18

Table 1 .
Taxonomy of Ledley's elementary problems of digital design Obtain solutions of this equation that specify values of , ,  in  2 .*Select solutions that relate  to  independently of .