Ling Multiplier

Embed Size (px)

Citation preview

  • 8/3/2019 Ling Multiplier

    1/4

    I E E E TRANSACTIONS O N COMPUTERS, V O L . C - 1 9 , N O . 8 , AUGUST 1 9 7 0t i e n t . I f m b i t s a r e u s e d f r o m t h e r e c i p r o c a l t h e t a b l e r e -q u i r e s 2 m e n t r i e s a n d e s t a b l i s h e s m b i t s o f q u o t i e n t .S i n c e t h e t a b l e d o u b l e s i n s i z e f o r e a c h a d d i t i o n a l b i t o fa c c u r a c y r e q u i r e d i n t h e i n i t i a l q u o t i e n t g u e s s , s m a l l c h a n g e si n t h e c o n v e r g e n c e r a t e p e r i t e r a t i o n may r e f l e c t s u b s t a n t i a lc h a n g e s i n t h e s i z e o f t h e s t a r t i n g t a b l e . N o t i c e i n a l m o s t a l ls c h e m e s t h e e r r o r i s b i a s e d , h e n c e i t ( o r p a r t o f i t ) c a n b es u b t r a c t e d f r o m t h e q u o t i e n t , s l i g h t l y r e d u c i n g t h e a v e r a g ee r r o r . R e f e r r i n g b a c k t o F i g . 1 , s i n c e w e a r e a p p r o a c h i n gt h e r o o t f r o m t h e l e f t s i d e u n i f o r m l y , w e may p r e d i c t a h e a dp a r t o f t h e d i s t a n c e f o r t h e n e x t i t e r a t i o n . W h i l e t h i s i s a t -t r a c t i v e , t h e e r r o r b i a s may s e r v e a u s e f u l f u n c t i o n w h e nl e f t i n t h e i t e r a n t . I n c e r t a i n c a s e s i t w i l l s e r v e t o p r o t e c t t h ei n t e g r i t y o f i n t e g e r s ( i . e . , i n t e g e r q u o t i e n t s w i l l b e p r e s e r v e di n t h e i r u s u a l r e p r e s e n t a t i o n ) .

    C O N C L U S I O NT h e p r o b l e m o f f i n d i n g c o m p l e x i t y o r e f f i c i e n c y b o u n d sf o r d i v i s i o n i s much m o r e d i f f i c u l t t h a n f o r a d d o r m u l t i p l y

    b e c a u s e o f t h e m u l t i p l i c i t y o f a p p r o a c h e s . T h e b e s t knownt e c h n i q u e s r e q u i r e t w o b a s i c a r i t h m e t i c o p e r a t i o n s ( a d d o rm u l t i p l y ) t o d o u b l e t h e p r e c i s i o n o f t h e q u o t i e n t . E v e n r e l a -t i v e l y s m a l l i m p r o v e m e n t s i n t h e c o n v e r g e n c e r a t e o f as c h e m e c a n r e s u l t i n c o n s i d e r a b l e h a r d w a r e s a v i n g s i n t h ea r e a o f a s t a r t i n g t a b l e . T h e d e v e l o p m e n t o f t h e s e t e c h n i q u e sr e m a i n s a n o p e n p r o b l e m a s d o e s t h e a p p l i c a t i o n o f n o n -N e w t o n i a n h i g h e r o r d e r i t e r a t i o n s .

    R E F E R E N C E S[ 1 ] C . S . W a l l a c e , "A s u g g e s t i o n f o r a f a s t m u l t i p l i e r , " IEEE T r a n s .E l e c t r o n i c C o m p u t e r s , v o l . E C - 1 3 , p p . 1 4 - 1 7 , F e b r u a r y 1 9 6 4 .[ 2 ] S . F . A n d e r s o n , J . G . E a r l e , R . E t . G o l d s c h m i d t , a n d D . M. P o w e r s ,"IBM S y s t e m / 3 6 0 M o d e l 9 1 : f l o a t i n g - p o i n t e x e c u t i o n u n i t , " I BM J .R e s . D e v e l o p . , v o l . 1 1 , p p . 3 4 - 5 3 , J a n u a r y 1 9 6 7 .[ 3 ] R . E . G o l d s c h m i d t , " A p p l i c a t i o n s o f d i v i s i o n b y c o n v e r g e n c e , "M . S . t h e s i s , D e p t . o f E l e c t r i c a l E n g i n e e r i n g , M a s s a c h u s e t t s I n s t i -t u t e o f T e c h n o l o g y , C a m b r i d g e , M a s s . , J u n e 1 9 6 4 .[ 4 ] M . J . F l y n n , " V e r y h i g h - s p e e d c o m p u t i n g s y s t e m s , " P r o c . I E E E , v o l .5 4 , p p . 1 9 0 1 - 1 9 0 9 , D e c e m b e r 1 9 6 6 .[ 5 ] H . H . L a u g h l i n , " L a r g e - n u m b e r d i v i s i o n b y c a l c u l a t i n g m a c h i n e , "Am. M a t h . M o n t h l y , v o l . 3 7 , p p . 2 8 7 - 2 9 3 , 1 9 3 0 .[ 6 ] D . E . K n u t h , " S e m i n u m e r i c a l a l g o r i t h m s , " i n T h e A r t o f C o m p u t e rP r o g r a m m i n g , v o l . 2 . R e a d i n g , M a s s . : A d d i s o n - W e s l e y , 1 9 6 9 ,p . 2 1 5 .[ 7 ] M . L e h m a n , D . S e n z i g , a n d J . L e e , " S e r i a l a r i t h m e t i c t e c h n i q u e s , "1 9 6 5 F a l l J o i n t C o m p u t e r C o n f . , AFIPS P r o c . , v o l . 2 7 . W a s h i n g t o n ,D . C . : S p a r t a n , 1 9 6 5 , p p . 7 1 5 - 7 2 5 .[ 8 ] E . V . K r i s h n a m u r t h y , "O n o p t i m a l i t e r a t i v e s c h e m e s f o r h i g h - s p e e dd i v i s i o n , " IEEE T r a n s . C o m p u t e r s , v o l . C - 1 9 , p . 2 2 7 - 2 3 1 , M a r c h1 9 7 0 .[ 9 ] J . F . T r a u b , I t e r a t i v e M e t h o d s f o r t h e S o l u t i o n o f E q u a t i o n s . E n g l e -wood C l i f f s , N . J . : P r e n t i c e - H a l l , 1 9 6 4 .[ 1 0 ] R . K . R i c h a r d s , A r i t h m e t i c O p e r a t i o n s i n D i g i t a l C o m p u t e r s . NewY o r k : V a n N o s t r a n d R h e i n h o l d , 1 9 5 5 .[ 1 1 ] M . V . W i l k e s , D . J . W h e e l e r , a n d S . G i l l , T h e P r e p a r a t i o n o f P r o -g r a m s f o r a n E l e c t r o n i c D i g i t a l C o m p u t e r . C a m b r i d g e , M a s s . :A d d i s o n - W e s l e y , 1 9 5 1 .[ 1 2 ] R . J . F i e g , " A n a l y s i s o f a c o m p u t e r d i v i d e a l g o r i t h m , " u n p u b l i s h e dc o m m u n i c a t i o n .[ 1 3 ] P . R a b i n o w i t z , " M u l t i p l e p r e c i s i o n d i v i s i o n , " C o m m u n . ACM, v o l . 4 ,p . 9 8 , F e b r u a r y 1 9 6 1 .[ 1 4 ] K . K u n z , N u m e r i c a l A n a l y s i s . New Y o r k : M c G r a w - H i l l , 1 9 5 7 .[ 1 5 ] D . F e r r a r i , "A d i v i s i o n m e t h o d u s i n g a p a r a l l e l m u l t i p l i e r , " IEEET r a n s . E l e c t r o n i c C o m p u t e r s , v o l . E C - 1 6 , p p . 2 2 4 - 2 2 6 , A p r i l 1 9 6 7 .

    High-Speed Computer Multiplication Usinga Multiple-Bit Decoding Algorithm

    H. LING, M E MBER, I E E E

    Abstract-This p a p e r p r e s e n t s a method o f p e r f o r m i n g t h e b i n a r ym u l t i p l i c a t i o n beyond t h e scheme o f m u l t i p l e ADD and S H I F T . Theb i n a r y m u l t i p l i c a t i o n a l g o r i t h m w i l l b e d i s c u s s e d f i r s t , f o l l o w e d b yb l o c k d e c o d i n g m e t h o d , l o g i c i m p l e m e n t a t i o n , hardware c o n s i d e r a -t i o n , an d tw o e x a m p l e s w h i c h a r e a t t h e en d o f t h e d i s c u s s i o n .I n d e x Terms-Block decoding t e c h n i q u e , f a s t m u l t i p l i c a t i o n ,h i g h - s p e e d computer l o g i c , h i g h - s p e e d m u l t i p l i c a t i o n , p a r a l l e l m u l t i -p l i c a t i o n .

    M a n u s c r i p t r e c e i v e d M a y 2 0 , 1 9 6 9 ; r e v i s e d D e c e m b e r 1 2 , 1 9 6 9 , a n dF e b r u a r y 2 2 , 1 9 7 0 .T h e a u t h o r i s w i t h t h e I n f o r m a t i o n S c i e n c e s D e p a r t m e n t , I BM R e -s e a r c h L a b o r a t o r y , S a n J o s e , C a l i f .

    I N T R O D U C T I O NO N E p r o b l e m w h i c h t h e c o m p u t e r f i e l d h a s b e e n c o n -c e r n e d w i t h f o r many y e a r s i s how t o i m p r o v e t h ep r o c e s s o f b i n a r y m u l t i p l i c a t i o n b e y o n d t h e t e c h -n i q u e o f r e p e t i t i v e ADD a n d S H I F T .Some m e t h o d s h a v e b e e n p r o p o s e d , a l l o f w h i c h h a v esome d i s a d v a n t a g e s . I t w a s p o i n t e d o u t b y Lamdan a n dA s p i n a l l [ 1 ] , f o r e x a m p l e , t h a t t h e r e a l i z a t i o n o f s i m u l t a n e -o u s m u l t i p l i e r s n e c e s s i t a t e s a l a r g e n u m b e r o f c o m p o n e n t s .R e c e n t l y , c a r r y s a v e a d d e r s h a v e g e n e r a l l y b e e n u s e d t o i n -c r e a s e t h e s p e e d o f m u l t i p l i c a t i o n . H o w e v e r , d u e t o t h e r e -

    7 0 6

  • 8/3/2019 Ling Multiplier

    2/4

    LING: HIGH-SPEED COMPUTER MULTIPLICATIONq u i r e m e n t o f a l a r g e a m o u n t o f h a r d w a r e s u p p o r t [ 2 ] , i t i sa p p l i c a b l e o n l y t o a l a r g e r m a c h i n e s u c h a s t h e 3 6 0 / 9 1 .T h e a u t h o r [ 3 ] p r o p o s e d a d e c o m p o s i t i o n s c h e m e t o p e r -f o r m m u l t i p l i c a t i o n i n 1 9 6 6 . T h i s p a p e r p r e s e n t s t h e d e t a i l e db i n a r y m u l t i p l i c a t i o n a l g o r i t h m b a s e d u p o n a m u l t i p l e - b i td e c o d i n g t e c h n i q u e . T h e sum ( I ) a n d d i f f e r e n c e ( J ) o f t h ef a c t o r s a r e a s s u m e d t o h a v e b e e n c o m p u t e d i n a d v a n c e . Ac o m b i n a t i o n a l l o g i c m o d u l e S i s d e f i n e d w h i c h h a s t h et r a n s f e r f u n c t i o n x 2S ( x ) x - 2 'i f t h e s e t o f n i n p u t s i s i n t e r p r e t e d a s a b i n a r y f r a c t i o n x . I f ni s l a r g e e n o u g h t o a c c o m m o d a t e t h e e n t i r e l e n g t h o fI ( o r J ) , t h e p r o d u c t i s o b t a i n e d i n t h r e e a d d i t i o n s , a sd e m o n s t r a t e d b y ( 2 0 ) . I f t h e n u m b e r o f b i t s e x c e e d s n , t h e nc o p i e s o f S may b e a p p l i e d t o s e g m e n t s o f I a n d J i n p a r a l l e la n d t h e r e s u l t s summed t o f o r m t h e c o m p l e t e p r o d u c t . I np a r t i c u l a r , i f t h e t o t a l l e n g t h o f t h e p r o d u c t i s n 2 k b i t s ,t h e n a t o t a l o f 1 + 2 k a d d i t i o n s a r e r e q u i r e d .

    THEORYL e t A a n d B b e t w o f r a c t i o n s w h o s e p r o d u c t i s b e i n gs o u g h t ( w e n o t e t h a t w i t h p r o p e r s c a l i n g A , B c a n b e i n t e g e r so r e v e n g e n e r a l f l o a t i n g - p o i n t n u m b e r s ) .

    Lemma 1 : F o r 6 = 0 o r 1 , f ( 5 ) =3 .Lemma 2 : f ( x + y ) = f ( x ) + f ( y ) + x y .Lemma 3 : f ( n y ) = n 2 f ( y ) - yf ( n - 1 ) .From ( 4 ) f ( y ) c an b e r e w r i t t e n a s

    f ( y ) = ( l / 4 ) y + ( 1 / 4 ) f ( 2 y ) .

    ( 2 )( 3 )( 4 )( 5 )

    T a k i n g a b i n a r y f r a c t i o nk

    X= E X n 2 nn = 1w h e r e x n = 0 o r 1 , a p p l y i n g ( 2 ) , ( 3 ) , a n d ( 5 ) s y s t e m a t i c a l l y , weh a v e

    f ( x ) = ( O . x l X 2 X 3 .. . X n )n n - k + 1Z ( 1 / 4 k ) ( I + 2 X k ) Z x + k -1 2 'k = 1w h e r e I > x . ( 1 / 2 ) , x , = 1 .

    E q u a t i o n ( 6 ) c a n b e r e w r i t t e n a s f o l l o w s :f ( x ) =D ( x ) + 2 L ( x )

    = 3 D ( x ) - 2 0 ( x ) .w h e r e '

    D ( x ) = ( 1 / 2 ) x - B ( x )L ( x ) = 0 . 0 0 ( x l x l ) ( x l x 2 ) ( x l x 3 ) ( x l x 4 ) . . . ( X l X )

    + 0 . 0 0 0 0 ( X 2 X 2 ) ( X 2 X 3 ) ( X 2 X n )+ 0 . 0 0 0 0 ... ( X n X n ) .

    O ( X ) = 0 . 0 0 ( X ' l X l ) ( X ' l X 2 ) ( X ' 1 X 3 ) ( X ' 1 X 4 ) . . . ( X l X n )+ 0 . 0 0 0 0 ( X ' 2 X 2 ) ( X ' 2 X 3 ) ( X ' 2 X n )+ 0 . 0 0 0 0 +

    B ( x ) = 0 . 0 O X l 0 X 2 0 X 3 0 X 4 * * 1 X , xI f b o t h I a n d J are b i n a r y i n t e g e r s ,

    ( 6 )

    ( 7 )( 8 )

    ( 9 )( 1 0 )

    ( 1 1 )

    ( 1 2 )

    AB=[ f ( I ) f ( J ) -( I -J ) / 2 ] ( 1 )w i t h I =(A+ B ) / 2

    J =(A-B)/2f ( x ) =( 1 / 2 ) x ( x + 1 ) .I t s h o u l d b e n o t e d t h a t t h e t i m e r e q u i r e d t o square an u m b e r w i l l b e e q u a l t o h a l f o f t h a t r e q u i r e d i n t h e g e n e r a lm u l t i p l i c a t i o n case d u e t o J =0 . T h e purpose o f t h i s s e c t i o ni s t o d e c o m p o s e f ( I ) , f ( J ) i n t o e f f i c i e n t l y m a n a g e a b l e f o r m .The f o l l o w i n g l e m m a s are p r e s e n t e d :

    I =2 n ( i i 2 i 3 ' * * i n ) = 2 iJ =2 ' ( 0 j I 1 j 2 j 3 * . . )=2 " j ,

    t h e p r o d u c t A B c a n b e r e w r i t t e n asAB=2 { f [ 2 n i ]-f [ 2 m j ] -( I-J ) / 2 } .

    ( 1 3 )( 1 4 )

    ( 1 5 )B y s u b s t i t u t i n g ( 4 ) i n t o ( 1 5 ) , t h e p r o d u c t AB b e c o m e s

    ' P a r e n t h e s i z e d t e r m s r e p r e s e n t b i t s e x p r e s s e d as l o g i c a l AND f u n c t i o n s ,w i t h x' r e p r e s e n t i n g l o g i c a l c o m p l e m e n t o f x.

    T h e n

    7 0 7

    ( x n ' \ )

  • 8/3/2019 Ling Multiplier

    3/4

    IEEE T R A N S A C T I O N S ON COMPUTERS, AUGUST 1 9 7 0AB =2 j 2 2 , f ( i ) - ( 2 - 2 ) - 2 2 m f ( j )

    22 2 }

    o r s i m p l yA B = 2 { 2 2 n f ( i ) - 2 2 m f ( j ) - 2 n ( - ) + 2 m ( 4 ) }

    B y s u b s t i t u t i n g ( 8 ) i n t o ( 1 7 ) , t h e p r o d u c t AB b e c o m e sA B = 2 { 2 2 n [ 3 D ( i ) - 2 0 ( i ) ] - 2 2 m [ 3 D ( j ) - 2 0 ( j ) ]

    2 n 2 m

    U s i n g ( 9 ) a n d r e g r o u p i n g A B , w e f i n a l l y o b t a i nA B = 2 { 2 n I - 2 m J -2 2 n [ 3 B ( i ) + 2 0 ( i ) ]+ 2 2 m [ 3 B ( j ) + 2 0 ( j ) ] } .L e t S ( x ) = 3 B ( x ) + 2 0 ( x ) ; ( 1 9 ) c a n b e r e w r i t t e n a s

    ( 1 6 )

    ( 1 7 )

    ( 1 8 )

    ( 1 9 )

    AB = 2 { 2 I - 2 m J - 2 2 n [ S ( i ) ] + 2 2 m [ S ( j ) ] } . ( 2 0 )I f b o t h A a n d B a r e n d i g i t n u m b e r s , i t i s o b v i o u s t h a t S ( i )w i l l b e 2 n d i g i t s i n l e n g t h . The number o f terms c o l l e c t e df r o m S ( i ) a n d S ( j ) w i l l a f f e c t t h e accuracy o f t h e m u l t i p l i c a -t i o n , a n d how t o c o l l e c t a l l t h e terms f r o m S ( i ) a n d S ( j ) w i l ld e p e n d o n t h e c h o i c e o f m u l t i p l e - b i t d e c o d i n g r u l e s .

    L O G I C I M P L E M E N T A T I O NA s d i s c u s s e d a b o v e , n i s an a r b i t r a r y i n t e g e r . I n o r d e r t oc o n s i d e r t h e m u l t i p l e - b i t d e c o d i n g t e c h n i q u e , n h a s t o b e ar e a s o na b l e n u m b e r . L e t n=8 ( t h e reason w i l l b e d i s c u s s e di n a l a t e r s e c t i o n ) . The s t a t e t a b l e o f S i s g e n e r a t e d b ye v a l u a t i n g S ( x ) = x -x 2 / 2 f o r a l l 1 2 8 8 - b i t p o s i t i v e n o r m a l -i z e d b i n a r y f r a c t i o n s . I f i n p u t s are 0 1 i i 2 j 3 . . . i 8 and o u t -p u t s a r e 0 OSOS1S2 S 1 5 , t h e l o g i c a l r e l a t i o n s may b er e a d i l y d e t e r m i n e d . For e x a m p l e ,s o = i l , S 1 = i ,S2= i i 2 i 3 + i l i 2 i 4 i 5 i f i f + i l i l i 4 i 5 f i f i

    + i l i ' 2 i 4 i ' 5 i 6 i ' 7 + i l i ' 2 4 i ' 5 i ' 6 i 8 -(+means l o g i c O R . ) The c o m p l e t e d d e c i s i o n i s l i s t e d i nT a b l eI . E q u a t i o n ( 2 0 ) and T a b l e I show t h a t t h e m u l t i p l i c a -t i o n o f t w o 8 - b i t n u m b e r s can b e c o m p l e t e d w i t h t h r e ec o n s e c u t i v e a d d i t i o n s w i t h some h a r d w a r e support ( t h ei m p l e m e n t a t i o n o f s ) . Any number l a r g e r t h a n 8 b i t s , s a y1 6 b i t s , c a n b e decomposed i n t o tw o 8 - b i t b l o c k s ; t h e pro-c e d u r e t h e n f o l l o w s i n an o b v i o u s manner.

    HARDWARE CONSIDERATIONT h e l a s t p h a s e o f d e s i g n i s t o i m p l e m e n t t h e f i n a l s o l u t i o na s o b t a i n e d b y t h e d e c i s i o n maker as l i s t e d i n T a b l eI.F a n - i n a n d f a n - o u t a r e a l w a y s t h e b a s i c problems f a c i n gs w i t c h i n g c i r c u i t d e s i g n e r s ( e s p e c i a l l y when p a s s i v e e l e -m e n t s a r e u s e d s u c h a s d i o d e s ) . Large numbers o f f a n - i n and

    TABLE ITH E L O G I C I M P L E M E N T A T I O N OF S

    S~~~~~~~~~S SSf'o 1 2 S 3 - 4il i l i l i 2 i ' ' l " 2 ' 3 i 4 1 i 2 i 3 ' 3 4 'i l i , i f i f i f i f i 1 i / 2 i f 3 ' f 4 ' 8 i l " 2 i 3 ' 4 " 5i l i t 2 i 4 i s i 6 i 8 i l i t 2 i 3 i 4 i 5 ~ ~ ~ i l i , i f i f i f ii l t i 1 i i i l i , i f i 5 i 8 l23iiii l i I i I i I i 6 8 i l i ' ' 3 ' 5 ' 8 i l " i 4 i 5 6 8i l i ' 2 " 4 " 5 ' 6 ' 7 i 1 i t 2 i 3 5 i 6 " 8i 1 i 2 " 3 " S i 6 " 7 1 1 1 t 2 i 3 5 1 6 1 7 8i l i ' 2 3 i 4 " 5 ' 7 8

    i l i ' 2 i 3 i 4 " 5 6 ' 7

    ' 5 ' 6 ' 7 ' 8

    i 1 i ' 2 i 3 i 4 ' 5 6 i 1 i 2 i 3 i 4 " 5 ' 6 i l 6 i 4 i 6 6 " 8 ' I 6 i ' 3 4 i 5 i 6 " 8i l / 2 ' 2 4 ' 5 i 6 7 1 1 i 2 1 t 3 1 4 1 7 1 8 i 1 i 3 i 4 i 6 " 7 " 8 - i l i 3 i 4 i ' 5 i 6 " 81 1 i 2 ' 3 ' 5 1 6 1 7 ' 1 1 3 ' 4 " 5 ' 7 ' 8 i l " 2 ' 4 ' 6 ' 7 " 8 ' l " 3 ' 4 ' 5 i 7i l i ' 2 i t 3 i 4 i 5 ' 6 i l i t 2 i 3 ' 4 " 6 ' 7 i l i 2 ' 4 " 6 i 7 ' 8 i l i 3 ' 4 ' i ' i 7 i ' 8i l i 2 i t 3 i 4 i 6 i 8 ~~~ ~i 3 4 5 7 8 i ' 2 i 3 ' 4 ' 7 ' f 1 i l i 4 5 6 7 8l i i 4 i i i l i t 3 5 ' 7 ' 8 i 1 i 2 i1 3 i iii l i i2 i f 3 4 6 8 iiiiii li l t 4 5 ' ' l 2 i 4 i 5 6 7 8 i l 1 i 3 i 4 " 5 i 6 i 78i l i 3 i i f i 7 ' 8 ' l i 2 i 3 i 4 " ' 5 ' 8 i l i t i 3 i ' 6 ' 7 ' 8 i l i t 2 3 ' 6 i 81 12 3 f 4 1 5 1 8 1 6 ' 4 ' 5 " 6 6 8 i l i ' 2 ' 3 ' 4 ' 5 ' 7 " 8 ' l " 2 ' 3 . 5 " 6 ' 8i 1 i i ' 3 i 4 ' 5 ' 8 il34S6 7 8 iii356 78 il23 68i l i , i i 5 i i t i f i l i t 2 i 3 i 4 " 5 6 " 7 8 i l t 2 i t 3 i 4 5 ' 6 7 " 8 i l t 2 i 3 4 ' i 5 ' 6 ' 7 8i l i i 2 i 3 i 5 ' i I i 7 i i l i 2 i 3 i 4 ' 6 " 7 " 8 i l i ' 2 6 i ' 3 5 6 ' 7 8 i l i 2 i 3 4 " 5 ' 6 7 ' 8

    i1i'2i'3i4i6i7i8 ' 1 i 2 i 3 4 i 5 6 i 7 i 8 i l ' 1 " 3 i 4 i 5 i 6 i 8 i l i 2 i ' 3 i 4 i 5 ' 7 i 8i l i 2 i t 3 i 4 i 5 i 7 i 8 2l 4 '3 i 4 6 6 8 i 1 i ' 3 4 i 5 6 78 i 1 l 2 3 i 4 i 5 " 6 7 "i l 1 t 2 i 3 i 4 i 5 ' 7 ' 8 i l 1 ' 2 " 3 ' 3 4 " ' s 7 " 8 i l i ' 2 i 3 i 5 i 6 ' 7 ' 8 i l 1 2 3 " 4 ' 5 " 6 ' 7ili,i"5''8 I" " 3 i 4 i S 5 6 7 ' 8 i l " ' 5" ' 'li2i3'4"6i7i8i l i ' 3 ' 4 " 5 ' 6 ' 8 i l i I i 4 i i ' 6 ' 7 ' 8 i l 2 356781 1 2 ' 3 4 " ' 5 " 6 ' 7 8 1 1 1 2 " 4 5 " 6 6 i 8i l 1 2 3 i 4 i ' 5 6 ' 7 ' 8 i 1 i 2 i t 3 i 5 ' 6 " 7 ' 8

    i l i 2 i 3 ' 4 ' 5 ' / 6 i 8 i 1 2 i 3 i 4 5 i 6 i 7 8i l i t S i 6 i 7 i 8 i l ~ ' 1 i ' 2 i ' 3 ' 6 " i i l 6 ' 1 i ' 2 " i4i77'8ili4i5i7i8 i ~ ~ ~ l i 2 t 3 i 4 6 5 7 6 i l 1 S 2 6 3 8 i l i i 7 i 8

    9 1 4 5 1 1 1 5 1 0 1 11568 1612I 1 i f 4 5 1 1f i f i f 1 i f i f i 1 i f iii l i3 i i i f . .l i I i i i i 6 ' 8 ' 6 7 8i l i3i i iI.l i 4 i i ii 1 1 3 i 4 ' 5 ' 7 1 8 ' l " 4 ' f 5 ' 6 ' 71 1 i 3 ' 4 ' 5 ' 6 7 8 ' l " 4 ' 5 " 6 ' 7i l i I i 4 i 5 i f i 7 ' 8 i 1 i 4 i 5 i 6 " 7

    13

  • 8/3/2019 Ling Multiplier

    4/4

    LING: HIGH-SPEED COMPUTER MULTIPLICATIONf a n - o u t n o t o n l y d e t e r i o r a t e t h e i n p u t w a v e f o r m , b u t a l s oa f f e c t t h e c i r c u i t d e l a y . S i n c e t h e a d v e n t o f i n t e g r a t e d c i r -c u i t s , a n a c t i v e d e v i c e i s n o m o r e c o s t l y t h a n a p a s s i v e o n e .T h e w a v e f o r m d e t e r i o r a t i o n h a s b e e n r e m o v e d s o m e w h a t ,b u t t h e o v e r a l l r i s e t i m e a n d d e l a y t i m e p e r s t a g e s t i l l a f f e c t st h e c h o i c e o f t h e maximum n u m b e r o f f a n - i n a n d f a n - o u te l e m e n t s . T h e a u t h o r h a s o b t a i n e d 2 5 n s p e r s t a g e u s i n g2 N 9 7 6 w i t h 8 f a n - i n a n d 3 f a n - o u t o p e r a t i n g a t c u r r e n ts w i t c h i n g m o d e . T o d a y , a 1 - n s p e r s t a g e i n t e g r a t e d c h i p i sa v a i l a b l e a n d 0 . 5 n s p e r s t a g e i s o b t a i n a b l e i n l a b o r a t o r ys c a l e . A f u r t h e r i n c r e a s e i n t h e n u m b e r o f f a n - i n a n d f a n - o u te l e m e n t s i s p o s s i b l e . Of c o u r s e , t h e l i m i t a t i o n o f t h e s t a t e - o f -t h e - a r t p l a y s a n i m p o r t a n t r o l e i n d e c i d i n g t h e maximumn u m b e r o f f a n - i n a n d f a n - o u t e l e m e n t s .

    w h i c h i s 3 7 5 1 3 i n d e c i m a l .E x a m p l e 2 : L e t A = 5 9 8 8 1 , B = 4 1 3 7 7 . T h e s e n u m b e r s a r ec o n t a i n e d i n r e g i s t e r s A a n d B ; i n b i n a r y , t h e y s h o w a sf o l l o w s :

    R e g i s t e r A = 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 1R e g i s t e r B = 1 0 1 0 0 0 0 1 1 0 1 0 0 0 0 1 .I n o r d e r t o h o l d t h e p r o d u c t o f 1 6 b i t s b y 1 6 b i t s , t h el e n g t h o f t h e a c c u m u l a t o r s h o u l d b e 3 2 b i t s . A f t e r c o m -p l e t i n g s t e p 2 ( t h r e e c o n s e c u t i v e a d d i t i o n s ) t h e a c c u m u l a t o rh o l d s t h e p r o d u c t o f A 1 - 8 B 1 _ 8 a n d A g 9 1 6 B g 9 1 6 . T h er e g i s t e r A a n d r e g i s t e r B h o l d t h e p r o d u c t o f A1 - 8 B 9 - 1 6a n d A g _ 1 6 B 1 - 1 6 . T h e s e now s h o w a s

    A1 8 B 1 - 8 A 9 g 1 6 B 9 - 1 6A c c u m u l a t o r 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1* - A 1 - 8 B 9 - 1 6 -

    R e g i s t e r A 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1- A g - 1 6 B 1 - 8 -R e g i s t e r B 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 .T h e p r o d u c t o f 1 6 b i t s b y 1 6 b i t s c a n now b e o b t a i n e d w i t h a t o t a l o f f i v e a d d i t i o n s . T h e p r o d u c t i s

    1 00 1 00 1 1 1 0 1 0 1 1 1 0 1 0 1 00 1 00 1 000 1 00 1w h i c h i s 2 4 7 7 6 9 6 1 3 7 i n d e c i m a l .

    D E S C R I P T I O NI n o r d e r t o e x p l a i n t h e o p e r a t i n g p r o c e d u r e s t e p b y s t e p ,a n e x a m p l e i s g i v e n .E x a m p l e 1 : L e t A = 2 3 3 , B = 1 6 1 . I n b i n a r y , t h e s e n u m b e r sa r e s h o w n a s

    A = 1 1 1 0 1 0 0 1B= 1 0 1 0 0 0 0 1 .

    From ( 1 ) , ( 1 3 ) , a n d ( 1 4 ) , I a n d J a s s u m e t h e f o l l o w i n g v a l u e s :I = 2 8 ( 0 . 1 1 0 0 0 1 0 1 )J = 2 6 ( 0 . 1 0 0 1 ) .

    S t e p 1 : S u b s t i t u t i n g I a n d J i n t o T a b l e I , S 0 , S l , S 2 , * S 1 5a r e l o g i c a l l y f o r m e d . S ( i ) a n d S ( j ) a r e s h o w n a s f o l l o w s :S ( i ) = 0 . 0 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 1S ( j ) = 0 . 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0 0 .

    S t e p 2 : C o m p l e t e t h e m u l t i p l i c a t i o n ( 8 b i t s b y 8 b i t s ) w i t ht h r e e c o n s e c u t i v e a d d i t i o n s :AB= 2 [ 1 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0

    - 1 0 0 1 0 0 0 0 0 0 0 0- 1 1 1 1 0 0 1 0 0 1 1 0 0 1 1 . 1+ 1 1 0 0 1 1 1 1 0 0 0 . 0 ]

    1001001010001001

    C O N C L U S I O NU s i n g t h i s a l g o r i t h m t o p e r f o r m t h e m u l t i p l i c a t i o n r e -q u i r e s minimum c i r c u i t d e l a y ( o n l y o n e s h i f t o p e r a t i o n i nf o r m i n g I a n d J ) . No a r i t h m e t i c o p e r a t i o n i s n e e d e d t o o b -t a i n t h e b i t p a t t e r n o f S ( i ) a n d S ( j ) . T h e l o g i c e q u a t i o n s ( a l lt h e S ' s l i s t e d i n T a b l e I ) a r e n o t i n t h e m o s t s i m p l e f o r m b e -c a u s e t h e e x i s t e n c e o f r e d u n d a n t e l e m e n t s i n S ' s may r e d u c et h e t o t a l n u m b e r o f r e q u i r e d c h i p s . F a c t o r i n g o u t t h e t e r mi 1 i 4 , common t o s o m e S ' s , w i l l e l i m i n a t e t h e n u m b e r o f f a n -i n s , b u t o n e a d d i t i o n a l l e v e l i s c r e a t e d .T h e u s e o f t h i s m e t h o d t o p e r f o r m m u l t i p l i c a t i o n f o r a n y8 - b i t m a c h i n e r e q u i r e s t h r e e a d d i t i o n s , a 1 6 - b i t m a c h i n e r e -q u i r e s f i v e a d d i t i o n s , a n d a 3 2 - b i t m a c h i n e r e q u i r e s s e v e na d d i t i o n s .

    ACKNOWLEDGMENTT h e a u t h o r w i s h e s t o t h a n k D r . T . C . C h e n f o r h i s c o n -t i n u e d h e l p f u l c r i t i c i s m a n d R . S h i v e l y f o r h i s r e v i s i o n s a n ds u g g e s t i o n s .

    R E F E R E N C E S[ 1 ] T . Lamdan a n d D . A s p i n a l l , "Some a s p e c t s o f t h e d e s i g n o f a s i m u l -t a n e o u s m u l t i p l i e r f o r a p a r a l l e l b i n a r y d i g i t a l c o m p u t e r , " 1 9 6 5 P r o c .I F I P C o n g . , v o l . 2 . W a s h i n g t o n , D . C . : S p a r t a n , 1 9 6 6 , p p . 4 4 0 - 4 4 6 .[ 2 ] S . F . A n d e r s o n , J . G . E a r l e , R . E . G o l d s c h m i d t , a n d D . M. P o w e r s ," F l o a t i n g - p o i n t e x e c u t i o n u n i t , " I B M J . R e s . D e v e l o p . , v o l . 1 1 , n o . 1 ,p p . 3 5 - 5 3 , 1 9 6 7 .[ 3 ] H . L i n g , "A s h o r t n o t e o n b i n a r y m u l t i p l i c a t i o n , " IBM R e s . N o t e NC6 2 6 , May 1 9 6 6 .

    7 0 9