The Boolean Differential Calculus

The Boolean Differential Calculus Introduction and Examples
Bernd Steinbach
Freiberg University of Mining and Technology
Institute of Computer Science
D-09596 Freiberg, Germany
[email protected]
Abstract
The Boolean Differential Calculus is a powerful theory
that extends the Boolean algebra significantly. Based on a
small number of definitions a lot of theorems were proven.
The available operations have been efficiently implemented
in several software packages. There is a very wide field of
applications. In this paper we combine a compact introduction into the Boolean Differential Calculus with some
applications in different areas.
1. Introduction
The Boolean Differential Calculus was developed since
the 1970es based on the original ideas of Reed [8], Huffman
[5] and Akers [10]. One comprehensive presentation were
the books of Thayse and his colleages ([4], [22], among
others).
A larger research center dealing with these theories and
applications was the Chemnitz University of Technology
where the authors are also coming from. In 1981 a monograph [3] of this calculus was published in German language. A comprehensive presentation was written in 2004
as a part of [7]. It is also very important to mention, particularly in the sense of applications that in parallel a comprehensive software package XBOOLE [11] with several
versions has been developed (mainly by B. Steinbach and
his research group) where the operations and theorems of
the Boolean Differential Calculus are implemented in such
a way that they can be used in different areas. This is very
important because it restricts the efforts of researchers and
applicants to the modeling of the problem, the software ”is
doing the rest of the work” (as usual). Complementary to
the textbook [7] now the book [16] is available that contains
many examples and exercises together with their solutions.
The Boolean Differential Calculus together with XBOOLE
Christian Posthoff
The University of The West Indies
St. Augustine Campus
Trinidad & Tobago
[email protected]
on a standard computer allow to solve the given real life task
on a high level of abstraction in a very efficient way.
Naturally the space which is available here does not allow a comprehensive presentation; in order to get a broader
understanding, see [7] which represents, at least according
to our knowledge, the state of art. We emphasize here a
tutorial representation, with regard to experimental results
and further applications see, for instance, [2], [6], [9], [12],
[13], [14], [15], [17], [18], [19], [20], [21].
It should also be mentioned that there are very interesting extensions of this theory to multi-valued logics [23].
One chapter of [3] explores the differential calculus for
combined Boolean and multi-valued logics. Some remarks
about this approach are repeated in [1].
Due to the limited space we restrict this paper to the main
theoretical parts of Boolean Differential Calculus and combine that with typical applications taken from several fields.
2. Definitions and Interpretations
2.1. The Differential of a Logic Variable
Definition 1 Let xi be a Boolean variable, then
1, if the variable xi changes its value
dxi =
0, if the variable xi does not change its value
(1)
is the differential of the Boolean variable xi .
”Change of the value” means from xi = 0 to xi = 1 or
vice versa, from one point of time to another, or from one
state to another, without any real physical background.
Equations that contain variables xi and differentials dxi
will be used mainly to model graphs and their properties.
2.2. Differentials of a Logic Functions
In the following definition we use the vector of variables
x = (x1 , . . . , xn ).
Definition 2 Let f (x) be a logic function of n variables.
Then
dx f (x) = f (x) ⊕ f (x ⊕ dx)
(2)
is the (total) differential,
is the m-fold differential,
Minm
x0 f (x0 , x1 ) =
Minxm (. . . (Minx2 (Minx1 f (x0 , x1 ))) . . .) (11)
the m-fold differential minimum,
Minx f (x) = f (x) ∧ f (x ⊕ dx)
(3)
the (total) differential minimum,
Maxx f (x) = f (x) ∨ f (x ⊕ dx)
(4)
n
^
the m-fold differential maximum and
m
ϑx0 f (x0 , x1 ) = Minm
x0 f (x0 , x1 ) ⊕ Maxx0 f (x0 , x1 ) (13)
the (total) differential maximum and
F (x, dx) = f (x) ∧
Maxm
x0 f (x0 , x1 ) =
Maxxm (. . . (Maxx2 (Maxx1 f (x0 , x1 ))) . . .) (12)
(dxi ∨ dxi )
(5)
the ϑ - operation of the logic function f (x0 , x1 ) with regard
to the variables of x0 .
i=1
2.5. Vectorial Derivatives
the (total) differential expansion of the logic function f (x)
with regard to all variables of x.
2.3. Partial Differentials
In the following we use a partition of x into two subsets x0 = (x1 , . . . , xm ) and x1 = (xm+1 , . . . , xn ), 1 ≤
m < n.The two border cases are x0 = (x1 ) and x0 =
(x1 , . . . , xn−1 ).
Definition 3 Let f (x) = f (x0 , x1 ) be a logic function of n
variables. Then
Definition 5 Let f (x) = f (x0 , x1 ) be a logic function of n
variables. Then
∂f (x0 , x1 )
= f (x0 , x1 ) ⊕ f (x0 , x1 )
∂x0
is the vectorial derivative,
min f (x0 , x1 ) = f (x0 , x1 ) ∧ f (x0 , x1 )
x0
(6)
is the partial differential,
Minx0 f (x0 , x1 ) = f (x0 , x1 ) ∧ f (x0 ⊕ dx0 , x1 )
max f (x0 , x1 ) = f (x0 , x1 ) ∨ f (x0 , x1 )
the vectorial maximum of the logic function f (x0 , x1 ) with
regard to the variables of x0 .
2.6. Simple Derivatives
(8)
Now we restrict the vector x0 to a single variable, the
vector x1 contains all the variables of the vector x with the
exception of xi .
Definition 6 Let f (x) = f (xi , x1 ) be a logic function of n
variables. Then
the partial differential maximum and
F (x0 , x1 , dx0 ) = f (x0 , x1 ) ∧
(16)
(7)
the partial differential minimum,
Maxx0 f (x0 , x1 ) = f (x0 , x1 ) ∨ f (x0 ⊕ dx0 , x1 )
(15)
the vectorial minimum, and
x0
dx0 f (x0 , x1 ) = f (x0 , x1 ) ⊕ f (x0 ⊕ dx0 , x1 )
(14)
m
^
(dxi ∨ dxi )
(9)
i=1
the partial differential expansion of the function f (x0 , x1 )
with regard to the variables of x0 .
∂f (x)
= f (xi , x1 ) ⊕ f (xi , x1 ))
∂xi
is the (simple) derivative,
min f (x) = f (xi , x1 ) ∧ f (xi , x1 ))
xi
2.4. M -fold Differentials
Definition 4 Let f (x) = f (x0 , x1 ) a logic function of n
variables. Then
dm
x0 f (x0 , x1 ) = dxm (. . . (dx2 (dx1 f (x0 , x1 ))) . . .) (10)
(17)
(18)
the (simple) minimum and
max f (x) = f (xi , x1 ) ∨ f (xi , x1 ))
xi
(19)
the (simple) maximum of the logic function f (x) with regard
to the variable xi .
2.7. M -fold Derivatives
Theorem 4 The m-fold differential operations satisfy
Definition 7 Let f (x) = f (x0 , x1 ) be a logic function of n
variables. Then
m
Minm
x0 f (x0 , x1 ) ≤ F (x0 , x1 , dx0 ) ≤ Maxx0 f (x0 , x1 )
(28)
for each logic function f (x).
∂
∂ ∂f (x0 , x1 )
∂ m f (x0 , x1 )
=
(. . . (
(
)) . . .)
∂x1 ∂x2 . . . ∂xm
∂xm
∂x2
∂x1
(20)
is the m-fold derivative,
minm f (x0 , x1 ) = min(. . . (min(min f (x0 , x1 ))) . . .)
x0
xm
x2
x1
(21)
Equations that contain differential operations of functions allow to describe relationships regarding the change
of function values without restrictions of the directions of
the changes.
Now similar relations can be considered for the different
types of derivatives which have a fixed change direction.
the m-fold minimum,
maxm f (x0 , x1 ) = max(. . . (max(max f (x0 , x1 ))) . . .)
x0
xm
x2
x1
(22)
the m-fold maximum and
∆x0 f (x0 , x1 ) = minm f (x0 , x1 ) ⊕ maxm f (x0 , x1 ) (23)
x0
x0
Theorem 5 It holds for f (x) that
∂f (x)
= f (xi = 0) ⊕ f (xi = 1),
∂xi
min f (x) = f (xi = 0) ∧ f (xi = 1),
xi
3. Theorems
There are many relevant relations between the different
concepts. We will summarize some of the most important
theorems in this chapter. It should be kept in mind that most
of them are available in XBOOLE directly or can be used
to combine them for a given application. Proofs for these
relations can be found, for instance, in [3].
Theorem 1 Let F (x, dx) be the differential expansion of
f (x), Minx f (x) the differential minimum and Maxx f (x)
the differential maximum of the same logic function. Then
the order relation
Minx f (x) ≤ F (x, dx) ≤ Maxx f (x)
(24)
holds for each logic function f (x).
Theorem 2 The three differential operations Minx f (x),
Maxx f (x) and dx f (x) are connected by the following
equation:
(31)
∂f (x)
⊕ max f (x) = 0.
xi
∂xi
(32)
min f (x) ⊕
xi
When the properties of ⊕ are used (a ⊕ b ⊕ c = 0 can be
converted into a = b ⊕ c etc.), then the last statement of the
previous theorem can be written in the following way:
∂f (x)
∂xi
=
min f (x)
=
max f (x)
=
xi
xi
min f (x) ⊕ max f (x),
xi
(25)
Theorem 3 The partial differential operations satisfy
Minx0 f (x0 , x1 ) ≤ F (x0 , x1 , dx0 ) ≤ Maxx0 f (x0 , x1 )
(26)
and
dx0 f (x0 , x1 ) ⊕ Minx0 f (x0 , x1 ) ⊕ Maxx0 f (x0 , x1 ) = 0
(27)
for each logic function f (x).
xi
∂f (x)
⊕ max f (x),
xi
∂xi
∂f (x)
min f (x) ⊕
.
xi
∂xi
(33)
(34)
(35)
The formulas (33), (34), and (35) show that each of these
derivative operations can be calculated using the remaining
both derivative operations.
Setting dxi = 1 and dxj = 0, j 6= i, in (24) leads to the
following theorem.
Theorem 6 It holds for f (x) that
min f (x) ≤ f (x) ≤ max f (x),
xi
dx f (x) ⊕ Minx f (x) ⊕ Maxx f (x) = 0.
(30)
max f (x) = f (xi = 0) ∨ f (xi = 1),
xi
the ∆ - operation of the logic function f (x0 , x1 ) with regard
to the set of variables x0 .
(29)
xi
(36)
From (36) follow the three equations (37), (38) and (39)
of the next theorem.
Theorem 7 It holds for f (x) that
min f (x) ∧ f (x) = 0,
(37)
f (x) ∧ max f (x) = 0,
(38)
min f (x) ∧ max f (x) = 0.
(39)
xi
xi
xi
xi
The theorems for differential operators can be specialized for vectorial derivatives, too. Setting dxi = 1 for all
xi ∈ x0 and dxj = 0 for all xj ∈ x1 in (26) and (27) leads
to the following theorem.
Theorem 11 It holds for any f (x0 , x1 ) that
minm f (x0 , x1 ) = ∆x0 f (x0 , x1 ) ⊕ maxm f (x0 , x1 ), (52)
x0
x0
m
∆x0 f (x0 , x1 ) = min f (x0 , x1 ) ⊕ maxm f (x0 , x1 ), (53)
x0
max f (x0 , x1 ) = min f (x0 , x1 ) ⊕ ∆x0 f (x0 , x1 ). (54)
x0
min f (x0 , x1 ) ≤ f (x0 , x1 ) ≤ max f (x0 , x1 ), (40)
x0
x0
min f (x0 , x1 ) ∧ max f (x0 , x1 ) = 0, (41)
x0
x0
∂f (x0 , x1 )
⊕ min f (x0 , x1 ) ⊕ max f (x0 , x1 ) = 0. (42)
x0
x0
∂x0
Again, according to the last property of the previous
theorem and the respective property of ⊕, each vectorial
derivative can be calculated using the two other vectorial
derivative operations:
min f (x0 , x1 )
=
∂f (x0 , x1 )
⊕ max f (x0 , x1 ), (43)
x0
∂x0
∂f (x0 , x1 )
∂x0
=
min f (x0 , x1 ) ⊕ max f (x0 , x1 ),
x0
x0
x0
(44)
max f (x0 , x1 )
x0
=
min f (x0 , x1 ) ⊕
x0
∂f (x0 , x1 )
. (45)
∂x0
Alternative rules follow from (40), (41) and (42).
Theorem 9 It holds for any f (x0 , x1 ) that
∂f (x0 , x1 )
, (46)
∂x0
min f (x0 , x1 )
=
max f (x0 , x1 ) ∧
∂f (x0 , x1 )
∂x0
=
max f (x0 , x1 ) ∧ min f (x0 , x1 ),
x0
x0
x0
min f (x0 , x1 ) ∨
=
x0
∂f (x0 , x1 )
. (48)
∂x0
Similar theorems exist for m-fold derivatives where the
∆ - operation has to be used instead of simple or vectorial
derivatives. Setting dxi = 1 for all xi ∈ x0 in (28) and
transforming definition (23) leads to the next theorem.
minm f (x0 , x1 ) ≤ f (x0 , x1 ) ≤ maxm f (x0 , x1 ),
x0
m
min f (x0 , x1 ) ∧
x0
maxm f (x0 , x1 )
x0
m
= 0,
(49)
(50)
m
∆x0 f (x0 , x1 ) ⊕ min f (x0 , x1 ) ⊕ max f (x0 , x1 ) = 0.
x0
Alternative rules follow from (49), (50) and (51).
Theorem 12 It holds for any f (x0 , x1 ) that
minm f (x0 , x1 ) = maxm f (x0 , x1 ) ∧ ∆x0 f (x0 , x1 ), (55)
x0
x0
∆x0 f (x0 , x1 ) = maxm f (x0 , x1 ) ∧ minm f (x0 , x1 ), (56)
x0
x0
m
m
max f (x0 , x1 ) = min f (x0 , x1 ) ∨ ∆x0 f (x0 , x1 ). (57)
x0
x0
4. Applications
4.1. Properties of Logic Functions
In this section we introduce many applications of the
Boolean Differential Calculus. Examples for these applications are given, for instance, in [7] and [16].
Even if a logic function f (x0 , xi ) is given by an expression which includes the variable xi , the function not necessarily depends on this variable. This is true if and only
if
∂f (x0 , xi )
= 0.
(58)
∂xi
A simpler expression of such a logic function that does
not include the variable xi can be calculated by
f (x0 ) = max f (x0 , xi ).
xi
(59)
A logic function that is monotonely increasing with regard to xi can be written as an expression that does not include the variable xi . This property can be checked by the
following equation which expresses that the change of the
function value it is not allowed in cases of f (xi = 0) = 1.
xi ∧ f (x0 , xi ) ∧
∂f (x)
=0
∂xi
(60)
Similarly, a logic function that is monotonely decreasing
with regard to xi can be detected by
Theorem 10 It holds for any f (x0 , x1 ) that
x0
x0
x0
x0
(47)
max f (x0 , x1 )
x0
m
m
Theorem 8 It holds for any f (x0 , x1 ) that
x0
(51)
Based on (51), each m-fold derivative can be calculated
using the two other m-fold derivative operations.
xi ∧ f (x0 , xi ) ∧
∂f (x)
= 0.
∂xi
(61)
As a special property a logic function can be dual to itself. This property is defined by f (x) = f (x) and is true
if and only if the vectorial derivative of the function with
regard to all its variables is equal to 1:
∂f (x)
= 1.
∂x
(62)
Another interesting property of a logic function can be
the symmetry between the variables of a subset of all of
its variables. Such a function does not change its function
value if for this subset another input pattern with the same
number of ones is used. A logic function is symmetric with
regard to x0 if and only if
m _
(x1 ⊕ xi ) ∧
i=2
∂f (x0 , x1 )
∂(x1 , xi )
In the most general way a set of incompletely specified logic functions represented by their system functions
Fi (x, yi ) can be given. These incompletely specified logic
functions can be summarized into a single system function
F (x, y) by:
m
^
F (x, y) =
Fi (x, yi ).
(77)
i=1
= 0.
(63)
Each system functions Fi (x, yi ) can be found from the
complete system function F (x, y) by
In addition to completely specified logic functions, incompletely specified logic functions are used in many applications. For all vectors x with
ϕ(x) = 1
(64)
it is allowed to choose the function value of f (x) without
restriction. Therefore the function ϕ(x) is called don’t-care
function. The remaining input pattern with ϕ(x) = 0 belong either to the ON-set, having a function value f (x) = 1
or to the OFF-set, having a function value f (x) = 0. We
define two characteristic mark functions for these sets by
Fi (x, yi ) = maxm F (x, y).
y\yi
(78)
4.2. Analysis of Combinational Circuits
The system function F (x, y) completely describes the
allowed behavior of a combinational circuit. It is a property
of any combinational circuit that there is a output pattern
for each input pattern. Thus, only such functions F (x, f )
which satisfy
maxm F (x, y) = 1
(79)
y
x ∈ ON − set
x ∈ OF F − set
⇔ q(x) = 1,
⇔ r(x) = 1.
(65)
(66)
The mark functions q(x), r(x) and ϕ(x) cover the whole
Boolean space,
are allowed as system function of a combinational circuit.
A very valuable analysis result may be the finding that
all outputs y of the system function F (x, y) do not depend
on the input variable xi . This property is true if the system
function F (x, y) satisfies the following equation:
q(x) ∨ r(x) ∨ ϕ(x) = 1,
maxm (min F (x, y)) = 1.
(67)
y
and are mutually disjoint:
q(x) ∧ r(x) = 0,
q(x) ∧ ϕ(x) = 0,
r(x) ∧ ϕ(x) = 0.
(68)
(69)
(70)
Each pair of the three mark functions q(x), r(x) and
ϕ(x) of an incompletely specified logic function y = f (x)
can be combined into a single system function F (x, y) by:
F (x, y) = (y q(x)) ∨ (y r(x)),
F (x, y) = (y q(x)) ∨ ϕ(x),
F (x, y) = (y r(x)) ∨ ϕ(x),
(71)
(72)
(73)
where the sign means the equivalence operation.
Operations of the Boolean Differential Calculus allow
to find all three mark functions from the associated system
function F (x, f ):
=
max(y ∧ F (x, y)) ∧ min F (x, y), (74)
r(x)
=
max(y ∧ F (x, y)) ∧ min F (x, y), (75)
ϕ(x)
=
min F (x, y).
y
y
y
y
y
(76)
(80)
It can be verified whether the logic function of the output
fi is completely specified by the system function F (x, f ).
The function yi = fi (x) is completely specified by the system function F (x, f ) if and only if
∂(maxy\yi m F (x, y))
= 1.
∂yi
(81)
The combinational circuit consists of gates, inputs, outputs and internal wires. We label the n inputs by x, the l
outputs by y, and the k internal wires by g. The gates can
be described by logic functions gi (x, g) in which their direct inputs occur. Taking this assumptions into account the
complete global system function F (x, g, y) must be calculated by
F (x, g, y) =
k
^
i=1
q(x)
xi
(gi gi (x, g))
l
^
(yj gj (x, g)). (82)
j=1
The complete global system function F (x, g, y) is an excellent behavioral model of the combinational circuit. Operations of the Boolean Differential Calculus allow the extraction of special interesting information from F (x, g, y).
In a classical forward simulation the outputs y must be
calculated for a given input pattern in(x). This analysis
problem is solved by:
For such a function it can be analyzed by (58) whether
it is independent on xi , for which pattern x1 the output remains constant equal to 0,
out(y) = maxn+k (in(x) ∧ F (x, g, y)).
maxm f (x0 , x1 ) = 0,
x,g
(83)
x0
Typically the backward simulation is more complicated
than the forward simulation, because there is no unique assignment of an output pattern to the input values. By means
of the complete global system function F (x, g, y) and an
m-fold maximum the backward simulation for a given output pattern out(y) is as simple as the forward simulation:
in(x) = maxl+k (out(y) ∧ F (x, g, y)).
y,g
(84)
(90)
or for which pattern x1 the output remains constant equal to
1,
minm f (x0 , x1 ) = 1.
(91)
x0
Especially in asynchronous sequential circuits an intermediate inverse signal value can perturb the required behavior. Such sequences of signals are called as follows:
• (010) static 0-hazard,
Basically the same approach can be used in order to
find input - output patterns inout(x, y) which can appear together with some given pattern of the internal wires
internal(g):
inout(x, y) = maxk (internal(g) ∧ F (x, g, y)).
g
(85)
Due to the knowledge about all internal wires for each input pattern the complete global system function F (x, g, y)
is a white-box model of the combinational circuit. A simpler black-box model of the combinational circuit avoids the
information about the internal signals. The global system
function F (x, y) as a black box model can be calculated by
F (x, y) = maxk F (x, g, y).
g
(86)
Assume the outputs of a first combinational circuit having the behavior F (x, y) control directly the input of a second combinational circuit having the behavior H(y, z). If
not all 2l patterns y will appear at the output of the first
circuit, a don’t-care function hϕ (y) can be used in order to
simplify the second circuit:
hϕ (y) = maxl F (x, y).
x
(87)
Such a don’t-care function cannot exist for a reversible
combinational circuit. A reversible combinational circuit
has the same number n of inputs and outputs and generates
all possible 2n output patterns for both directions of control. Hence, a global system function F (x, y) describes a
reversible combinational circuit if and only if
n
n
n
n
min (max F (x, y)) ∧ min (max F (x, y)) = 1. (88)
y
x
x
y
A combinational circuit creates for each input pattern on
each output exactly one function value. Thus, the function
for each output yi of the circuit is completely defined and
can be calculated by
fi (x) = maxl (yi ∧ F (x, y)).
y
(89)
• (101) static 1-hazard,
• (0101) dynamic 0-hazard,
• (1010) dynamic 1-hazard.
The change of the inputs xi , xj at the same point of time can
raise a static hazard if the function satisfies the following
conditions:
1. The function has the same value before and after these
changes.
2. There are different function values in the appropriate
subspace.
All patterns (xi , xj , x1 ) for which such static hazards may
appear are the solution of the following equation:
∂f (xi , xj , x1 )
∧ ∆(xi ,xj ) f (xi , xj , x1 ) = 1.
∂(xi , xj )
(92)
Using a vectorial and a 2-fold maximum, the patterns of the
static 0-hazards can be calculated separately by
max f (xi , xj , x1 ) ∧ max 2 f (xi , xj , x1 ) = 1,
(xi ,xj )
(xi ,xj )
(93)
and the vectorial and a 2-fold minimum describe in the following equation the static 1-hazards:
min f (xi , xj , x1 ) ∧ min 2 f (xi , xj , x1 ) = 1.
(xi ,xj )
(xi ,xj )
(94)
Dynamic hazards can appear if three variables of the
function change their values. The comparison of the signal
sequences between the static and dynamic hazards shows
that a dynamic hazard can be expressed by a static hazard
with regard to two of the given variables followed by the
change of the function caused by the third variable. Hence,
for f (x) = f (xi , xj , xk , x1 ), the dynamic 0-hazards can be
calculated by (95) and the dynamic 1-hazards by (96) with
regard to the change of the variables (xi , xj , xk ):
∂f (x)
= 1,
∂xk
∂f (x)
min f (x) ∧ min 2 f (x) ∧
= 1.
∂xk
(xi ,xj )
(xi ,xj )
max f (x) ∧ max 2 f (x) ∧
(xi ,xj )
(xi ,xj )
(95)
• AND-bi-decomposition:
(96)
f (xa , xb , xc ) = g(xa , xc ) ∧ h(xb , xc ),
4.3. Synthesis of Combinational Circuits
The number of variables the function is depending on
strongly influences the size of the circuit. Therefore it is
helpful to separate single variables from the function using
an AND-, OR- or EXOR-gate at the output of the circuit.
The variable xi can be separated from the logic function
f (x0 , xi ) by an EXOR-gate if and only if
∂f (x0 , xi )
= 1.
∂xi
(97)
If (97) holds for any x0 , the remainder function f (x0 ) can
be calculated by
f (x0 ) = max(xi ∧ f (x0 , xi )).
xi
xi
(99)
If (99) holds for any x0 , the remainder function f (x0 ) can
be calculated by
f (x0 ) = max(xi ∧ f (x0 , xi )).
xi
(100)
The variable xi can be separated from the logic function
f (x0 , xi ) by an OR-gate if and only if
min(xi ∨ f (x0 , xi )) = 1.
xi
(101)
If (101) holds for any x0 , the remainder function f (x0 ) can
be calculated by
f (x0 ) = max(xi ∧ f (x0 , xi )).
xi
(102)
Similar equations exist for the separation of xi using an
AND- or OR-gate. In this case it is necessary to replace the
single variables xi or xi , respectively, by their complement
(in the formulas (99), (100) (101), and (102)).
The separation of a single variable from a given logic
function is on the one hand extremely helpful, but on the
other hand only possible in few cases. More functions
can be simplified using the bi-decomposition. For a bidecomposition the set of variables x is split into three disjoint sets of variables xa , xb , and xc , respectively. In a
(103)
• OR-bi-decomposition:
f (xa , xb , xc ) = g(xa , xc ) ∨ h(xb , xc ),
(104)
• EXOR-bi-decomposition:
f (xa , xb , xc ) = g(xa , xc ) ⊕ h(xb , xc ).
(105)
The logic function f (xa , xb , xc ) is AND-bi-decomposable with regard to the sets of variables xa and xb if and
only if
f (xa , xb , xc ) ∧ maxk f (xa , xb , xc ) ∧
xa
maxl f (xa , xb , xc ) = 0.
(98)
The variable xi can be separated from the logic function
f (x0 , xi ) by an AND-gate if and only if
max(xi ∧ f (x0 , xi )) = 0.
bi-decomposition the function f (xa , xb , xc ) must be represented by the pair of functions g(xa , xc ) and h(xb , xc )
which include only the variables xc commonly. There are
three types of bi-decompositions:
xb
(106)
Formula (106) describes the necessary and sufficient condition for the AND-bi-decomposition that it is not allowed
that a 0-value of the function is covered by the projection of
1-values in both the xa -direction and the xb -direction.
Generally there are different decomposition functions.
One pair of decomposition functions of the AND-bi-decomposition can be calculated by (107) and (108):
g(xa , xc )
=
maxk f (xa , xb , xc ),
(107)
h(xb , xc )
=
maxl f (xa , xb , xc ).
(108)
xb
xa
Dual conditions and rules were found for the OR-bidecomposition. The logic function f (xa , xb , xc ) is OR-bidecomposable with regard to the sets of variables xa and xb
if and only if
f (xa , xb , xc ) ∧ maxk f (xa , xb , xc ) ∧
xa
maxl f (xa , xb , xc ) = 0.
xb
(109)
It is necessary and sufficient for an OR-bi-decomposition
that no 1-value of the function is covered by the projection
of 0-values in both the xa -direction and the xb -direction.
One pair of decomposition functions of the OR-bi-decomposition can be calculated by
g(xa , xc )
=
minl f (xa , xb , xc ),
(110)
h(xb , xc )
=
mink f (xa , xb , xc ).
(111)
xb
xa
The similarity of the AND-bi-decomposition and the
OR-bi-decomposition follows from the properties of the
AND- and OR-operations. Both operations are nonlinear
operations of the Boolean Algebra. In contrast the EXORoperation is a linear operation of the algebraic structure of
a Boolean Ring. Therefore we study the EXOR-bi-decomposition first for simpler cases.
The logic function f (a, b, xc ) is EXOR-bi-decomposable with regard to the single variables a and b if and only
if
∂ 2 f (a, b, xc )
= 0.
(112)
∂a∂b
An even number of function values 1 in each subspace (xc )
allows the EXOR-bi-decomposition.
Formula (112) can be generalized from a single variable
b to a set of variables xb . The logic function f (a, xb , xc ) is
EXOR-bi-decomposable with regard to the single variable
a and a set of variables xb if and only if
∂f (a, xb , xc )
= 0.
(113)
∆xb
∂a
This more general EXOR-bi-decomposition requires that in
a subspace (xc ) the change of the function values with regard to a must be the same for each xb .
The most general EXOR-bi-decomposition of a completely specified logic function with regard to the two sets
of variables xa and xb combines the construction of a possible solution with the check whether such an EXOR-bidecomposition exists.
Let (114) be the potential EXOR-decomposition function g(xa , xc ) of the logic function f (xa , xb , xc ):
g(xa , xc ) = f (xa , xb = (0, 0, . . . , 0), xc );
(114)
then f (xa , xb , xc ) is EXOR-bi-decomposable with regard
to the sets of variables xa and xb if and only if
∆xa (f (xa , xb , xc ) ⊕ f (xa , xb = (0, 0, . . . , 0), xc )) = 0.
(115)
If (115) holds, then (114) and (116)
h(xb , xc ) =
maxm (f (xa , xb , xc ) ⊕ f (xa , xb = (0, 0, . . . , 0), xc ))
xa
(116)
are possible decomposition functions of the EXOR-bidecomposition of f (xa , xb , xc ) with regard to the sets of
variables xa and xb .
The conditions for the bi-decomposition also restrict the
number of logic functions for which such a decomposition
exists. An incompletely specified function, described by
the mark functions q(x), r(x), and ϕ(x) allows to select
one function out of the set of 2|ϕ(x)| possibilities offered by
the don’t-care set. The chance to find a bi-decomposition
in that set grows strongly with the size of the the don’t-care
set. It is possible to check implicitly whether such a set of
2|ϕ(x)| functions includes at least one function which allows
a certain bi-decomposition.
The function set specified by the mark functions fq (xa ,
xb , xc ) and fr (xa , xb , xc ) includes at least one logic function f (xa , xb , xc ) that is AND-bi-decomposable with regard to the sets of variables xa and xb if and only if
fr (xa , xb , xc ) ∧ maxk fq (xa , xb , xc ) ∧
xa
maxl fq (xa , xb , xc ) = 0.
xb
(117)
The comparison to the check for the AND-bi-decomposition of a completely specified function (106) show the
substitution of the mark function fr (xa , xb , xc ) for the
complement of completely specified function f (xa , xb , xc )
and mark function fq (xa , xb , xc ) for the completely specified function f (xa , xb , xc ).
In the case of bi-decomposition of incompletely specified functions exist several decomposition functions, too.
Due to excellent test properties we present such decomposition functions in the next section.
The function set specified by the mark functions fq (xa ,
xb , xc ), and fr (xa , xb , xc ) includes at least one logic function f (xa , xb , xc ) that is OR-bi-decomposable with regard
to the sets of variables xa and xb if and only if
fq (xa , xb , xc ) ∧ maxk fr (xa , xb , xc ) ∧
xa
maxl fr (xa , xb , xc ) = 0.
xb
(118)
The duality between the AND- and the OR-operation leads
to a condition for the AND-bi-decomposition which is similar to the OR-bi-decomposition. Formula (118) for the
OR-bi-decomposition can be constructed from the formula
(117) for the AND-bi-decomposition exchanging the mark
functions fq (xa , xb , xc ) and fr (xa , xb , xc ).
For the same reasons as in the case of a completely specified function it is more difficult to check whether the set
of functions described by the mark functions fq (xa , xb , xc )
and fr (xa , xb , xc ) includes at least one EXOR-bi-decomposable function. A solution for that check exists for the
case that the sets of variables xa and xb include a single
variable each.
The function set specified by the mark functions fq (a,
b, xc ), fr (a, b, xc ), and fϕ (a, b, xc ) includes at least one
function f (a, b, xc ) that is EXOR-bi-decomposable with regard to the sets of variables xa = (a) and xb = (b) if and
only if
∂ 2 fq (a, b, xc )
∧ max2 fϕ (a, b, xc ) = 0.
∂a∂b
(a,b)
(119)
In comparison to (112) formula (119) shows directly the
benefits for the case that the don’t-care set is not empty.
If at least a single don’t-care is given in a subspace (xc ),
then the required even number of function values 1 can be
chosen. This weakening of the basic condition is expressed
by the second term of the conjunction in (119).
The generalization of (113) requires the calculation of
a simple derivative and the ∆-operation for the function set specified by mark functions fq (xa , xb , xc ) and
fr (xa , xb , xc ). The result of these set operations are sets
again that can be expressed by mark functions fq and fr ,
too. The zero on the right-hand side of the equation allows
a further simplification by using the ∆-operation.
The function set specified by the mark functions fq (a,
xb , xc ) and fr (a, xb , xc ) includes at least one logic function
f (a, xb , xc ) that is EXOR-bi-decomposable with regard to
the sets of variables xa = (a) and xb if and only if
The completeness of the bi-decomposition follows from
the next theorem.
maxm fqa (xb , xc ) ∧ fra (xb , xc ) = 0
A simple and often used error model is based on stuck-at
errors. There are two types of stuck-at errors. If a technical
fault causes a constant value 0, there is a stuck-at-zero error (SA0). Otherwise, if a technical fault causes a constant
value 1 there is a stuck-at-one error (SA1). We introduce
additionally the logic variable T to the model in order to
express commonly an SAT error.
0, if a stuck-at-0 error (SA0) is considered,
T =
1, if a stuck-at-1 error (SA1) is considered.
(125)
In order to test a combinational circuit, test patterns are
necessary. Typically the access is restricted to the inputs
and outputs of the circuit. Thus, it is most difficult to find
test patterns to check an internal wire. In order to calculate
the test pattern we need the function g(x) that controls this
wire and the function h(x, s) where s is the signal of the
wire to be tested.
There are three condition for a test pattern to detect an
SAT-error.
xb
(120)
where
fqa (xb , xc )
fra (xb , xc )
=
maxfq (a, xb , xc ) ∧ maxfr (a, xb , xc ),
=
(121)
minfq (a, xb , xc ) ∨ minfr (a, xb , xc ).
a
a
a
a
(122)
Unfortunately there are logic functions for which none
of the introduced strong bi-decompositions exists. A bidecomposition for any logic function exists if additionally
the weak bi-decomposition is used. In contrast to the strong
bi-decomposition, the set of variables xb is empty in a weak
bi-decomposition. A weak EXOR-bi-decomposition exists
for any logic function, but does not lead to simplifications
in some cases.
The function set specified by the mark functions fq (xa ,
xc ) and fr (xa , xc ) includes at least one logic function
f (xa , xc ) that is weakly AND-bi-decomposable with regard to the set of variables xa if and only if
fr (xa , xc ) ∧ maxm fq (xa , xc )) 6= 0.
xa
(123)
The function set specified by the mark functions fq (xa ,
xc ) and fr (xa , xc ) includes at least one function f (xa , xc )
that is weakly OR-bi-decomposable with regard to the dedicated set xa if and only if
fq (xa , xc ) ∧ maxm fr (xa , xc ) 6= 0.
xa
(124)
If a weak AND- or OR-bi-decomposition exists, the decomposition functions can be calculated basically in the
same way as in the case of a strong AND- or OR-bidecomposition taking into account that the set of variables
xb is empty.
Theorem 13 If the function set specified by the mark functions fq (xa , xc ) and fr (xa , xc ) includes only logic functions f (xa , xc ) which are neither weakly OR-bi-decomposable nor weakly AND-bi-decomposable with regard to a
single variable in the set of variables xa , then this function
set includes at least one logic function f (xa , xc ) which is
disjointly EXOR-bi-decomposable with regard to the single
variable in xa = (a) and the set of variables xb = xc .
Due to the restricted space we avoid the proof in this
paper. The proof is given in [7].
4.4. Test of Combinational Circuits
1. It is necessary to control the circuit in such a way that
the function value s = g(x) is the complement of the
stuck-at-T -error to be checked at the wire s. Only in
this case a SAT -error can cause a change of the circuit output. The solutions of equation (126) enable an
effect of a SAT -error. Therefore we call the equation
(126) error controllability condition:
g(x) ⊕ T = 1.
(126)
2. We assume that only the output of the circuit is directly
observable. The effect of the internal error at the wire
s must influence the function value at the circuit output. Thus, a further necessary condition for test patterns is the error observability. The value at the wire
s is observable by the value at the circuit output for all
solution vectors x of (127):
∂h(x, s)
= 1.
∂s
(127)
3. It is necessary to compare the observed output value
y with the expected function value of f (x) in order
to evaluate whether there is a SAT-error at the wire s
or not. The expected value y is associated with the
input pattern x in the solution of the logic equation
(128). The solution of equation (128) allows the error
evaluation:
f (x) y = 1.
(128)
The necessary conditions (126), (127), and (128) can be
combined to the necessary and sufficient condition (129).
The solution of equation (129) consists of test patterns
(x, y, T ). Each of these patterns detects a SAT -error if the
circuit does not show the value y controlled by the input x:
∂h(x, s)
∧ (f (x) y) = 1.
(129)
(g(x) ⊕ T ) ∧
∂s
As mentioned above, the decomposition functions can
be selected differently. It is known that there are combinational circuits with some wires without test patterns for
SA0 or SA1. Nevertheless it is possible to calculate the decomposition function in such a way that for all inputs, all
outputs and all gate connections both at least one SA0 test
pattern and at least one SA1 test pattern will exist.
In order to reach a complete testability, the mark functions gq and gr of an AND-bi-decomposition can be calculated by (130) and (131). In this case the values 1 expressed by fq (xa , xb , xc ) must be covered by gq (xa , xc )
shown in (130), and only such values 0 (expressed by of
fr (xa , xb , xc )) must be covered by gr (xa , xc ) that cannot
be covered by hr (xb , xc ), see (131):
gq (xa , xc )
=
maxl fq (xa , xb , xc ),
gr (xa , xc )
=
maxl (fr (xa , xb , xc ) ∧
xb
(130)
xb
maxk fq (xa , xb , xc )).
xa
(131)
The function set specified by formulas (130) and (131)
describes all possible logic functions g(xa , xc ) of the ANDbi-decomposition of the given function set. Each function
g(xa , xc ) of the set described by (130) and (131) can be
combined by an AND-bi-decomposition with all associated
functions of the function set specified by the formulas (132)
and (133):
k
hq (xb , xc )
=
max fq (xa , xb , xc ),
hr (xb , xc )
=
maxk (fr (xa , xb , xc ) ∧
xa
gq (xa , xc )
=
gr (xa , xc )
xb
maxk fr (xa , xb , xc )),
(134)
=
maxl fr (xa , xb , xc ).
(135)
xb
Formulas (134) and (135) describe the largest possible gfunction set of the OR-bi-decomposition. Again, the function g(xa , xc ) selected from the g-set must be used to calculate the mark functions for the h-set of the OR-bi-decomposition by (136) and (137):
hq (xb , xc )
=
maxk (fq (xa , xb , xc )
hr (xb , xc )
=
∧ g(xa , xc )),
maxk fr (xa , xb , xc ).
xa
xa
(136)
(137)
The sequence of the design of both branches is analogue
to the AND-bi-decomposition.
The formulas (130), . . . , (137) can be used to compute
the decomposition functions for both the strong and the
weak bi-decompositions of the fitting AND- or OR-type.
Finally we need decomposition functions for an EXORbi-decomposition of an incompletely specified function
with regard to a single variable a and the set of variables
xb . There are only 4 different decomposition functions g(a)
in the subspace xc = const. If fqa (xb , xc = const) 6= 0
(121), then g(a) cannot be a constant function so that there
is a free choice between g(a) = a or g(a) = a. The
formulas (138), (139) and (140) compute one combination of testable EXOR-decomposition functions of the function set specified by the mark functions fq (a, xb , xc ) and
fr (a, xb , xc ):
g(a, xc ) = a ∧ maxm fqa (xb , xc ),
xb
hq (xb , xc )
(133)
maxl (fq (xa , xb , xc ) ∧
xa
(132)
xa
g(xa , xc )).
The formulas (130), (131), (132), and (133) reveal a
synthesis procedure. Using the formulas (130) and (131)
the mark function for the g-branch can be calculated without any restriction. This incompletely specified function
must be designed completely so that the realized function
g(xa , xc ) is known. After that the h-branch can be designed using this function g(xa , xc ) in the formulas (132)
and (133).
Similarly, the ON-function gq (xa , xc ) of an OR-bi-decomposition must cover only such values 1 of fq (xa ,
xb , xc ) that overlap with maxxa m fr (xa , xb , xc ) because
these values 1 can not be covered by hq (xb , xc ). Due
to the OR-operation, all values 0 must be mapped from
fr (xa , xb , xc ) into gr (xa , xc ):
=
(138)
max((g(a, xc ) ∧ fq (a, xb , xc )) ∨
a
(g(a, xc ) ∧ fr (a, xb , xc ))),
(139)
hr (xb , xc )
=
max((g(a, xc ) ∧ fr (a, xb , xc )) ∨
a
(g(a, xc ) ∧ fq (a, xb , xc ))).
(140)
In addition to the computation of a circuit structure the
suggested approach has two further important properties.
1. Experimental results [6] have shown that the depth of
the circuit (the maximal number of gate levels) is small
in comparison to other approaches. This helps the test
implicitly, because the paths to control and to observe
the potential error point are short. Consequently, this
property is important for a small delay in fast circuits.
2. Another important property is the possibility that terms
required for the computation of a circuit can be accumulated to a complete set of test patterns. Only a small
overhead of about 10% solves the N P -complete problem of test pattern generation in parallel to the synthesis of the fully testable circuit [18].
5. Conclusions
This short introduction into the Boolean Differential Calculus and the presentation of some applications show the
usefulness of this theory. If it is combined with the appropriate software and a high-level description of the problems to be solved, then it can be highly important for many
applications of logic functions, particularly for the design
and analysis of hardware in many areas. The inclusion into
courses and educational processes of Engineers and Computer Scientists should be self-evident.
References
[1] D. Bochmann. Binary Systems - A BOOLEAN Book. TUDpress - Verlag der Wisenschaft GmbH, Dresden, Germany,
2008.
[2] D. Bochmann, F. Dresig, and B. Steinbach. A new decomposition method for multilevel circuit design. In European
Conference on Design Automation, pages 374–377, Amsterdam, Holland, 1991.
[3] D. Bochmann and C. Posthoff. Binäre Dynamische Systeme.
Akademie-Verlag, Berlin, 1981.
[4] M. Davio, J.-P. Deschamps, and A. Thayse. Discrete and
Switching Functions. McGraw-Hill International, 1978.
[5] D. A. Huffman. Solvability criterion for simultaneous logical equations. Quarterly Progress Report, 1(56):87–88,
1958.
[6] A. Mishchenko, B. Steinbach, and M. Perkowski. An algorithm for bi-decomposition of logic functions. In Proceedings of the 38th Design Automation Conference, pages
103–108, Las Vegas (Nevada) USA, 2001.
[7] C. Posthoff and B. Steinbach. Logic Functions and Equations - Binary Models for Computer Science. Springer, Dordrecht, The Netherlands, 2004.
[8] I. S. Reed. A class of multiple-error-correcting codes and
the decoding scheme. Transactions of the IRE Professional
Group on Information Theory, 4(4):38–49, 1954.
[9] R. Scheuring and H. Wehlan. On the design of discrete event
dynamic systems by means of the boolean differential calculus. In First IFAC Symposium on Design Methods of Control
Systems, pages 723–728, Pergamon, 1991.
[10] J. Sheldon B. Akers. On a theory of boolean functions. Journal of the Society for Industrial and Applied Mathematics
(SIAM), 7(4):487–498, 1959.
[11] B. Steinbach. XBOOLE - a toolbox for modelling, simulation, and analysis of large digital systems. System Analysis
and Modelling Simulation, 9(4):297–312, 1992.
[12] B. Steinbach and R. Hilbert. Fehler in Automaten, chapter
Schnelle Testsatzgenerierung, gestützt auf den Booleschen
Differentialkalkül, pages 45–90. Verlag Technik, Berlin,
Germany, 1989.
[13] B. Steinbach and C. Lang. Artificial Intelligence in Logic Design, chapter Exploiting Functional Properties of
Boolean Functions for Optimal Multi-Level Design by BiDecomposition, pages 159–200. Kluwer Academic Publisher, Dordrecht, The Netherlands, 2004.
[14] B. Steinbach and C. Posthoff. Extended theory of boolean
normal forms. In Proceedings of the 6th Annual Hawaii International Conference on Statistics, Mathematics and Related Fields, pages 1124–1139, Honolulu, Hawaii, 2007.
[15] B. Steinbach and C. Posthoff. Xboole and the education of
engineers. In Computer - Aided Design of Discrete Devices CAD DD 2007, Proceedings of the Sixth International Conference, volume 2, pages 14–22, Minsk, Belarus, 2007.
[16] B. Steinbach and C. Posthoff. Logic Functions and Equations - Examples and Exercises. Springer Science + Business Media B.V., 2009.
[17] B. Steinbach, F. Schumann, and M. Stöckert. Power and
Timing Modelling for Performance of Integrated Circuits,
chapter Functional Decomposition of Speed Optimized Circuits., pages 65–77. IT Press, Bruchsal, 1993.
[18] B. Steinbach and M. Stöckert. Design of fully testable circuits by functional decomposition and implicit. In Test Pattern Generation. Proceedings of the 12th IEEE VLSI Test
Symposium, pages 22–27, Cherry Hill (New Jersey) USA,
1994.
[19] B. Steinbach and A. Wereszczynski. Synthesis of multi-level
circuits using exor-gates. In IFIP WG 10.5 - Workshop on
Applications of the Reed-Muller Expansion in Circuit Design, pages 161–168, Chiba - Makuhari, Japan, 1995.
[20] B. Steinbach and Z. Zhang. Synthesis for full testability of
large partitioned combinational circuits. In Boolesche Probleme, Proceedings des 2. Workshops, pages 31–38, Freiberg,
Germany, 1996.
[21] B. Steinbach and Z. Zhang. Synthesis for full testability of
partitioned combinational circuits using boolean differential
calculus. In IWLS’97 - Synthesis in the Sierra, pages 1–4,
Granlibakken Resort - Tahoe City, CA - USA, 1997.
[22] A. Thayse. Boolean Calculus Of Differences. Springer,
Berlin, 1981.
[23] S. N. Yanushkevich. Logic Differential Calculus in MultiValued Logic Design. PhD thesis, Tech. University of
Szczecin, Szczecin, Poland, 1998.