Sei sulla pagina 1di 9

SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

MAT5009 ADVANCED COMPUTER ARITHMETIC

ASSIGNMENT-1: STORED-CARRY AND STORED-BARROW REPRESENTATIONS OF


GENERALIZED SIGNED-DIGIT NUMBERS.

By

SACHIN RAMESH HALLAD

(Reg. No:- 18MVD0003)

M.Tech VLSI Design

Fall Semester 2018

SCHOOL OF ELECTRONICS ENGINEERING

VIT UNIVERSITY

VELLORE-632014, TAMIL NADU, INDIA

AUGUST 2018

VIT UNIVERSITY, VELLORE Page 1


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

QUESTION 3.1 :- Stored-carry and stored-barrow representations, The radix-2


number systems using the digit sets [0,2] and [-1,1] are known as binary-stored
carry and stored-barrow representations, respectively. The general radix-r
stored carry and stored barrow representations are based on the digit sets [0,r]
and [-1, r-1], respectively.

a:- Show that carry-free addition is impossible for stored-carry/borrow


numbers.

EXPLANATION:-

Generalized Signed Digit-Number Systems

We define a generalized signed-digit (GSD) number system as positional


system with the digit set {-α,-α+1, ….,β-1,β} with the conditions α≥0, β≥0, and
α+β+1>r, where ‘r’ is the number representation radix. The excluded case of
α+β+1=r results in non-redundant number representation systems which cover
the conventional radix ‘r’ system with α=0 and β=r-1 as a special case. The
redundancy index of a GSD number system is defined as ρ=α+β+1-r.

For Binary stored-carry (BSC) number system: r=2, α=0, β=2, ρ=1

For Binary stored-barrow (BSB) number system: r=2, α=β=1, ρ=1

Carry Free Addition Of GSD Numbers

Let the two numbers to be added have xi and yi as ‘i’th digits. For each position
‘i’, a position sum pi=xi + yi is computed which is then broken into a transfer
digit ti+1 and an interim sum wi=pi-rti+1.The final sum digit is si=wi+ti whose
computation should produce no new transfer. Let us see what is involved in
computing the transfer digit ti+1.

From the digit set assumption (-α≤xi, yi≤β) we have -2α≤pi≤2β and -α≤wi+ti≤β.

Let the range of transfer digits be -λ≤t j≤µ, where λ≤α and µ≤β are nonnegative
intergers.

 A necessary and sufficient condition for the carry-free addition algorithm


to be applicable is ρ≥λ+µ.

VIT UNIVERSITY, VELLORE Page 2


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

 The set {-λ, -λ+1, …., µ-1, µ} of possible transfer digit values for carry free
addition of GSD numbers is of minimal size if we choose

α
λ min
( )
= r −1

µ min= r −1(β)
 In a GSD number system, the set of possible transfer digit values must
have at least [ρ/(r-1)]+2 members if the carry free addition algorithm is
to be applicable.
 For the carry free addition to be applicable to a GSD number system, it is
necessary and sufficient to have ρ≥3 if either α or β equal to 1 and ρ≥2
otherwise, with r>2 in both cases. Thus we conclude that the carry free
addition is possible only if

ρ≥ ( αr −1

= 1+( ρ
) r −1 ) …………………(1)
For the above given question,

α=0, β=2, this implies ρ=α+β+1-r=1, which will not satisfy the equation(1). Thus
carry free-addition is impossible for stored-carry/borrow numbers with radix
r=2 GSD numbers, regardless of the choice of values for α and β.

b. Supply the details of limited-carry addition for radix-r stored carry


numbers.

EXPLANATION:-

Limited Carry Addition of GSD Numbers

The new aspects of this algorithm are

1) computation of range estimates, and

2) computation of ti+1 as a function of both Pi and ei.

VIT UNIVERSITY, VELLORE Page 3


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

The range estimate ei, maybe presented in many different formats. In the
simplest case, it is a binary indicator restricting ti to one of two subsets (not
necessarily disjoint) of the set { - λ, - λ + 1 ,…., µ - 1, ,µ} of possible transfer digit
values. In the most general case, the range estimate e i is k-valued and
identifies one of k (possibly overlapping) subintervals of the closed interval [- λ,
µ] as containing ti. In our subsequent discussion, we consider the simplest case
where a binary range estimate is used and show that this is sufficient for
limited-carry addition in all cases. Let λ’ and µ’ be constant integers satisfying

-λ < - λ’ ≤ µ’ < µ

Unlike λ and µ which are assumed to be nonnegative, λ’ and µ’ can also be


negative. The binary range estimate ej € {l,h} restricts the transfer digit tj into
one of the two closed subintervals; the low subinterval [-λ, µ’] and the high
subinterval [-λ’, µ ].

The correspondence between range estimates and possible transfer digit


values is as follows:

If ei = l then – λ ≤ ti ≤ µ’

If ei = h then – λ’ ≤ ti ≤ µ

in the worst case, ti+1 is in the range

 Select ei+1 = l iff pi < E and ei+1 = h iff pi ≥ E, where E is a known comparison
constant to be specified later.

 For limited-carry addition of GSD numbers, the comparision constant E


of Algorithm must satisfy the following constraints:

VIT UNIVERSITY, VELLORE Page 4


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

 Necessary and sufficient conditions for the limited-carry addition


algorithm to be applicable to a GSD number system are

Stored-Carry Number System

