Difficult RNS Operations - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Difficult RNS Operations

Description:

All mi-1 iyi mi Are in [0,1) Whole Part of Result Discarded ... mi-1 iyi mi Can be Precomputed for all y and i. Use Table Lookup Circuit and Fractional Adder ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 10
Provided by: mitchth
Category:

less

Transcript and Presenter's Notes

Title: Difficult RNS Operations


1
Difficult RNS Operations
  • Sign Test
  • Magnitude Comparison
  • Overflow Detection
  • Generalized Division

Suffices to discuss first three in context of
being able todo magnitude comparison since they
are essentially same if M is such that MNP1
where the values representedare in interval
-N,P.
2
Difficult RNS Operations
  • Sign Test same as Comparison with P
  • Overflow Detection accomplished using Signs of
    Operands and Results
  • Focus On
  • Magnitude Comparison
  • Generalized Division

3
Magnitude Comparison
  • Could Convert to Weighted Representation Using
    CRT
  • Too Complicated too much Overhead
  • Use Approximate CRT Instead
  • Divide CRT Equality by M

by Definition
4
Approximate CRT
  • Addition of Terms is Modulo-1
  • All mi-1lt?iyigtmi Are in 0,1)
  • Whole Part of Result Discarded and Fractional
    Part Kept
  • Much Easier than CRT Modulo-M Addition
  • mi-1lt?iyigtmi Can be Precomputed for all y and i
  • Use Table Lookup Circuit and Fractional
    Adder (ignore carry-outs)

5
Approximate CRT LUT
6
Magnitude Comparison Example
Use approximate CRT decoding to determine the
larger of the two numbers.
Reading the Values from the Tables
Thus, we conclude that
7
Approximate CRT Error
If Maximum Error in Approximate CRT Table is ?,
then Approximate CRT Decoding Yields Scaled Value
of RNS Number with Error No Greater than k ?
Previous Example Table Entries Rounded to 4 Digits
Maximum Error in Each Entry is ?0.00005
k4 Digits Error is 4?0.0002
0.0571-0.05360.0035 gt 4?0.0002, so XgtY is Safe
8
Redundant RNS Representations
  • Do Not Have Restrict Digits in RNS to Set 0, mi
    -1
  • If 0, ?i Where ?i ? mi Then RNS is Redundant
  • Redundant RNS Simplifies Modular Reduction Step
    for Each Arithmetic Operation

9
Redundant RNS Example
  • Consider mod-13 with 0,15
  • Redundant since
  • Addition Using Pseudo-redundancies Can be Done
    with Two 4-bit Adders

X
Y
Cout
00
Ignore
SUM
Write a Comment
User Comments (0)
About PowerShow.com