hw8 - * 2 1=(1.1) mod 2= 1 mod 2=1 The addition and the...

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

View Full Document Right Arrow Icon
CSE 260 Homework 8- Integer Division -Answer October 12, 2007 1. Section 2.4: 42 (hint: example 20 on page 159), 46, 47 42. For each pair ( i, j ) ² ( Z + × Z + ) one can order the pairs the same way as in fgure 2 o± page 159. 46. Associate the real number 0 .d 1 d 2 ...d n ... to the ±unction f with f ( n ) = d n . For example, i± the real is 0.234 . . . then the ±unction will be ±(1)= 2 ±(2)=3 ±(3)=4 and so on. Section 3.4: 27, 28, 31 28: We just calculate using the ±ormula. We are given x 0 = 3. Then x 1 =(4.3+1) mod 7=13 mod 7=6; x 2 =(4.6+1) mod 7=25 mod 7=4; x 3 =(4.4+1) mod 7 = 17 mod 7=3. At this point the sequence must continue to repeat 3, 6, 4, 3, 6, 4, . . . ±orever. 2. Which positive integers less than 30 are relatively prime to 30. { 7 , 11 , 13 , 17 , 19 , 23 , 29 } 3. The mod ±unction is defned as: mod p : Z Z ( p ), mod(x,p)=x mod p, and Z ( p ) = { 0 , 1 , 2 , ...p - 1 } We can defne add and multiplication in modulo arithmetic as ±ollows: a + p b = ( a + b ) mod p and a * p b = ( a.b ) mod p, where a, b²Z ( p ) An important modulo arithmetic is in Z (2) as ±ollows: For example, 1+ 2 1=(1+1) mod 2=2 mod 2=0 and 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: * 2 1=(1.1) mod 2= 1 mod 2=1 The addition and the multiplication table or the + 2 , * 2 , respectively, are as ollows: + 2 | 0 1 * 2 | 0 1----|-----------|------| 0 1 | 0 1 | 1 1 | 0 1 (a) Give the tables or + 5 and * 5 + 5 | 0 1 2 3 4 * 5 | 0 1 2 3 4----|------------------|--------------| 0 1 2 3 4 0 | 0 1 | 1 2 3 4 1 | 0 1 2 3 4 2 | 2 3 4 1 2 | 0 2 4 1 3 3 | 3 4 1 2 3 | 0 3 1 4 2 4 | 4 1 2 3 4 | 0 4 3 2 1 (b) Give the following sum and product in base 5: 423 5 214 5 +240 5 * 334 5 -1213 5 1421 1202x 1202x - 134141 (c) Based on the above tables for + 5 and * 5 , solve the following equa-tions for x in Z (5). 2 + 5 x = 1 + 5 3 + 5 3 x = 4 2 * 5 x = 3 * 5 3 * 5 3 x = 4 4. Make the following conversions between bases: (a) 743 A 11 = x 14 3832 14 (b) 11001100011010100 2 = x 8 314324 8...
View Full Document

Page1 / 2

hw8 - * 2 1=(1.1) mod 2= 1 mod 2=1 The addition and the...

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

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