hw 1 answers - Anisha Dhawan (4).pdf

# hw 1 answers - Anisha Dhawan (4).pdf - Anisha Dhawan CS 109...

• Homework Help
• 5

This preview shows pages 1–3. Sign up to view the full content.

Anisha Dhawan CS 109: Introduction to Computing - Goodney (worked with Napat Kulruchakorn & Brandon Sapalo) Homework Assignment 1 1. D x y AND(x, y) 0 0 0 0 1 0 1 0 0 1 1 1 a) NAND(x,x) x x AND(x, y) NAND(x, y) 0 0 0 1 1 1 1 0 AND(x, y) and NAND(x,x) are not equal. Therefore, this option is incorrect. b) NAND(x, NAND(x,y)) x y AND(x, y) NAND(x, y) AND(x,NAND(x,y)) NAND(x,NAND(x,y)) 0 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1 0 0 1 AND(x, y) and NAND(x, NAND(x,y)) are not equal. Therefore, this option is incorrect.

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

c) NAND(NAND(x, x), NAND(y,y)) y y AND(y, y) NAND(y,y) NAND(x,x) AND(NAND(x, x), NAND(y,y)) NAND(NAND(x, x), NAND(y,y)) 0 0 0 1 1 1 0 1 1 1 0 0 0 1 AND(x, y) and NAND(NAND(x, x), NAND(y,y)) are not equal. Therefore, this option is incorrect. d) NAND(NAND(x, y), NAND(x,y)) x y AND(x, y) NAND(x,y) AND(NAND(x, y), NAND(x,y)) NAND(NAND(x, x), NAND(y,y)) 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 0 0 1 AND(x, y) and NAND(NAND(x, y), NAND(x,y)) are equal. Therefore, this option is correct. 2. Binary-9 bits; Ternary-6 trits The number of bits that must be there in such an encoding to enable this is is 9 bits. Since there are 200 countries and since we want to be able to encode any of these 200 countries in binary, we must make sure that we find a number of bits that allows for at least 200 possible outcomes. The number
This is the end of the preview. Sign up to access the rest of the document.
• Fall '13

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern