Chapt er 14: Redundant Arit hmet ic Keshab K. Parhi
• A non-redundant radix-r number has digit s f rom t he set {0, 1, … , r - 1} and all numbers can be represent ed in a unique way. • A radix-r redundant signed-digit number syst em is based on digit set S ≡ {- β , -( β - 1), … , -1, 0, 1, … , α }, where, 1 ≤ β , α ≤ r - 1. • The digit set S cont ains more t han r values ⇒ mult iple represent at ions f or any number in signed digit f ormat . Hence, t he name redundant . • A symmet ric signed digit has α = β . • Carry-f ree addit ion is an at t ract ive propert y of redundant signed-digit numbers. This allows most signif icant digit (msd) f irst redundant arit hmet ic, also called on-line arit hmet ic. Chap. 14 2
Redundant Number Representations • A symmet ric signed-digit represent at ion uses t he digit set r. α > = {- α , … , α }, where r is t he radix and α t he D < , -1, 0, 1, … largest digit in t he set . A number in t his represent at ion is writ t en as : x 0 = ∑ x W-1- i r i X < r . α > = x W-1 .x W-2 .x W-3 … The sign of t he number is given by t he sign of t he most signif icant non-zero digit . α Redundancy Fact or ρ Digit Set D < r . α > I ncomplet e < (r – 1)/ 2 < ½ Complet e but non-redundant = (r – 1)/ 2 = ½ ≥ r/ 2 Redundant > ½ = r/ 2 Minimally redundant > ½ and < 1 Maximally redundant = r – 1 = 1 Over-redundant > r - 1 > 1 Chap. 14 3
Hybrid Radix- 2 Addition S < 2.1> = X < 2.1> + Y where, X < r. α > = x W-1 .x W-2 x W-3 … x 0 , Y = y W-1 .y W-2 y W-3 … y 0 . The addit ion is carried out in t wo st eps : 1. The 1 st st ep is carried out in parallel f or all t he bit posit ions. An int ermediat e sum p i = x i + y i is comput ed, which lies in t he range {1, 0, 1, 2}. The addit ion is expressed as: x i + y i = 2t i + u i , where t i is t he t ransf er digit and has value 0 or 1, and is + ; u i is t he int erim sum and has value eit her 1 or denot ed as t i - . t -1 is assigned t he value of 0. 0 and is denot ed as -u i 2. The sum digit s s i are f ormed as f ollows: s i = t i-1 + - u i - Chap. 14 4
Digit Radix 2 Digit Set Binary Code x i {1, 0, 1} x i + - x i - y i {0, 1} y i + p i = x i + y i {1, 0, 1, 2} 2t i + u i u i {1, 0} -u i - t i {0, 1} t i + + - s i - s i = u i + t i- 1 {1, 0, 1} s i Eight -digit hybrid radix-2 adder Chap. 14 5
Digit -serial adder f ormed by f olding LSD-f ir st adder MSD-f irst adder Chap. 14 6
Hybrid Radix- 2 Subtraction S < 2.1> = X < 2.1> - Y where, X < r. α > = x W-1 .x W-2 x W-3 … x 0 , Y = y W-1 .y W-2 y W-3 … y 0 . The addit ion is carried out in t wo st eps : 1. The 1 st st ep is carried out in parallel f or all t he bit posit ions. An int ermediat e dif f erence p i = x i - y i is comput ed, which lies in t he range {2, 1, 0, 1}. The addit ion is expressed as: x i - y i = 2t i + u i , where t i is t he t ransf er digit and has value 1 or 0, and is - ; u i is t he int erim sum and has value eit her 0 denot ed as -t i + . t -1 is assigned t he value of 0. or 1 and is denot ed as u i 2. The sum digit s s i are f ormed as f ollows: s i = -t i-1 - + u i + Chap. 14 7
Digit Radix 2 Digit Set Binary Code x i {1, 0, 1} x i + - x i - y i {0, 1} y i - p i = x i – y i {2, 1, 0, 1} 2t i + u i u i {0, 1} u i + - t i {1, 0} -t i s i = u i + t i- 1 {1, 0, 1} s i + - s i - Eight -digit hybrid radix-2 subt ract or Chap. 14 8
Hybrid Radix- 2 Addition/ Subtraction Hybrid radix-2 adder/ subt ract or (A/ S = 1 f or addit ion and A/ S = 0 f or subt ract ion) •This is possible if one of t he operands is in radix-r complement represent at ion. Hybrid subt ract ion is carried out by hybrid addit ion where t he 2’s complement of t he subt rahend is added t o t he minuend and t he carry-out f rom t he most signif icant posit ion is discarded. Chap. 14 9
Signed Binary Digit (SBD) Addition/ Subtraction • Y < r . α > = Y + - Y - , is a signed digit number, where Y + , α }. and Y - are f rom t he digit set {0, 1, … • A signed digit number is t hus subt ract ion of 2 unsigned convent ional numbers. • Signed addit ion is given by: r . α > + Y + - Y - , S < r . α > = X < r . α > + Y < r . α > = X < ⇒ S1 < r. α > = X < r. α > + Y + , r. α > - Y - S < = S1 r . α > < • Digit serial SBD adders can be derived by f olding t he digit parallel adders in bot h lsd-f irst and msd- f irst modes. • LSD-f irst adders have zero lat ency and msd-f irst adders have lat ency of 2 clock cycles. Chap. 14 10
(a) Signed binary digit adder/ subt ract or (b) Def init ion of t he swit ching box Chap. 14 11
Digit serial SBD redundant adders. (a) LSD-f irst adder (b) msd-f ir st adder Chap. 14 12
Maximally Redundant Hybrid Radix- 4 Addition (MRHY4A) • Maximally redundant numbers are based on digit set D < . 4.3> S < = X < 4.3> - Y 4 4.3> • The f irst st ep comput es: x i + y i = 4t i + u i Replacing t he respect ive binary codes f rom t he t able t he f ollowing is obt ained : (2x i +2 - 2x i -2 + 2y i +2 ) + x i + - x i - + y i + = 4t i + + 2u i +2 - 2u i -2 - u i - A MRHY4A cell consist ing of t wo P P M adders is used t o comput e t he above. • St ep 2 comput es comput es s i = t i-1 + u i . Replacing s i , u i , and t i-1 by corresponding binary codes leads t o s i +2 = u i +2 , s i -2 = u i -2 , s i + =t i-1 + and s i - = u i - . Chap. 14 13
Digit Radix 4 Digit Set Binary Code x i {3, 2, 1, 0, 1, 2, 3} 2x i +2 – 2x i -2 + x i + - x i - y i {0, 1, 2, 3} 2y i +2 + y i + p i = x i + y i {3, 2, 1, 0, 1, 2, 3, 4, 5, 6} 4t i + u i u i {3, 2, 1, 0, 1, 2} 2u i +2 – 2u i -2 - u i - t i {0, 1} t i + +2 - 2s i -2 + s i + - s i - s i = u i + t i- 1 {3, 2, 1, 0, 1, 2, 3} 2s i Digit set s involved in Maximally Redundant Hybrid Radix-4 Addit ion Chap. 14 14
MRHY4A adder cell Four-digit MRHY4A Chap. 14 15
Minimally Redundant Hybrid Radix- 4 Addition (mrHY4A) • Minimally redundant numbers are based on digit set D < 4.2> . S < = X < 4.2> - Y 4 4.2> • The f irst st ep comput es: x i + y i = 4t i + u i Replacing t he respect ive binary codes f rom t he t able t he f ollowing is obt ained : (- 2x i -2 + 2y i +2 ) + (x i + + x i ++ + y i + ) = 4t i + - 2u i -2 + u i + A mrHY4A cell consist ing of one P P M adder and a f ull adder is used t o comput e t he above. • St ep 2 comput es comput es s i = t i-1 + u i . Replacing s i , u i , and t i-1 by corresponding binary codes leads t o s i -2 = u i -2 , s i ++ = t i-1 + and s i + = u i + . Chap. 14 16
Digit Radix 4 Digit Set Binary Code x i {2, 1, 0, 1, 2} – 2x i -2 + x i + + x i ++ y i {0, 1, 2, 3} 2y i +2 + y i + p i = x i + y i {2, 1, 0, 1, 2, 3, 4, 5} 4t i + u i u i {2, 1, 0, 1} 2u i +2 – 2u i -2 - u i - t i {0, 1} t i + -2 + s i + + s i ++ s i = u i + t i- 1 {2, 1, 0, 1, 2} 2s i Digit set s involved in Minimally Redundant Hybrid Radix-4 Addit ion Chap. 14 17
mrHY4A adder cell Four -digit mr HY4A Chap. 14 18
Non- redundant to Redundant Conversion • Radix-2 Represent at ion : A non-redundant number X = x 3 .x 2 .x 1 .x 0 can be convert ed t o a redundant number Y = y 3 .y 2 .y 1 .y 0 , where each digit y i is + and y i - as shown below: encoded as y i Chap. 14 19
• Radix-4 represent at ion : – radix-4 maximally redundant number : X is a radix-4 complement number, whose digit s x i are encoded +2 + x i + . I t s corresponding using 2 wires as x i = 2x i maximally redundant number Y is encoded using y i = 2y i +2 - 2y i -2 + y i + - y i - . The sign digit x 3 can t ake values -3, -2, -1 or 0, and is encoded using x 3 = -2x 3 -2 - x 3 - . Chap. 14 20
– radix-4 minimally redundant number: X is a radix- 4 complement number, whose digit s x i are encoded using 2 wires as x i = 2x i +2 + x i + . I t s corresponding minimally redundant number Y is encoded using y i = -2y i -2 + y i + + y i ++ . To convert radix-r number x t o redundant number y < r . α > , t he digit s in t he range [ α , r - 1] are encoded using a t ransf er digit 1 and a corresponding digit x i - r where x i is t he i t h digit of x. Thus, +2 + x i + = 4x i +2 - 2x i +2 + x i + 2x i = y i+1 ++ - 2y i -2 + y i + Chap. 14 21
Recommend
More recommend