Synthesis of Threshold-logic Networks Using Karnaughmapping

Embed Size (px)

Citation preview

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    1/10

    Synthesis of threshold-logic networks using Karnmapping techniquesS. L. H urst, PhJD., M.Sc. (Eng.), C. Eng., F .I.E.E .

    Indexing terms: Logic design, Threshold logic

    ABSTRACT

    The potential future use of threshold-logic gates as an alternative to Boolean gates depends on the abilto synthetise given Boolean problems in an economical threshold-gate form. Mapping techniques for thengineering of threshold-logic networks ar e presen ted in the paper, based on the property that all lineaable (threshold) functions are characterised by particular patterns when plotted on Karnaugh-map laycanonic cha rac teri stic -vecto r, or Chow-parameter, tabulations ar e used to derive and catalogue the mthat are allowable. The advantage of this approach is tha t a visual buildup of the synthes is is maintainabling both completely and incompletely specified networks to be handled. Threshold gat es of specific as well as universal gates, may be incorporated in the procedures.

    NOTATION

    To differentiate between Boolean and threshold expres sions ,the following notations are employed:

    Boolean exp ressio ns employ [ ] for outer brac kets , and( ) for any necessa ry inner brack ets . Within these definingbrack ets , + and . take the normal Boolean meaning of ORand AND, respectively. The latt er may be omitted where noambiguity results.

    Threshold express ions employ ( ) for outer brackets, and{ } for any necessary inner brackets. Within these definingbrackets, the normal arithmetic rules of addition and multi-plication hold.

    1 INTRODUCTION

    Linearly separable Boolean functions of n variablesf(xj_, x 2 , . . . , x n) are those functions which may be realisedby one single threshold-logic gate, such a gate obeying theinput/output relationship

    nGate output y = 1 iff a ^ t x

    = 0 iff a i x i

    where x i = the independent binary gate-input variables,of value 0 or 1

    a^ = real-number 'weight' associated with eachindependent Xj

    tx = real-number upper gate thresholdt 2 = real-number lower gate threshold, t 2 < t x .

    It has been shown 1* 2 that all linearly separable functions ofn < 7 may be realised by integer values for the weights andthresholds. In this paper are employed the minimum integervalues for the a^, and minimum integer thresholds with a gaplength of unity, 3 i.e. t x t 2 = 1*0, without loss of generality.

    Th bl f h h ld h i f i B l

    suitable design values for gate weigrea lis e such functions. In these areteristic weight-threshold vector tabumeters as they are alternatively tersupreme in quickly showing whetherlinearly separable, and in giving thedesign values for a single-gate r ealadvantage with such lookup tables isavailable for n > 7, but seven indep

    more than adequate for the vast mapurposes.

    Where linear separability does not hsation is sought, the Chow-parametedirectly provide enough guide into hobest be decomposed into linearly setain semiheuristic approaches may

    (a) If any var iable Xj is present in ted form, the decomposition

    x i f 1 (x 1 ,x 2 , .

    may be tried, to see if each of the relinearly separable.(b) If the evaluated Chow pa rame tetabulations except for one term b j, adecomposed about this particular

    The published information on the syseparable Boolean functionsSuch papers as are available are geor algorithmic nature, and do not yeally acceptable practical way of resotion may best be realised.

    The usefulness of the Karnaugh-mapextensively pursued for threshold sbeen shown that l.s. functions are cdefinite patterns on Karnaugh-map corresponding to the Chow charac

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    2/10

    square s, or vice ve rsa, in each pattern. The value ofDM maybe obtained directly from the Chow parameters by the rela-tionship

    DM = p/q

    where p = V2 {|bo| + 2n}

    This par ame ter will be used as a key identification para -meter in later Sections.

    Exactly which map patterns tabulated standard l.s. functiosplits between the two 4-var

    Therefore for economic reascatalogue here in detail all tmap patterns for n = 5, correin Tables 6 and 7. Instead, wmaps arises, the appropriatefunctions involved may be drindividual n = 4 patterns of

    o r

    o r

    Fig . lKarnaugh-ma p patterns for linearly separable functions f(xlt x2, x3)

    Figure part

    Table 1 patternPattern

    density

    1

    4/4

    28/0or0/8

    35/3or3/5

    47/1or1/7

    5

    4/4

    66/2or2/6

    \

    0

    1

    X 2

    00 0 1 1 1 1 0

    key

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    3/10

    limitation may be regrettable from the point of view of pre-senting a working design philosophyfor any n, neverthelessit is hoped that little practical engineering significanceislost by this restriction.

    various l.s. functions, the b(a) The given Boolean funnaugh-map layout in the nor

    >Malue DM is noted.

    \

    1

    ^

    V

    _ J

    ^

    ss^s

    ii

    lillliili^

    ^

    \

    ^

    a

    ^^

    IiI

    v

    Ii

    n 1I11

    / m

    Fig. 2

    Karnaugh-map patternsfor linearly separable functionsf(x x, x2, x3 , x

    y in i

    |

    Figure part f g h I

    Table 3 patternPattern

    density

    1 2 3 4 516/0 9/7 15/1

    8/8 or or or 8/0/16 7/9 1/5

    6 7 8 9 10 11 12 13 10/6 14/2 9/7 11/5 13/3 12/4 10/6 12/or or or or or 8/8 or or o6/10 2/14 7/9 5/11 3/13 4/12 6/10 4/1

    x1 x 2x x \ 0 0A 3 A 4

    0 0

    0 1

    11

    01 11 1 0

    (b) This plotted pattern oncovered by any chosen stan

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    4/10

    a 45 or 'diagonal' adjacency present in the map. When sucha feature is observed, the function may immediately beclassified as nonlinearly s eparable . Similarly, if a plot withtwo or more patterns not touching at all is present, againsuch functions a re not l.s. functions. The diagonals or gapsin the plotted patterns also provide an indication of a pos-sible division of the given function into two (or more) parts,each of which may now have a threshold real isati on.

    Hence, one possible threshold-OR reali satio n of Fig. 3a isshown in Fig . 3b, the diagonal adjacency in the map providinga key to the division of the function into two l.s . pa rt s. Pa rtA has a pattern density D M of 4/12; it may therefore be eit herpattern 12 or pattern 14 of Fig. 2. A quick check reveals thatit is the unshaded portion of the latter pattern, and therefore

    which plots as shown in Fig . 4a. Agconfirmed that this plot, of DMpond to either pattern 3 or pa ttern 8the function is not linearly separabl

    In looking for a threshold-AND solutpreferably two) plots, each of which given plot, ar e sought. In this part icter ms must each therefore have a mgreater than 9/7.

    As a guide to a reasonable choice ofing guidelines may be suggested:

    x3x)00

    0 1

    11

    1 0

    X 200

    /

    /

    0 1

    -

    /

    /

    11 10vx,

    x 3 x N

    00

    0 1

    11

    1 0

    X 2fcQQj

    1

    0 1

    B

    1

    11

    A

    10

    A 3 -1-x 2 .X 4 -

    x 2X 3

    * 3 -* 1 -x 2 -X 4-

    Fig. 3Threshold-OR realisations of (x + x 4) + xxx2x3 + x 2x3x4]

    has a threshold realisation of (2,1,1,1) 4 : 3 . The patternposition identifies the function as

    [x 3 (x i x

    which gives

    (2x 3 +

    2 H

    X l + x 2 + x 4

    2X4^

    > 4 : 3

    Part B has a pattern density D M of 3/13, and will be found tocorrespond to pat tern 10 of Fig. 2, giving a threshold reali sa -tion of (2, 2,1,1) 5 : 4 , the precise function identification thusbeing

    (2x 1 + 2x 2 + x 3 x 4 > 5: 4

    Fig. 3c therefore gives the 2-level threshold-OR rea lisat iondirectly from the results above

    (a) If the plot of the given Boolean nent pattern characteristic, this chalooked for in a covering map pattern

    (b) The high-value D M patternplots of Fig s. 2d and g, respectively, cover for one of the AND terms of in such high-value D M plots mtate unwanted minterms from the oin the final solution.

    One possible threshold-AND solutionis therefore as evolved in Fig. 4.

    3 .3 Example 3

    If gates of restricted capabilities ontinct from universal gates, 19

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    5/10

    The possib ility of a 2-level threshold-OR solution is fir st In viewing these cove rs, it will be noted that noneconsidered . Fig . 5a gives the possible fits of the above avail- ter ns avai lable cov ers the XjXgXgX j minterm. Heable pat terns onto the plot of the given function; patt ern s 1, concluded that it is not possib le to produce a 2-le6 and 11 do not provide any valid cont ribution. hold-OR solution for the given function using t

    threshold gates.

    3 400

    01

    11

    10

    X 200

    /

    _ /

    01

    /

    11

    p]10

    a m

    10

    (x 1 ,x 2 ,x 3 ,>

    x 2 .X3 -X4-

    Threshold-AND realisation of [x xx2 + x2x4 + x 3x4]

    ass

    y

    y

    y

    y

    y

    y 0)

    iy

    j

    4

    y

    y y

    \

    i

    /

    j

    \

    \

    1(iii) ( v )

    II\

    /

    /

    (i ) (ii) (i ) C'i)c

    (Hi)

    x 3 x0

    0

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    6/10

    If a threshold-AND solution is now considered, it will againprove to be impossible to cover exactly the eight mintermsof the given function.Hence a 3-level threshold AND/OR solution to the givenproblem must be sought in this case. Fig. 5c illustra tes onepossible solution, employing as its basis the good cover pro-vided by pattern 13 over six of the eight minterms of thegiven function. The remaining two min term s are then

    covered by a threshold-AND made up from pattern 12.The se par ate Boolean AND and OR gates of F ig. 5c may beabsorbed into threshold gates in the normal manner, givinga final solution using two of the given integrated-circuitpackages, as shown in Fig. 5d.

    4 .1

    SYNTHESIS OF THRESHOLD NETWORKS, n = 5

    Example 4

    Still continuing the synthesis of non-1.s. functions, considerthe Boolean function

    f(xx, x 2 , x 3, x 4, x5) = [x1(x2 + x4 + x5) + x2(x3 + x5)]

    Its Karnaugh-map plots are given in Fig.6, with all five pos-sible map pairs being shown for comp leteness.In comparing these patterns with the 4-variable l.s. mappatterns detailed in Fig. 2, it will be found that all map pat-terns except the x5 map are l.s. patte rns. Thus any of theXj decompositions mapped in Fig.6 except the x5 pair areavailable as a possible threshold-OR solution.Suppose the first map pair xlt x-^is chosen. Then thext maprepresents the Boolean function x1[x 2(x 3 + x5)] , the l.s. mappattern corresponding to pattern 6 of Fig.2, and the Xjinappattern represents the function x-^Xg + x4 + x5], this l.s.map pattern correspond ing to pattern 7 of Fig. 2.Two approaches are now available to translate these Booleanresults into threshold functions, the first being to formhybrid Boolean-threshold expressions for each term, thethreshold part being read off from the 4-variable map pat-

    terns and tabulations in the usual manner. This results in

    an d

    linearly separable functionleast one pair of n = 4 l.spar ticu lar exam ple above,sible.Fro m Fig. 6, it will be notix2(x 3 + x5) is also containtern. Thus it is not necessone of the OR terms of the

    function [x2(x3 + x4)] is eqHence the two functions thof this chosen xlf xx decom

    [x2(x3 + x4 )] = 3: 2] = (2x1 + 2x2 + x3 + x5>5:5/5:4

    an d

    x1[1: 0] = (3x1 + x2 + x4 x 5 )4 . 3

    x1 x2x x \ 0 0 J4 A 5

    00

    0 1

    11

    1 0

    0 1

    y

    y

    11*7

    y

    TO

    J

    y

    x

    x xS55.31

    01 11 1 0 v

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    7/10

    4 .2 Example 5In place of a threshold-OR synthesis of two l.s. maps, as inexample 4, a threshold-AND solution is equally av ailable.Consider the no n-l .s. Boolean function

    + x3x5(x 1 + x2 + x4)]

    If the five possible Xj, Xj maps pairs are plotted, it will befound that only the x3, x 3 maps are both linearly separable.These are as shown in Fig. 7a.Now a threshold-AND of these two terms may readily beformed by adding to each l.s. map the full pattern of the

    second map, as indicated in solution is now the AND of

    x 3 + [ < 2 x1 + x 2=

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    8/10

    and subsequent threshold synthesis of 5-variable non-1.s.functions may be enumerated as follows:

    (a) Plot the given function on all five pai rs of Karnaughmaps (for example, see Fig . 6).(b) If any pa ir of maps re su lts in which both map patt ern sare linearly separable, proceed as in example 4 or 5.(c) If condition (b) cannot be found, choose any pa ir in whichone of map patterns is a valid l.s.map pattern, if the choice

    of more than one such pair of maps is available, choose thepai r in which the non-1.s . map pattern i s most full or empty(DM - 16/0 or 0/16, respec tively), in case a useful cover be -tween the two maps can be found by the use of Table 5.(d) In the event of not one l.s . map pattern being ava ilablein any of the five pairs of maps, choose a pair in which onemap is most full or empty (DM - 16/0 or 0 /16) . Build up acover for the minterms in the other map by using two ormore threshold functions in the usua l manner. Check whetherany useful cover can be found by the use of Table 5 betweenthe terms used in this cover and the minterms of the first

    map. If no useful cover( s) can be found, procee d to coverindependently the minte rms in the firs t map in the usualmanner.

    7 CONCLUSIONS

    The synthetising procedures presevery largely for their successful aable pattern-re cognitionp erform anbra in. With but little practi ce, it il.s.patterns catalogued in Figs.l aany plotted Karnaugh maps,irrespethe resulting pattern,or whether t

    ted1

    pattern is present.The Chow-parameter tabulations fgeneration of the standard l.s.funche re . The compactnes s of the infoChow parameters themselves is upresentation of the functions reprme ter s is not available. Hence thetion content of the linearly separaand the standard PN-function tabulsynthesis procedures, where the gisingle threshold-gate realisability

    The Karnaugh-map pattern-densitin this paper will be found to be acorrelation between these l.s.mapdard function tabulations.

    5 INCOMPLETELY SPECIFIED FUNCTIONS

    The direct application of Chow parameters to the realisationof incompletely specified functions is not strai ghtforwa rd. If

    the completely specified minterms (0 or 1) happen to be pre-cisely rea lisa ble by one threshold gate, the evaluation of therespective Chow-parameter values will provide a single-gate realis ation in the usual manner. However, if this doesnot occur, no insight into how to include any of the 'don 't-care' minterms to produce a viable result is available fromthe Chow parameters themselves.

    With mapping techniques and the availability of the l.s.-map .patter ns, the situation becomes clea r. Furt her , the pres enceof 'don't-care' minterms in a problem normally affords agrea ter freedom to choose l.s. covering patte rns than in thefully specified cases.

    6 THRESHOLD NETWORKS, n > 5

    For n = 6, four 4-v ariable Karnaugh maps are required tofully plot any given function. Fu rth er unit inc reases in neach again double the number of maps required.

    However, as in the n = 5 ca se, where difficulty was found infinding any useful cover between two n = 4 maps owing tothe prope rty of threshold functions of tending to divide intoone map full (or empty), the othe r map having any n = 4 l .s .pattern; even more remote in n = 6 cases is the possibilityof finding any useful cover between the four n = 4 maps nowprese nt. Thus, in theory , any given non-1 .s. n = 6 functionmay be plotted on four maps, and a viable threshold rea lis a-tion ma be made b s nthetising the res lting pattern in

    8 REFERENCES

    1 MUROGA, S., TODA, I., and KOsion functions of up to six va1962,16, pp. 459-472

    2 WINDER, R.O.: 'Enumeration hold functions', IEEE Trans.,

    3 LEWIS, P. M., and COATES, C.(Wiley, 1967)

    4 CHOW, C. K.: 'On the cha rac tefunctions' in 'Switching theorAIEE special publication S.

    5 COATES, C. L., KIRCHNER, R.'A simplified procedure for separab le switching functionpp.447-458

    6 DERTOUZOS, M.L.: 'An approelement synt hesis ', IEEE Tra528

    7 WINDER, R.O .: 'P ro pe rti es oibid, 1965, EC-14, pp. 252

    8 TORNG, H. C : 'An approach flinear ly-se para ble switchingEC-15, pp. 14-20

    9 LEWIS, P.M .: 'Pra ctic al guidtronic Design, 1967, 22,

    10 WINDER, R.O .: 'Symmetry typIEEE Trans., 1968, C-17

    11 HOWE, A. B., and COATES, threshold networks', ibid.,

    12 LEVTNE, E.: 'On the characte rthreshold function' ibid 196

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    9/10

    9 APPENDIX

    Tabulation of standard positive canonic threshold functions of n 3 variables

    TABLE 1LINEARLY SEPARABLE FUNCTIONS FOR n = 3

    Chow-characteristic Weightingparameters \b\\ factors |aj|i = 0 , . . . , n i = 0, . . . , n

    L.S.Poss ible input- Corresponding gate Karnaugh-variable weights thresholds t1: t2 pattern

    8

    6

    4

    0

    2

    4

    0

    2

    4

    0

    2

    0

    1

    2

    1

    0

    1

    1

    0

    1

    1

    0

    1

    0

    10

    21

    11

    00

    11

    11

    00

    11

    10

    0 : - l2 : 11 :0

    1 :0

    1:0or

    oror

    2 : 1or

    1:0

    3 :23 :2

    2 : 1

    12

    34

    56

    TABLE 2

    BOOLEAN AND THRESHOLD REALISATIONS OF LINEARLY SEPARABLEFUNCTIONS FOR n = 3

    Karnaugh- mappatterndensity DM

    0 /8

    1/7

    2 /6

    3 /5

    4 /4

    5/ 3

    6/2

    7 /18/0

    Possible l.s.Karnaugh- mappattern

    2

    4

    6

    3

    1

    or 5

    3

    6

    4

    2

    Realisation of l.s. function(standard canonic form)

    Boolean

    [0] (trivial case)

    [ x a x b x cl

    [ x a x bl

    Lcl^b C'J[ x j

    [ x a x b + x a x c + x b x c ]

    [x a + x b x c ]

    [xa + xbl[xa + xb + xcl[1] (trivial case)

    Threshold

    i: 2 : 1

    + x b + x c ) 2 : 1h x b ) i : oh xb + x c ) 1 : 0

    - 1

    x a , x b , x c = any permutation of xx o r x1 } x 2 or x2 , x 3 or x 3

    TABLE 3

    LINEARLY SEPARABLE FUNCTIONS FOR n = 4

    Chow- chara cteristicparametersi = 0 n

    IbilWeightingfactorsi == 0

    1 a>

    iln

    ' Possible input-variable weights

    Corresponding gatethresholds t :: t 2

    L.S.Karnaughpattern

  • 8/2/2019 Synthesis of Threshold-logic Networks Using Karnaughmapping

    10/10

    T B

    A

    A

    TH

    H

    DRA

    SA

    O

    OFLN

    A

    YS

    A

    FU

    O

    FO

    n = 4

    K

    n

    m

    P

    be1s

    R

    o

    o1su

    o

    a

    dc

    com

    -

    Kn

    m

    d

    yDM

    p

    en

    B

    e

    T

    d

    (%,x

    ec= a

    p

    m

    ao

    oxox

    x2

    x2,

    c

    b

    a

    e1su

    o

    F

    4v

    a

    em

    S

    4v

    a

    em

    Map

    en

    Map

    en

    M

    ap

    en

    (T

    e6

    DM

    (T

    e3a

    Fg2

    DM

    (T

    e3a

    Fg2

    DM

    45

    11

    1

    41

    1

    5

    11

    1

    41

    1

    5

    11

    1

    51

    1

    )14

    T

    B

    5

    6

    11

    1

    51

    1

    1

    D

    MPO

    TO

    OFA

    n = 5 LSFU

    O

    NOn = 4 K

    MAP

    A