Sie sind auf Seite 1von 33

1

Majority Logic
Logic synthesis with 3-input majority elements
Majority decomposition

x
1
x
1
x
n
x
n
f

f

2
Logical Synthesis with 3-input majority
elements
Theorem:

Any logical function of three variables can be implemented by a two-level
circuit of four majority elements with negations (and constants) at the inputs of
the first level.
Maj(x
0
,x
1
,x
2
) = Sign(x
0
+x
1
+x
2
-2) = x
0
#x
1
#x
2
= x
0
x
1
+x
0
x
2
+x
1
x
2

AND: x
0
x
1
= x
0
#x
1
#0;
OR: x
0
+x
1
= x
0
#x
1
#1;
3
Motivation Example:
Quantum-dot cellular automata (QCA)
Four basic blocks:
4
http://spectrum.ieee.org/semiconductors/materials/quantum-dots-get-
doped/?utm_source=techalert&utm_medium=email&utm_campaign=040711
5
Majority based implementation of functions
of 3 variables
= # #
( )
0 1 2 0 2 1 0 2 1
( # #0) # #0 x x x x x x x x x = =
( ) ( # # )# # x x x x x x
0 1 2 0 1 2
1 0 + =
Class C
1
Class C
5
6
x x x x x x x x x x x x
0 1 2 0 1 2 0 1 1 2 1 2
1 0 0 + = ( # # )#( # # )#( # # )
= # #
0 1 2 0 1 2
0 1 0 2 1 2 0 1
0 1 2 0 1
( )( )
( # # ) #( # #1) #0
x x x x x x
x x x x x x x x
x x x x x
+
= + + +
=
Class C
3
Class C
4
7
x x x x x x x x x x x
1 2 0 1 2 1 2 1 2 0 1
1 0 0 + = ( # # )#( # # )#( # # )
x x x x x x x x x
x x x x x x x x
0 1 2 0 1 2 0 1 2
0 1 2 0 1 2 1 2
0
+ + =
= ( # # )#( # # )#( # # )
Class C
6
Class C
7
8
x x x x x x x x x
0 1 0 2 1 2 0 1 2
+ + = # #
x x x x x x x x
0 2 1 2 0 2 1 2
1 1 0 + = ( # # )#( # # )#
x x x x x x x x x x x x x x
0 2 1 2 0 1 2 0 1 2 0 2 1 2
1 0 + + = ( # # )#( # # )#( # # )
x x x x x x x x x x
0 1 2 0 1 2 0 1 2 2
= ( # # )#( # # )#
Class C
9
Class C
10
Class C
11
Class C
13
9
Majority decomposition
Any circuit is a composition of simple (basic) elements (functions).
Hence, the problem of synthesizing a circuit of defined function is a
problem of representing the defined function as superposition of basic
element functions (decomposition, mapping).
The synthesis can be descending (from output, top-down) or
ascending (from inputs, down-top)
For the descending procedure:
1. Fix the output element function. In our case, the majority function :

F X Y X Y X Y X ( ) ( )# ( )# ( ) =
1 2 3
2. Looking for functions Y
j
(X), the implementation of each of which is
guaranteed to be simple by certain criteria than that of F(X).
There are at least two of such criteria:
Reduction of the set of variables of Y
j
(X).
Reduction of the Y
j
(X) domain. (Reduction of the number of vertexes on
which function is defined).
10
Majority decomposition (cont)
1 1 2 3 4 5 6 2 1 2 3 1 2 4 2 3 4
, F x x x x x x F x x x x x x x x x = = + +
Reduction criteria:

A. Reduction of the set of variables of Y
j
(X).



B. Reduction of the Y
j
(X) domain. (Reduction of the number of vertexes
on which function is defined).
1 2
(0,1, 2, 4), (1) (0, 2, 4) F F
u
= = +

11
I. Reduction of the Y
j
(X) domain

= = =
= = =
= = =

= = =
= = =
= = =
0 0 or
0 0 or
0 0
then 0 = F(X)
1 1 or
1 1 or
1 1
then 1 = F(X)
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
3 2 1
) ( ; ) ( *; ) (
) ( *; ) ( ; ) (
* ) ( ; ) ( ; ) (
) ( ; ) ( *; ) (
) ( *; ) ( ; ) (
* ) ( ; ) ( ; ) (
X Y X Y X Y
X Y X Y X Y
X Y X Y X Y
if
X Y X Y X Y
X Y X Y X Y
X Y X Y X Y
if
12
I. Reduction of the Y
j
(X) domain (cont)
( , , , , ) F x y z v w
xyz xzw xvw xyzv yzvw yzv wvz
=
= + + + + + +
000 001 011 010 110 111 101 100
00 1 1 1
01 1 1
11 1 1 1 1 1
10 1 1 1 1 1 1
xyz
wv

Example
13
Inputs Components
x y z v w No F(X) Y
1
(X) Y
2
(X) Y
3
(X)

0 0 0 0 0 0 1 * 1 1
1 0 0 0 0 1 1 * 1 1
0 1 0 0 0 2 0 0 0 *
1 1 0 0 0 3 1 1 * 1
0 0 1 0 0 4 0 * 0 0
1 0 1 0 0 5 0 1 0 *
0 1 1 0 0 6 0 * 0 0
1 1 1 0 0 7 0 * 0 0
0 0 0 1 0 8 0 0 * 0
1 0 0 1 0 9 0 0 * 0
0 1 0 1 0 10 0 0 * 0
1 1 0 1 0 11 1 1 1 *
0 0 1 1 0 12 0 0 * 0
1 0 1 1 0 13 1 1 1 *
0 1 1 1 0 14 0 * 0 0
1 1 1 1 0 15 0 * 0 0
0 0 0 0 1 16 1 * 1 1
1 0 0 0 1 17 1 * 1 1
0 1 0 0 1 18 0 0 0 *
1 1 0 0 1 19 1 1 * 1
0 0 1 0 1 20 0 0 0 *
1 0 1 0 1 21 1 1 * 1
0 1 1 0 1 22 1 1 * 1
1 1 1 0 1 23 1 1 * 1
0 0 0 1 1 24 1 * 1 1
1 0 0 1 1 25 1 * 1 1
0 1 0 1 1 26 1 * 1 1
1 1 0 1 1 27 1 1 * 1
0 0 1 1 1 28 0 0 * 0
1 0 1 1 1 29 1 1 1 *
0 1 1 1 1 30 0 * 0 0
1 1 1 1 1 31 0 * 0 0

14
0
z y x X Y # # ) ( =
1
v z y X Y # # ) ( =
2
w v z X Y # # ) ( =
3
000 001 011 010 110 111 101 100
00 1 1 1
01 1 1
11 1 1 1 1 1
10 1 1 1 1 1 1
xyz
wv

000 001 011 010 110 111 101 100
00 1 1 1
01 1 1
11 1 1 1 1 1
10 1 1 1 1 1 1
xyz
wv

000 001 011 010 110 111 101 100
00 1 1 1
01 1 1
11 1 1 1 1 1
10 1 1 1 1 1 1
xyz
wv

1
I. Reduction of the Y
j
(X) domain (cont)
F X Y X Y X Y X ( ) ( )# ( )# ( ) =
1 2 3
15
II. Reduction of the set of variables of Y
j
(X)
F(x ,y ,z ,W)
f (x ,W)
1
f (y ,W)
2
f (z ,W)
3
f (x ,W)
4
f (y ,W)
5
f (z ,W)
6
f (x ,W)
7
f (y ,W)
8
f (z ,W)
9
#
#
#
#
.
From the implementations of 3-variable functions given above it follows
that any function of n variables can be implemented in a form:
16
Example
2 2 1 1 2 2
yzw x w z y x xyw w y x w z y x w z y x ) W , z , y , x ( F + + + + + =
000 001 011 010 110 111 101 100
00 1 1
01 1 1
11 1 1 1 1 1 1
10 1 1 1 1 1 1
xyz
w
1
w
2
II. Reduction of the set of variables of Y
j
(X)
17
000 001 011 010 110 111 101 100
00 1 1
01 1 1
11 1 1 1 1 1 1
10 1 1 1 1 1 1
xyz
w
1
w
2
000 001 011 010 110 111 101 100
00 1 1
01 1 1
11 1 1 1 1 1 1
10 1 1 1 1 1 1
xyz
w
1
w
2
000 001 011 010 110 111 101 100
00 1 1
01 1 1
11 1 1 1 1 1 1
10 1 1 1 1 1 1
xyz
w
1
w
2
) # # ( )# # # ( )# # # ( ) , , , (
2 2 1
w z x w z x w y x W z y x F =
1 1
1 1
yw w x y x
w y x W z y x Y
+ + =
= = # # ) , , , (
2 2
w z x Y # # =
2 3
w z x Y # # =
F X Y X Y X Y X ( ) ( )# ( )# ( ) =
1 2 3
18
II. Reduction of the set of variables of Y
j
(X) (cont)
F(x ,y ,z ,W)
f (x ,W)
1
f (y ,W)
2
f (z ,W)
3
f (x ,W)
4
f (y ,W)
5
f (z ,W)
6
f (x ,W)
7
f (y ,W)
8
f (z ,W)
9
#
#
#
#
.
From the implementations of 3-variable functions given above it follows
that any function of n variables can be implemented in a form:
19
Example
2 2 1 1 2 2
yzw x w z y x xyw w y x w z y x w z y x ) W , z , y , x ( F + + + + + =
II. Reduction of the set of variables of Y
j
(X) (cont)
20
W
1
=0; W
2
=0;
W
1
=1; W
2
=0;
W
1
=0; W
2
=1;
W
1
=1; W
2
=1;
1
Y
21
W
1
=0; W
2
=0;
W
1
=1; W
2
=0;
W
1
=0; W
2
=1;
W
1
=1; W
2
=1;
1
Y
# #0 xy x y =
# #0 xy x y =
# #1 x y x y + =
# #1 x y x y + =
1 1 2 1 2 1 2 1 2
2 1 2 1 2 1 2 1 2
3 1 2 1 2 1 2 1 2 1
1 1 2 3 1
( , )
( , )
( , ) 0 1 0 1
( , , , ) # # # #
f W x w w x w w x w w x w w x x
f W y w w y w w y w w y w w y y
f W z w w w w w w w w w
Y W x y z f f f x y w
= + + + =
= + + + =
= + + + =
= =
22
W
1
=0; W
2
=0;
W
1
=1; W
2
=0;
W
1
=0; W
2
=1;
W
1
=1; W
2
=1;
1
Y
# #0 xy x y =
# #0 xy x y =
# #1 x y x y + =
# #1 x y x y + =
1 1 2 1 2 1 2 1 2
2 1 2 1 2 1 2 1 2
3 1 2 1 2 1 2 1 2 1
1 1 2 3 1
( , )
( , )
( , ) 0 1 0 1
( , , , ) # # # #
f W x w w x w w x w w x w w x x
f W y w w y w w y w w y w w y y
f W z w w w w w w w w w
Y W x y z f f f x y w
= + + + =
= + + + =
= + + + =
= =
f
1
f
2
f
3
23
W
1
=0; W
2
=0;



W
1
=1; W
2
=0;



W
1
=0; W
2
=1;



W
1
=1; W
2
=1;


1 1
1 1
yw w x y x
w y x W z y x Y
+ + =
= = # # ) , , , (
2 2
w z x Y # # =
Some of vertexes may be defined arbitrary:
2 3
w z x Y # # =
F X Y X Y X Y X ( ) ( )# ( )# ( ) =
1 2 3
24
) # # ( )# # # ( )# # # ( ) , , , (
2 2 1
w z x w z x w y x W z y x F =
1 1
1 1
yw w x y x
w y x W z y x Y
+ + =
= = # # ) , , , (
Finally, it can be checked that:
Representation of Y
1
25
The minimization of schemes on a majority basis, L. Ya. Rozenblyum,
Kibernetika, Vol 4, No. 1, pp.8-13,1968
Theorem: A logic function monotonic with respect to the
variable is representable in the form
Varshavsky Rozenblyum Methods
i
x
( , ) # ( , ) # ( , )
i i i j i j
f x Y x f x x Y f x x Y = = =
Proof: recall a#b#c=a(b v c) v bc,
( , ) ( 0, 0, ) ( 1, 1, )
( , ) ( 1, 0, ) ( 0, 1, )
( , ) ( , ) ( 1, ) ( )
( , ) ( , ) ( 0, )
( , ) ( 1, ) ( 0, )
i j j i j j i j
i j j i j j i j
i j i j i i
i j i j i
i i i i
f x x Y x f x x Y x f x x Y
f x x Y x f x x Y x f x x Y
f x x Y f x x Y f x Y isotonic in x
f x x Y f x x Y f x Y
f x Y x f x Y f x Y
= = = = v = =
= = = = v = =
= v = = =
= = = =

= = v =
26
Theorem: If a logic function monotonic with respect to the
variable is realized in the form
Rozenblyum Method (cont)
i
x
1 2
( , ) # ( ) # ( )
i i
f x Y x f Y f Y =
It is also realized in the form
1 2
2 1
( , ) # #
i i
f x Y x A B
A f Q f Q
B f Q f Q
=
= v
= v
where Q is an arbitrary logic function, depending on any
number of variables, including a variable or a constant.
27
Example:
Rozenblyum Method (cont)
1 2 1 3 4 2 3 4
f x x x x x x x x = v v
The function is monotonic in x
1
.
1 1 2 2 3 4 2
2 1 2 2 3 4 2 3 4 2 3 4
( , , , )
( , , , )
f f x x x x x x
f f x x x x x x x x x x x
= = =
= = = v
For we get
1 2 2 4 2 4
2 1 2 3 4
1 2 3 4 2 4
# #0
# #
#( # # ) #( # #0)
A f Q f Q x x x x
B f Q f Q x x x
f x x x x x x
= v = =
= v =
=
2 4
Q x x =
28
Realization of arbitrary logical functions using majority elements, F. Miyata
IEEE transactions on electronic computers, 1963
Theorem: A logic function is representable in the form
Miyata Method
1 0
1 11 10
0 01 00
( , ) 1# ( ) # ( )
( ) # #
( ) # #
f x Y xf Y xf Y
xf Y x yf yf
xf Y x yf yf
=
=
=
Similarly,
0 1
0 00 01
1 10 11
( , ) 0#( ( )) #( ( ))
( ) #( ) #( )
( ) #( ) #( )
i
f x Y x f Y x f Y
x f Y x y f y f
x f Y x y f y f
= + +
+ = + +
+ = + +
29
( )
1 2 3
, , ,....,
n
f x x x x
i
x
j
x
j
x
k
x
k
x
k
x
k
x
(
)
1
,
1
,
1
i
j
k
f
x
x
x
=
=
=
(
)
1
,
0
,
0
i
j
k
f
x
x
x
=
=
=
(
)
0
,
0
,
0
i
j
k
f
x
x
x
=
=
=
(
)
0
,
0
,
1
i
j
k
f
x
x
x
=
=
=
(
)
0
,
1
,
0
i
j
k
f
x
x
x
=
=
=
(
)
0
,
1
,
1
i
j
k
f
x
x
x
=
=
=
(
)
1
,
0
,
1
i
j
k
f
x
x
x
=
=
=
(
)
1
,
1
,
0
i
j
k
f
x
x
x
=
=
=
0 i
x f
1 i
x f
00 j
x f
01 j
x f
Variables reordering based expansion.
30
Majority tree - example
0 1 1 1 0 1 0 1
x
2
x
1
x
1
x
0
x
0
x
0
x
0
0
0
x
2
x
1
x
0
x
0
31
1
x
3
x
2
x
3
x
2
x
4
x
4
x
3
x
4
x
Variables reordering based expansion. Example
32
Majority tree vs. SOP
x
4
x
4
x
4
x
4
x
3
x
3
x
3
x
3
x
2
x
2
x
2
x
2
x
1 x
1
x
1
x
0
A
N
D

O
R
f(x
4
, x
3
, x
2
, x
1
, x
0
)=
( 1, 2, 5, 7, 8, 10, 11, 12,
14, 18, 19, 23, 25, 27,29).
(3 + 3) levels
(22 + 7) majority gates
33
Ordered Majority tree

x
3
x
2
x
2
x
1
x
0
x
1
x
3
x
2
x
2
x
1
x
0
x
1
x
4
x
0
x
0
x
0
x
0
x
0
x
0
z4 x0, z3 x3, z2 x1, z1 x4, z0 x2.
4 levels
20 majority gates
4 levels
13 majority gates

z
3
z
2
z
2
z
1
z
3
z
2
z
4
z
0
z
1
z
1
z
0
z
0
z
1 =1
=0
f=0

Das könnte Ihnen auch gefallen