CSE20 Lecture 6

CSE20 Lecture 6 - CSE 20 Lecture 6 2/02/10 Residual Number...

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

View Full Document Right Arrow Icon
1 CSE 20 Lecture 6 2/02/10 Residual Number System 1.Intro 2.Definitions 3.Operations 4.Conversions
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 2. Definitions 1. Relatively Prime: Two integers a & b are relatively prime if their greatest common divisor is 1. Residual number: Given m 1 , m 2 ,…,m k relatively prime and a positive integer x < = M (0 x M ) represent x as ( x % m 1 , x % m 2 ,…, x % m k )
Background image of page 2
3 Example k = 3 ( m 1 , m 2 , m 3 ) = ( 2, 3, 7 ) M = m 1 m 2 m 3 = 2 x 3 x 7 = 42 Given x = 30 ( x % m 1 , x % m 2 , x % m 3 ) = ( 30 % 2, 30 % 3, 30 % 7 ) = ( 0, 0, 2 ) Given y = 4 ( y % m 1 , y % m 2 , y % m 3 ) = ( 4 % 2, 4 % 3, 4 % 7 ) = ( 0, 1, 4 ) Given x + y = 34 ( (x + y) % m 1 , (x + y) % m 2 , (x + y) % m 3 ) = ( 34 % 2, 34 % 3, 34 % 7 ) = ( 0, 0, 6 )
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Theorem: for all x, y in the domain [ 0, M – 1 ] If x y ( x % m 1 , x % m 2 ,…, x % m k ) ( y % m 1 , y % m 2 ,…, y % m k ) & differ by at least one element in the representation Proof: suppose x > y Let z = x – y > 0 Then ( z % m 1 , z % m 2 ,…, z % m k ) Has at least one nonzero element.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/12/2011 for the course CS 1 taught by Professor Staff during the Fall '08 term at Cornell.

Page1 / 10

CSE20 Lecture 6 - CSE 20 Lecture 6 2/02/10 Residual Number...

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

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