Professor Kate Poirier, Spring 2017

Author: EYan

Test #2 Solutions 9d

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

Test #2 Solutions Question 9c

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.

Test #2 Solutions Question 6

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

Test #1 Solutions Question 6a

6a. Determine the argument form of the above argument.

Notation: W(x): x is willing to prevent evil

A(x): x is able to prevent evil

P(x): x prevents evil

I(x): x is impotent

M(x): x is malevolent

E(x): x exists.

S stands for Superman.

Let’s write the givens:

1: (A(S) ∧ W(S)) → P(S)

2. ¬A(S) → I(S)

3. ¬W(S) → M(S)

4. ¬P(S)

5. E(S) → (¬M(S) ∧ ¬I(S))

6. ¬A(S) ∨ ¬W(S)

7. M(S) ∨ I(S)

8. ¬(¬M(S) ∧ ¬I(S))

9. ¬E(S)

Introducing Elbert Yan

Major: Computer Systems Technology

Reason for interest in Math/Computer Science: I liked to learn anything involving numbers in math and I also found computers enjoyable to use. That’s basically the reason I chose computer systems as my major.

I plan to graduate from City Tech. My goal is to work as an IT person in a company focusing on security.

What I want to get out from this class: In this class, I want to gain the knowledge of algorithms in how to define, create, and develop them.

Other interests/hobbies: I like to play basketball and watch NCIS. Occasionally, I enjoy reading.