Академический Документы
Профессиональный Документы
Культура Документы
2
Switching Algebra
Unate & Threshold Functions
Alfredo Benso
Politecnico di Torino, Italy
Alfredo.benso@polito.it
Unate Functions
Functions that can be implemented using a
Single-Rail Logic with AND and OR gates.
Single-Rail Logic to minimize pins and
interconnect.
Usually it is possible to use a NOT gate to
realize inversion in Single -Rail logic, but there
are situations in which inversion is very
expensive to implement (RAM address
decoding circuits)
Unate functions
Example
F(w, x, y, z)= wx+wz
Essential: w, x, z
Vacuous: y
Positive: x, y
Negative: z, y
Mixed: w
Problem
Example
F(w, x, y, z)= x + yz + xyw+wz
Essential:
Vacuous:
Positive:
Negative:
Mixed:
Problem
Example
F(w, x, y, z)= x + yz + xyw+wz
Essential: w, x, y, z
Vacuous: Positive: x
Negative: y
Mixed: z
Classification of functions
Monotone increasing (or Frontal or Positive)
function: it is positive in all its variables it
can be represented with AND and OR gates
ONLY - (no inverters)
Monotone decreasing (or Backal or Negative)
function: it is negative in each of its variables
it can be represented in SOP form with ALL
complemented literals
Unate function: it is positive or negative in
each of its variables
Examples
f(x,y,z)=x y + y z
Monotone Increasing (Frontal)
g(a,b,c)= ac +b c
Monotone Decreasing (Backal)
k(A, B, C)= A B + A C
Unate Function
h(X, Y, Z)= X Y + Y Z
Unate in variables X and Z
Binate in variable Y
Threshold Functions
Definition
Let (w1, w2, , wn) be an n-tuple of realnumbered weights and t be a real number
called the threshold.
Then a threshold
function, f, is defined as:
x1
1, w1 x1 + w2 x2 + ... + wn xn t
f =
0, otherwise
x2
w2 w1
wn
xn
Threshold Functions
Example (2-valued logic)
A 3-input majority function has a value of 1 iff 2 or
more variables are 1
Of the 16 Switching Functions of 2 variables, 14 are
threshold functions (but not necessarily majority
functions)
w1 = w2 = -1 t = -0.5
f = x1 x 2
All threshold functions are unate
Majority functions are threshold functions where
n = 2m+1
t = m+1
w1 = w2 == wn = 1, majority functions equal 1 iff
more variables are 1 than 0
Majority functions are totally symmetric and monotone
increasing
Problem
A threshold gate realization is to be found for
the function f(x,y,z)=x(y+z)
Solution
(0)
(1)
(2)
(3)
(4)
(5)
(6)
(7)
x
0
0
0
0
1
1
1
1
y
0
0
1
1
0
0
1
1
z
0
1
0
1
0
1
0
1
f
0
0
0
0
0
1
0
1
ai
0
wz < t
wy < t
wy+ wz < t
wx< t
wx + wz t
wx + wy < t
wx + wy + wy t
t=2.5
Problem
Is f(x,y) = xy + xy a threshold function?
x
0
0
1
1
y
0
1
0
1
f
0
1
1
0
ai
0
wy t
wx t
wx + wy < t
Majority