Stored-carry number representation systems can be defined for any radix ‘r’ as
having the digit set (0, 1 , 2,…, r}, although only the binary stored-carry (BSC)
system has found wide applications. The main application of BSC numbers is in
Multi-operand addition and hence multiplication. A BSC number can be added
to a conventional binary number, producing a BSC result, by a set of full adders
without carry propagation. The usual encoding for BSC digits in this context is
to represent 0 by (0,0), 1 by (0,1) or (1,0) and 2 by (1,1) .We call this the unary
encoding of the digit set {0,1,2}.

That two unary-encoded BSC numbers can be added by a limited-carry circuit


consisting of two levels of full adders is well known. This property follows for
SC numbers in all radices. In adding two BSC numbers, we have λ min = 0 and µmin
= 2.

To design the adder circuit, we start by selecting appropriate values for λ and
µ, which for the BSC number system becomes,

λ‘+µ‘≥0

λ’ ≤ -1

µ ‘≤ 1

Clearly, the only possible choices are λ’ = -1 and µ ‘= 1.

The comparison constant E must satisfy,

1<E≤3

VIT UNIVERSITY, VELLORE Page 5


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

The most convenient value for E depends on the encoding used to represent pi.

For example, with a 3-bit binary encoding for p i, the choice E = 2 is more
convenient since the condition pi ≥ E of Algorithm can be checked by examining
the logical OR of the two most significant bits of p i. It is possible to generate
the range estimate directly as a function of x i and yi (four logic variables) rather
than waiting for the computation of pi. This speeds up the addition process at
the expense of a somewhat more complex design. If the encoding <1,0> is
disallowed for representing the BSC digit 1, then the choice E = 3 turns out to
be more convenient and simplifies the overall design considerably. If the unary
encoding is used the absence of <1,0> can be ensured by adding an initial pair
of gates that convert each digit encoding <a1, a2> to <a1 a2, a1+a2>.

c. Supply the details of limited-carry addition for radix-r stored barrow


numbers.

EXPLANATION:-

Stored-Barrow Number System

Stored – borrow number representation systems can be defined for any radix r
as having the digit set {- 1, 0 ,1 ,........, r – 1}. I the special case of r=2, we obtain
the binary stored – borrow (BSD) or binary signed – digit (BSD) number system
with the digit set {-1, 0,1}. In addition to having been used for representing
temporary values in high - speed multiplication and division BSD numbers have
been proposed for application over the entire range of data storage and
processing functions in special – purpose arithmetic engines. A BSD number
can be added to conventional binary number, producing a BSD result by, a set
of adder – like cells without carry or borrow propagation.

The two BSD numbers can be added by a limited – carry circuit. This property
follows foe SB numbers in all radices. In adding two BSB or BSD numbers, we
have λmin = -1 and μ min = 1. To design the needed circuit, we start by selecting
appropriate values for λ΄ and µ´ which for the BSB number system become

λ΄ + μ΄ ≥ 0
λ΄ ≤ 0
μ΄≤ 0

Clearly, the only possible choices are λ΄ = μ΄ = 0.

VIT UNIVERSITY, VELLORE Page 6


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

The comparison constant E must satisfy

-1 < E ≤ 1

The most convenient value of E depends on the encoding used to represent p i.


In most cases, however, the choice E = 0 is convenient since the condition pi >=
E can be checked by determining the sign of p i . It is also possible to generate
the range estimate directly as a function of x i and yi (four logic variables) rather
than waiting for the computation of pi, as was the case for BSC numbers.

In two-valued logic, each binary signed digit can be represented by two bits,
using several possible encodings.

Two natural encodings are


1) the <s, v > encoding, consisting of “sign” and “value” bits for each digit,
whereby -1, 0, and 1 are represented by < 1,1>, <0,0>, and <0,1>, respectively,

2) the <n, p> encoding, consisting of “negative” and “positive” flags for each
digit, whereby i, 0, and 1 are represented by <1, 0>, <0 , 0> and <0, l > ,
respectively.
If a digit d is represented as <d s, du >with the first and as <d n, dP>with the
second encoding, then the following equalities hold:

d = ( l -2d s)dv =dP -dn

It has been shown that the second encoding results in much simpler
implementations for most arithmetic circuits of interest. Both encodings allow
the implementation of normalized significant digit arithmetic. If the extra
combination (<1,0> in the <s,v> encoding and <1,1> in the <n,p> encoding can
be used as DON’T CARE conditions to obtain simpler designs. It is also possible
to use a 1- out – of -3 encoding where a binary signed digit is represented by
the triple <n, o, p>, with the middle flag denoting the value zero. Such an
encoding can provide complete unidirectional error
detection capability with relatively low overhead in terms of hardware
complexity.

An important property of BSD numbers is that there exists a propagation – free


recoding algorithm which transforms any BSD number x = x k-1x k-2......x0 into an
equivalent BSD number z= zkzk-1....z0, such that zjzj-1 ≠ 1( 1≤j≤k). This recoding
VIT UNIVERSITY, VELLORE Page 7
SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

enables use of special carry – free addition process instead of limited carry
process and higher speed in parallel and serial multiplication

As BSD number require the same amount of storage as the stored carry
representation and have many advantages over BSC system.

1. ease of multiplication, division, and other arithmetic operations.


2. ease of zero reduction
3. suitability to use with arithmetic error codes.

d. compare the algorithms of parts b and c and discuss.

EXPLANATION:-

Stored-Carry Number System: Stored-carry number representation systems can


be defined for any radix ‘r’ as having the digit set (0, 1 , 2,…, r}. The main
application of BSC numbers is in Multi-operand addition and hence
multiplication.

VIT UNIVERSITY, VELLORE Page 8


SACHIN RAMESH HALLAD ASSIGNMENT-1 18MVD0003

VIT UNIVERSITY, VELLORE Page 9

Potrebbero piacerti anche