9e. Convert your answer from (c) to its hexadecimal expansion.
1827 = 16 * 114 + 3
114 = 16 * 7 + 2
7 = 16 * 0 + 7
= (723) base 16
Check: 7 * 16^2 + 2 * 16^1 + 3 * 16^0 = (1827) base 10.
Professor Kate Poirier, Spring 2017
9e. Convert your answer from (c) to its hexadecimal expansion.
1827 = 16 * 114 + 3
114 = 16 * 7 + 2
7 = 16 * 0 + 7
= (723) base 16
Check: 7 * 16^2 + 2 * 16^1 + 3 * 16^0 = (1827) base 10.
9d. Convert the answer from (c) to its octal expansion.
1827 = 8 * 228 + 3
228 = 8 * 28 + 4
28 = 8 * 3 + 4
3 = 8 * 0 + 3
= (3443) base 8
Check: 3 * 8^3 + 4 * 8^2 + 4 * 8^1 + 3 * 8^0 = (1827) base 10
a. Determine the prime factorization of 1078 and 2541
1078= 1078/2= 539/7 = 77/11 = 7
= 1078 = 11*7^2*2
2541 = 2541/3= 847/7 = 121/11 = 11
= 2541= 11^2*7*3
b) determne the greatest common divisor
the common divisors are 3, 7, 11, also 77 because 7*11= 77
77= gcd(1078,2541)
c) determine the least common multiple
the common denominators 3 , 7, 11
3 = lcm(1078,2541)
9c. Convert the decimal expansion of (1827) base 10 to its binary expansion. Show your work.
1827 = 2 * 913 + 1
913 = 2 *456 + 1
456 = 2 * 228 + 0
228 = 2 *114 + 0
114 = 2 * 57 + 0
57 = 2 * 28 + 1
28 = 2 * 14 + 0
14 = 2 * 7 + 0
7 = 2 * 3 + 1
3 = 2 * 1 + 1
1 = 2 * 0 + 1
Check : (1 * 2^10 + 1 * 2^9 + 1 * 2^8 + 0 * 2^7 + 0 * 2^6 + 1 * 2^5 + 0 * 2^4 + 0 * 2^3 + 0 * 2^2 + 1 * 2^1 + 1*2^0) = (1827) base 10.
(1827) base 10 = (11100100011) base 2.
6. Use the Euclidean algorithm to determine the greatest common divisor of 1078 and 2541. Show your work.
GCD (1078, 2541)
2541 = 2 * 1078 + 385
1078 = 2 * 385 +308
385 = 1 * 308 + 77
308 = 4 * 77 + 0
GCD (1078, 2541) = GCD (1078, 385) = GCD (385, 308) = GCD (308, 77) = GCD (77, 0) = 77
© 2024 MAT2440 Discrete Structures & Algorithms I
Theme by Anders Noren — Up ↑
Recent Comments