Vous êtes sur la page 1sur 1

MAT1830 - Discrete Mathematics for Computer Science Assignment #1 To be handed in at the beginning of your support class in week 3 (1822

March) Show your working for all questions. 1. (a) Use the Euclidean algorithm to nd the greatest common divisor of 1029 and 423. (b) Find integers a and b such that gcd(1029, 423) = 1029 a + 423 b. (c) Find integers a and b such that 10 = 1029 a + 423 b, or explain why they dont exist. (d) Find integers a and b such that 12 = 1029 a + 423 b, or explain why they dont exist. 2. (a) Write the decimal number 92 as a sum of powers of 2 and nd representations for it in binary and hexadecimal. (b) What range of numbers can be represented in 7 bits using twos complement form? (c) How would you write -40 as a 7 bit binary number using twos complement form?