let3-Number Systems

Computer Arithmetic: Algorithms and Hardware Designs

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
    CSE 246: Computer Arithmetic  Algorithms and Hardware  Design Numbers: RNS, DBNS, Montgomory Prof Chung-Kuan Cheng Lecture 3
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    How to compare two RNS numbers We can approximate the magnitude of a RNS number by the following formula M p p p RNS x x x M x k k k k ) | ... | | ( ) | ... | | ( 0 2 1 0 2 1 - - - - = - = = 1 0 1 ) ( k i MOD i i i P x α j j P M Π = i P i i P M ] ) [( 1 - = where
Background image of page 2
    An Example Suppose, x = (6|3|0) RNS (7|5|3) y = (3|0|1) RNS (7|5|3) Then we have x/105 = [6(1/7) + 3(1/5) + 0(2/3)] mod 1 ≈ 0.457 y/105 = [3(1/7) + 0(1/5) + 1(2/3)] mod 1 ≈ 0.095 Clearly, x ( 48 ) is greater than y ( 10 ).
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Double Base Number System  (DBNS) DBNS is a new kind of number system, where there are two bases, p and q . Any number x is represented by the equation Also, this number system could be redundant, e.g. 54 = 2 0 3 0 +2 1 3 0 +2 1 3 1 +2 0 3 1 +2 0 3 2 +2 2 3 2 = 2 1 3 3 < < = j i ij j i ij p d q p q p d x , 0 ; ,
Background image of page 4
    Double Base Number System  (DBNS) We can represent DBNS numbers in a two-dimensional table. For example we can express 54 by this tabular representation. 1 2 4 1 x x 3 x 9 x x For each entry in the table, we multiply the corresponding row-value and column-value. Then we add up all such entries to get the value of the number represented by the table.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Double Base Number System  (DBNS) DBMS can be of practical use too in some scenarios. In binary number representation, each bit has approximately 0.5 probability of being 1. But in DBNS, the number of bits that are logic 1 in the tabular representation could be much less. Effectively, we can reduce the number of 0 1 and 1 0 transitions, thus saving power.
Background image of page 6
    Double Base Number System  (DBNS) A greedy approach to minimize the number of TRUE bits in the tabular representation of any integer : GREEDY (x) { if (x > 0) then do{ find the largest 2-integer w such that w ≤ x; write(w); x = x-w; greedy(x); } }
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
    Double Base Number System  (DBNS) It can be shown that expected number of bits that are ‘turned on’ in a DBNS representation of integer is O[lg x/(lg lg x)], which is significantly lower than the corresponding number in the positional binary system, O(lg x). As an example, consider the integer 2
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2008 for the course CSE 246 taught by Professor Cheng during the Fall '06 term at UCSD.

Page1 / 37

let3-Number Systems - CSE 246: Computer Arithmetic...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online