Chapt er 14: Redundant Arit hmet ic Keshab K. Parhi A - - PowerPoint PPT Presentation

chapt er 14 redundant arit hmet ic
SMART_READER_LITE
LIVE PREVIEW

Chapt er 14: Redundant Arit hmet ic Keshab K. Parhi A - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Chapt er 14: Redundant Arit hmet ic

Keshab K. Parhi

slide-2
SLIDE 2
  • Chap. 14

2

  • 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.

slide-3
SLIDE 3
  • Chap. 14

3

Redundant Number Representations

  • A symmet ric signed-digit represent at ion uses t he digit set

D<

r.α> = {-α, …

, -1, 0, 1, … , α}, where r is t he radix and α t he largest digit in t he set . A number in t his represent at ion is writ t en as : X<

r . α> = xW-1.xW-2.xW-3…

x0 = ∑ xW-1- ir i The sign of t he number is given by t he sign of t he most signif icant non-zero digit . > 1 > r - 1 Over-redundant = 1 = r – 1 Maximally redundant > ½ and < 1 = r/ 2 Minimally redundant > ½ ≥ r/ 2 Redundant = ½ = (r – 1)/ 2

Complet e but non-redundant

< ½ < (r – 1)/ 2 I ncomplet e Redundancy Fact or ρ α Digit Set D<

r .α>

slide-4
SLIDE 4
  • Chap. 14

4

Hybrid Radix- 2 Addition S<

2.1> = X< 2.1> + Y

where, X<

r.α> = xW-1.xW-2xW-3…

x0 , Y = yW-1.yW-2yW-3…

  • y0. 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 pi = xi + yi is comput ed, which lies in t he range {1, 0, 1, 2}. The addit ion is expressed as: xi + yi = 2t i + ui, where t i is t he t ransf er digit and has value 0 or 1, and is denot ed as t i

+; ui is t he int erim sum and has value eit her 1 or

0 and is denot ed as -ui

  • . t -1 is assigned t he value of 0.
  • 2. The sum digit s si are f ormed as f ollows:

si = t i-1

+ - ui

slide-5
SLIDE 5
  • Chap. 14

5

Eight -digit hybrid radix-2 adder

si

+ - si

  • {1, 0, 1}

si = ui + t i- 1 t i

+

{0, 1} t i

  • ui
  • {1, 0}

ui 2t i + ui {1, 0, 1, 2} pi = xi + yi yi

+

{0, 1} yi xi

+ - xi

  • {1, 0, 1}

xi Binary Code Radix 2 Digit Set Digit

slide-6
SLIDE 6
  • Chap. 14

6

LSD-f ir st adder MSD-f irst adder Digit -serial adder f ormed by f olding

slide-7
SLIDE 7
  • Chap. 14

7

Hybrid Radix- 2 Subtraction S<

2.1> = X< 2.1> - Y

where, X<

r.α> = xW-1.xW-2xW-3…

x0 , Y = yW-1.yW-2yW-3…

  • y0. 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 pi = xi - yi is comput ed, which lies in t he range {2, 1, 0, 1}. The addit ion is expressed as: xi - yi = 2t i + ui, where t i is t he t ransf er digit and has value 1 or 0, and is denot ed as -t i

  • ; ui is t he int erim sum and has value eit her 0
  • r 1 and is denot ed as ui

+. t -1 is assigned t he value of 0.

  • 2. The sum digit s si are f ormed as f ollows:

si = -t i-1

  • + ui

+

slide-8
SLIDE 8
  • Chap. 14

8

Eight -digit hybrid radix-2 subt ract or

si

+ - si

  • {1, 0, 1}

si = ui + t i- 1

  • t i
  • {1, 0}

t i ui

+

{0, 1} ui 2t i + ui {2, 1, 0, 1} pi = xi – yi yi

  • {0, 1}

yi xi

+ - xi

  • {1, 0, 1}

xi Binary Code Radix 2 Digit Set Digit

slide-9
SLIDE 9
  • Chap. 14

9

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.

Hybrid Radix- 2 Addition/ Subtraction

slide-10
SLIDE 10
  • Chap. 14

10

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:

S<

r .α> = X< r .α> + Y< r .α> = X< r .α> + Y+ - Y-,

⇒ S1<

r.α> = X< r.α> + Y+,

S<

r .α> = S1 < r.α> - Y-

  • 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.

slide-11
SLIDE 11
  • Chap. 14

11

(a) Signed binary digit adder/ subt ract or (b) Def init ion of t he swit ching box

slide-12
SLIDE 12
  • Chap. 14

12

Digit serial SBD redundant adders. (a) LSD-f irst adder (b) msd-f ir st adder

