dot notation
TRANSCRIPT
-
8/11/2019 Dot Notation
1/11
A compact dot notation for designing multi operand parallel adders,
multipliers and products adders
Luigi DaddaPolitecnico di Milano, Italy
ALaRI, University of Italian Switzerland at Lugano
Abstract -After having recalled the introduction of the "dot-notation" for an easy study of
parallel binary adders and multipliers, a modified compact dot-notation is given, obtaining an
easier application to arithmetic problems involving large numbers and many operands. This
new notation, and some of its possible variations, is shown for the design of multi-operand
parallel adders, multipliers and of adders of products. It is shown that a spreadsheet can be
programmed as a design tool for obtaining dot schemes of comple arithmetic systems. This
spreadsheet program gives also the total number of full and half adders and the number of
stages of the compression process. The spreadsheet tools can be downloaded from the !eb.Keywords parallel adders, parallel multipliers, dot notation, arithmetic arrays, spreadsheet as
design tool in arithmetic.
Introduction
In [2,5 we !ave introduced a notation for re"resenting an array of #inary nu$#ers for
allowing an easy way in t!e design of "arallel adders and $ulti"liers% &ig% 'A re"resents a
si$"le e(a$"le for adders% In t!e notation a dot re"resents an uns"ecified #inary digit, i%e% a #it%
)!e colu$n i #$%& i % n' in w!ic! it is "laced is c!aracterized #y a weig!t 2isince eac! row of
an array in intended to re"resent a #inary integer *fractional or $i(ed integer+fractional nu$#ers
can also #e treated%
13 131313
4 4 4 4
2
333
22
2
13131313
B
A
1
2
3
3
4
44
5
5
6
6
2
2
'
-
8/11/2019 Dot Notation
2/11
Fig.1: A:a parallel Adder of 13, 4 bits numbers, using the standard dot notation.
: the same Adder, using the compact dot notation
)!e "arallel $ulti+o"erands #inary addition leads naturally to t!e conce"t of -"arallel
counters- if t!e addition algorit!$ in conceived in t!e way in w!ic! it is taug!t in "ri$ary
sc!ools, i%e% adding t!e digits of t!e left$ost colu$n and writing t!e least significant digit in t!esa$e colu$n, t!e ot!ers digits #eing written in t!e ad.acent colu$ns as carries, according to
t!eir weig!ts%
It is "ossi#le to ado"t t!e algorit!$ #ased on t!e addition of rows, i%e% of t!e single nu$#ers
to #e added% )!is is o#viously $ore tiring in !and addition% In "arallel addition it leads to a
#inary tree of carry save adders for rows, as "ro"osed #y /allace in ['
)!e e("erience !as s!own t!at t!e easiest and faster counters are t!e full adders or &A0s *i%e%
t!e -1,2- "arallel counters, due also to t!e fact t!at t!ey !ave #een well o"ti$ized, #ot! in
s"eed and area, in t!e design tools in co$$on use today% Parallel counters wit! a !ig!er nu$#er
of in"uts *e%g% *,1 "arallel counters, or co$"osite counters, called also co$"ressors, wit!
in"uts fro$ two or $ore colu$ns are usually co$"le( and relatively slow [5,%
)!e re"resentation of a &A in a dot array can #e as si$"le as a seg$ent .oining t!e twoout"ut dots% )!e t!ree in"uts in t!e u""er in"ut level don3t need to #e e("licitly $ar4ed it is
i$"licitly assu$ed t!at t!ey #elong to t!e sa$e colu$n of t!e Su$ out"ut% It is i$"ortant to
stress t!at t!e dot sc!e$e is not a wiring diagra$, #ut an inter$ediate ste" in t!e design
"rocess, at a relatively !ig! level of a#straction% 6ote t!at t!e e7uations or t!e trut! ta#les of t!e
&A are never used in t!is level%
The compact dot notation
)!e co$"act dot notation will #e e("lained using as wor4ing e(a$"les &ig%' and t!e &ig%2
sc!e$es% &ig%'A is drawn according to t!e traditional $et!od% &ig%'8 is o#tained using t!e new
co$"act notation% 8ot! figures re"resent t!e addition of '1 #inary nu$#ers of 9 digits eac!% )!e
initial array of '1:9 dots is not s!own for s"ace reason; instead t!e nu$#er of digits *'1 in eac!colu$n is s!own%
In &ig%'8 we start e%g% fro$ t!e rig!t$ost 2arry colu$ns t!ere will
#e *see t!e traditional sc!e$e a corres"onding nu$#er of dots%
>onsider now t!e ne(t $a""ing *o#taining t!e second array% In t!e first colu$n of t!e first
array we found 5 dots t!ree of t!e$ will enter a &A, t!e fourt! and t!e fift! will not #e
"rocessed, #ut si$"ly transferred in t!e sa$e first colu$n in t!e second array, re"resented #y a
dot wit! a 2 close to it%In t!e second colu$n of first array we find ? dots t!ey will enter t!ree &A0s re"resented #y a
single &A wit! a 1 close to it% )!e sa$e is done for colu$n 1 and 9%
In colu$n 5 we find 9 dots t!ree of t!e$ will enter a full adder, t!e fourt! will #e re"resented
#y a dot in t!e 1rdrow of colu$n 5%
)!e a#ove #asic rules i$"le$ent t!e co$"act array transfor$s%
It can #e seen in &ig%'8 t!at eac! stage is re"resented wit! only t!ree dot rows, t!e first two
#eing co$"osed #y a linear array of $ulti"le &A or @A, w!ile t!e t!ird row is co$"osed #y
single or dou#le dots%
)!e two e7uivalent sc!e$es of &ig%' o#tain t!e final 2+rows redundant su$ wit! twodots for
eac! colu$n%
Additional rules can #e added in order to o#tain s"ecific results, ta4ing for instance into
account t!e c!oice in using @A we can decide to "rocess a cou"le of dots in a colu$n
2
-
8/11/2019 Dot Notation
3/11
-
8/11/2019 Dot Notation
4/11
for a @A, w!ere only one of t!e two out"uts can #e G'=% )!e dots used as in"uts to &A3s are
reduced in t!e following stage #y t!e factor 2H1% 6ote t!at t!e in case of a non+zero re$ainder
even in a single colu$n, t!e corres"onding dots reduction factor will #e s$aller t!en 2H1%
)!e strategy descri#ed #efore for o#taining a final result of t!e reduction "rocess wit!
so$e least significant #its fully co$"uted !as #een used, o#taining of t!e 29 "roduct3s #its
already 4nown #efore entering t!e final "arallel adder *w!ic! will #e used for t!e re$aining '#its% It can #e verified t!at t!e first stage can "roduce two Gfinal= '3s using a @A in colu$n 2'%
It can also #e verified, see &ig%2A, t!at in eac! of t!e successive stages it is "ossi#le to Gi$"ose=
a final @A% As s!own in t!e figure, in t!e '
-
8/11/2019 Dot Notation
5/11
It is i$"ortant to underline t!at dot sc!e$es are a first !ig! level a#straction of t!e syste$s
to #e designed, re7uiring, as a ne(t ste", t!eir translation into J@L *or ot!er si$ilar
languages "rogra$s%
/e are going to descri#e #riefly t!e structure of so$e s"reads!eet "rogra$s%
All t!e s"reads!eet "rogra$s t!at we develo"ed will #e seen in t!e following t!roug!
s"ecific !y"erlin4s%
%he design of (ulti-)perand parallel Adders
It is t!e first s"reads!eet "rogra$ Multi F"era#d Parallel Adders% It is a syste$ o#taining
t!e su$ of(of n% #it lengt!,(and n#eing given #y t!e user%
/e can note in suc! s"reads!eet *i$"le$ented wit! Microsoft K(cel t!e following "oints
+ Row ' contains a se7uence of integers increasing fro$ ' in AM' to n, t!e integer "laced
in cell AM2 to e("ress t!e lengt! in #its of t!e addends% 6ulls are in all cells at t!e left of
t!e last nu$#er in row '%
+ In A6' we can "lace t!e addend3s nu$#er(, t!at $ust #e s$aller t!an t!e nu$#er in
AF'% In suc! a case a KS a""ears in t!e alertcell A2%+ )!e value of(a""ears in ncells starting fro$ AM1 t!ey re"resent t!e(rows array, to
#e co$"ressed in t!e e7uivalent 2+rows to #e added in a carry "ro"agating "arallel adder%
+ )!e co$"ression "rocess is carried out #y a se7uence of stages, eac! re"resented #y a
grou" of 9 rows%
)!e first stage is co$"osed #y rows 9 to , wit! t!e following roles
+ Row 9 cells contain co$$ands of t!e ty"e GBRFU6F/6*N1H1,
-
8/11/2019 Dot Notation
6/11
is not an acce"ta#le solution, due #ot! to a nu$#er of co$"onents not "roviding any useful tas4 and
to t!e delay caused #y t!e not useful stages%
)!e "ro#le$ can #e solved #y c!oosing t!e out"ut line of t!e first stage t!at generates an
out"ut row co$"osed #y 13s, 23s or'3s, re"resenting an array of t!ree rows only%
)!e c!osen stage out"ut is auto$atically transferred in t!e first row of t!e &I6AL stage, at
t!e #otto$ of t!e s"reads!eet, w!ose out"ut row is co$"osed #y 23s, '3s or
-
8/11/2019 Dot Notation
7/11
In row 5 we !ave t!e se7uence ',2,%n+',n,n+',%2,',
-
8/11/2019 Dot Notation
8/11
)!e "rocessing done #y t!e co$"ression stages reduces t!e $a(i$u$ nu$#er of t!e successive
arrays, until t!e MAE value 1 is reac!ed% )!e stage "roducing suc! result is identified #y t!e value
)RUK in colu$n 86%
)!e final stage o#tains t!e result%
)!esecondS"reads!eet!andles asy$$etric "roducts% )!e in"ut "ara$eters are n, mandp t!e
first two for defining t!e "roducts, t!e t!ird t!eir nu$#er%
A more compact version
)!e s"reads!eets "resented "reviously are Gi$ages= of t!e gra"!ical sc!e$es i$"le$enting
t!e co$"act version of dots sc!e$es, see e%g% &ig% 1% Kac! stage of t!e sc!e$es is t!en re"resented
*if so$e restrictions are acce"ted #y four rows t!e first two for re"resenting t!e Su$ and t!e >arry
out"uts of an array of full adders, t!e t!ird t!e re$ainder of t!e division #y 1 of t!e "receding stage,
t!e fourt! t!e out"uts of t!e array% )!e second row in eac! stage is clearly redundant, t!e e7uations
of eac! cells of it #eing of t!e ty"e 85B>9 t!e second row is o#tained fro$ t!e first co"ying it
wit! a dis"lace$ent of one colu$n to t!e left%
It is easy to !ide t!e second row, #y t!e co$$and -!ide-, wit!out erasing it
If we wis! to o$it entirely t!e second row we can do it "rovided t!at in t!e Su$s row were"lace t!e original e7uations, of t!e ty"e )BSUM*) )9, or )B)9Q)5Q), wit! t!e
e7uation )5B)9Q)1QU1%
/e could in "rinci"le o$it also t!e Su$ row, reducing to two rows eac! co$"ression stage, #ut,
#esides t!e difficulties to o#tain it, we t!in4 t!at for a designer it is desira#le to $onitor t!e
co$"ression "rocess #y loo4ing to t!e Su$s rows%
General comments and future work
)!e sc!e$es c!osen, "articularly for $ulti"liers, !ave #een suggested #ot! #y t!e "revious
e("erience and #y t!e ado"ted design $et!odology #ased on t!e co$"act dot notation% A general
c!aracteristic of t!e sc!e$es is very easy to verify t!e #ul4 of t!e needed full adders is
concentrated in t!e first co$"ression stages, t!e last ones re7uiring few full adders%
A 7uestion arises is a $ore evenly distri#ution of t!e full adders desira#le *e%g% for t!e
co$"le(ity of t!e necessary connections )!e answer to t!is 7uestion cannot #e derived fro$ t!e
dot sc!e$es, #ut rat!er fro$ t!e i$"le$entation sc!e$es o#tained via languages as J@L and t!e
final tools for o#taining t!e $as4s% )!e latter are #eyond our reac!%
It is in any case i$"ortant to solve t!e "ro#le$ of converting t!e dot sc!e$es into languages
suc! as J@L%
/e note also t!at t!e literature offers a large variety of co$"ression strategies and related
algorit!$s% It $ust #e noted t!at t!eir i$"le$entation wit! dot sc!e$es can #e, in "rinci"le, $ore
or less difficult%
)!e furt!er develo"$ent of t!e wor4 e("osed in t!is "a"er can #e seen along t!ree "arallellines
a+ Identification of co$"uter intensive "ro#le$s for w!ic! new solutions could #e
"ro"osed% In signal "rocessing we will consider o"erations li4e convolution%
#+ I$"le$entation of an interface #etween s"reads!eet and J@L or si$ilar languages
in order to dis"ose of a new efficient design tools%
c+ I$"roving t!e reada#ility of t!e s"reads!eets sc!e$es
References
[' /allace, >%S%A suggestion for a fast multiplier, IKKK )rans% n Klectronic >o$"uters, ""% '9+', &e#r%, '?9
[2 adda, L, ome schemes for parallel multipliers, Alta &re7uenza, vol% '?, ""% 19?+15, Marc!,
D
-
8/11/2019 Dot Notation
9/11
'?5
[1 @a#i#i, A%, /intz, P%A%,/ast )ultipliers, IKKK )rans on >o$"uters, &e#r% '?o,
Roc!elle Par4, 6%N%, '?
[5 adda, L% 2n parallel multipliers% Alta &re7uenza, vol% 95 ""% 59+5Do$"uters, Jol% >+2?, $%5, May '?D