CSE 260: Homework 8 - Integer Division and Modulo Arithmetic - Prof. Sakti Pramanik, Assignments of Discrete Structures and Graph Theory

Information about homework 8 for cse 260, which covers integer division, relatively prime numbers, and modulo arithmetic. Students are required to find the addition and multiplication tables for modulo arithmetic with base 5, perform arithmetic operations in base 5, and solve equations in z(5). Additionally, the document includes conversions between bases 14 and 8.

Typology: Assignments

Pre 2010

Uploaded on 07/28/2009

koofers-user-yuh
koofers-user-yuh ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 260
Homework 8- Integer Division
1. Section 2.4: 42 (hint: example 20 on page 159), 46, 47\\
Section 3.4: 27, 28, 31
2. Which positive integers less than 30 are relatively prime to 30.
3. The mod function is defined as:
mod p:Zโ†’Z(p), mod(x,p)=x mod p, and Z(p) = {0,1,2, ...p โˆ’1}
We can define add and multiplication in modulo arithmetic as follows:
a+pb= (a+b) mod p and aโˆ—pb= (a.b) mod p, where a, b๎˜Z(p)
An important modulo arithmetic is in Z(2) as follows:
For example, 1+21=(1+1) mod 2=2 mod 2=0 and 1โˆ—21=(1.1) mod 2=
1 mod 2=1
The addition and the multiplication table for the +2,โˆ—2, respectively,
are as follows:
+2|0 1 *2|0 1
----|------- ----|------
0 | 0 1 0 | 0 0
1 | 1 0 1 | 0 1
(a) Give the tables for +5and โˆ—5
(b) Give the following sum and product in base 5:
42352145
+2405โˆ—3345
โ€”โ€”โ€” โ€”โ€”โ€”-
(c) Based on the above tables for +5and โˆ—5, solve the following equa-
tions for xin Z(5).
2 +5x= 1
2โˆ—5x= 3
4. Make the following conversions between bases:
(a) 743A11 =x14
(b) 110011000110101002=x8

Partial preview of the text

Download CSE 260: Homework 8 - Integer Division and Modulo Arithmetic - Prof. Sakti Pramanik and more Assignments Discrete Structures and Graph Theory in PDF only on Docsity!

CSE 260

Homework 8- Integer Division

  1. Section 2.4: 42 (hint: example 20 on page 159), 46, 47\ Section 3.4: 27, 28, 31
  2. Which positive integers less than 30 are relatively prime to 30.
  3. The mod function is defined as: mod p : Z โ†’ Z(p), mod(x,p)=x mod p, and Z(p) = { 0 , 1 , 2 , ...p โˆ’ 1 } We can define add and multiplication in modulo arithmetic as follows: a +p b = (a + b) mod p and a โˆ—p b = (a.b) mod p, where a, bZ(p) An important modulo arithmetic is in Z(2) as follows: For example, 1+ 2 1=(1+1) mod 2=2 mod 2=0 and 1โˆ— 2 1=(1.1) mod 2= 1 mod 2= The addition and the multiplication table for the + 2 , โˆ— 2 , respectively, are as follows:
  • 2 | 0 1 * 2 | 0 1 ----|------- ----|------ 0 | 0 1 0 | 0 0 1 | 1 0 1 | 0 1

(a) Give the tables for + 5 and โˆ— 5 (b) Give the following sum and product in base 5: (^4235 ) +240 5 โˆ— (^3345) โ€”โ€”โ€” โ€”โ€”โ€”-

(c) Based on the above tables for + 5 and โˆ— 5 , solve the following equa- tions for x in Z(5). 2 + 5 x = 1 2 โˆ— 5 x = 3

  1. Make the following conversions between bases:

(a) 743A 11 = x 14 (b) 11001100011010100 2 = x 8