slide-13
SLIDE 13
  • Chap. 14

13

Maximally Redundant Hybrid Radix- 4 Addition (MRHY4A)

  • Maximally redundant numbers are based on digit set D<

4.3>

. S<

4.3>

= X<

4.3> - Y4

  • The f irst st ep comput es:

xi + yi = 4t i +

ui

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 + 2yi

+2) + xi + - xi

  • + yi

+ = 4t i + + 2ui +2 - 2ui

  • 2 - ui
  • 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 si = t i-1 + ui. Replacing si, ui, and t i-1

by corresponding binary codes leads t o si

+2 = ui +2, si

  • 2 = ui
  • 2,

si

+=t i-1 + and si

  • = ui
  • .
slide-14
SLIDE 14
  • Chap. 14

14

2si

+2 - 2si

  • 2 + si

+ - si

  • {3, 2, 1, 0, 1, 2, 3}

si = ui + t i- 1 t i

+

{0, 1} t i 2ui

+2 – 2ui

  • 2 - ui
  • {3, 2, 1, 0, 1, 2}

ui 4t i + ui {3, 2, 1, 0, 1, 2, 3, 4, 5, 6} pi = xi + yi 2yi

+2 + yi +

{0, 1, 2, 3} yi 2x i

+2 – 2x i

  • 2 + xi

+ - xi

  • {3, 2, 1, 0, 1, 2, 3}

xi Binary Code Radix 4 Digit Set Digit

Digit set s involved in Maximally Redundant Hybrid Radix-4 Addit ion

slide-15
SLIDE 15
  • Chap. 14

15

MRHY4A adder cell Four-digit MRHY4A

slide-16
SLIDE 16
  • Chap. 14

16

Minimally Redundant Hybrid Radix- 4 Addition (mrHY4A)

  • Minimally redundant numbers are based on digit set D<

4.2>.

S<

4.2>

= X<

4.2> - Y4

  • The f irst st ep comput es:

xi + yi = 4t i +

ui

Replacing t he respect ive binary codes f rom t he t able t he f ollowing is obt ained : (- 2x i

  • 2 + 2yi

+2) + (xi + + xi ++ + yi +) = 4t i + - 2ui

  • 2 + ui

+

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 si = t i-1 + ui. Replacing si, ui, and t i-1

by corresponding binary codes leads t o si

  • 2 = ui
  • 2, si

++ = t i-1 +

and si

+ = ui +.

slide-17
SLIDE 17
  • Chap. 14

17

2si

  • 2 + si

+ + si ++

{2, 1, 0, 1, 2} si = ui + t i- 1 t i

+

{0, 1} t i 2ui

+2 – 2ui

  • 2 - ui
  • {2, 1, 0, 1}

ui 4t i + ui {2, 1, 0, 1, 2, 3, 4, 5} pi = xi + yi 2yi

+2 + yi +

{0, 1, 2, 3} yi – 2x i

  • 2 + xi

+ + xi ++

{2, 1, 0, 1, 2} xi Binary Code Radix 4 Digit Set Digit

Digit set s involved in Minimally Redundant Hybrid Radix-4 Addit ion

slide-18
SLIDE 18
  • Chap. 14

18

mrHY4A adder cell Four -digit mr HY4A

slide-19
SLIDE 19
  • Chap. 14

19

Non- redundant to Redundant Conversion

  • Radix-2 Represent at ion : A non-redundant number

X = x3.x2.x1.x0 can be convert ed t o a redundant number Y = y3.y2.y1.y0, where each digit yi is encoded as yi

+ and yi

  • as shown below:
slide-20
SLIDE 20
  • Chap. 14

20

  • Radix-4 represent at ion :

– radix-4 maximally redundant number : X is a

radix-4 complement number, whose digit s xi are encoded using 2 wires as xi = 2x i

+2 + xi +. I t s corresponding

maximally redundant number Y is encoded using yi = 2yi

+2 - 2yi

  • 2 + yi

+ - yi

  • . The sign digit x3 can t ake values
  • 3, -2, -1 or 0, and is encoded using x3 = -2x 3
  • 2 - x3
  • .
slide-21
SLIDE 21
  • Chap. 14

21

– radix-4 minimally redundant number: X is a radix-

4 complement number, whose digit s xi are encoded using 2 wires as xi = 2xi

+2 + xi +. I t s corresponding minimally

redundant number Y is encoded using yi = -2yi

  • 2 + yi

+ + yi ++.

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 xi - r where xi is t he it h digit of x. Thus, 2x i

+2 + xi + = 4x i +2 - 2x i +2 + xi +

= yi+1

++ - 2yi

  • 2 + yi

+