11117650 - Kashaf Syed Iqbal - Assignment 2

# 11117650 - Kashaf Syed Iqbal - Assignment 2 - Name Kashaf...

• Homework Help
• 6

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

Name: Kashaf Syed Iqbal Student No: 11117650 Class: CMPT 100.01 Tutor: Nadeem Jamali Assignment 2 Assignment 2. Due: October 14, 2016. Submission on paper at beginning of class. Must receive instructor's approval in advance if an alternative time and method of submission becomes necessary. Solve each of the following problems. To receive full marks, you must show your work. In any problem, marks for the sub-problems are equally distributed unless stated otherwise. 1. (20 Marks) Represent the following decimal numbers in 8-bit 2's complement notation. Indicate if the number cannot be represented using 8-bit 2's complement notation. a) -5 b) 9 c) -64 d) 120 e) -220 Answer: a. -5 5/2 = 2 Remainder 1 ; 2/2 = 1 Remainder 0 ; 1/2 = 0 Remainder 1 Therefore, 8-bit representation of 5 is 00000101 Therefore 2’s complement is 11111010 + 1 11111010 + 1 Starting from the right 1 + 0 = 1 no carry 1011111 Therefore, the answer is 11111011 b. 9 9/2 = 4 Remainder 1 ; 4/2 = 2 Remainder 0 ; 2/2 = 1 Remainder 0 ; 1/2 = 0 Remainder 1 Therefore, 8-bit representation of 9 is 00001001 c. -64 64/2 = 32 Remainder 0 ; 32/2 = 16 Remainder 0 ; 16/2 = 8 Remainder 0 ; 8/2 = 4 Remainder 0 ; 4/2 = 2 Remainder 0 ; 2/2 = 1 Remainder 0 ; 1/2 = 0 Remainder 1 Therefore, 8-bit representation of 64 is 01000000 Therefore, 2’s complement is 10111111 + 1 10111111 + 1 Starting from the right 1

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

Name: Kashaf Syed Iqbal Student No: 11117650 Class: CMPT 100.01 Tutor: Nadeem Jamali Assignment 2 1 + 1 = 0 carry 1 1 + 1 = 0 carry 1 1 + 1 = 0 carry 1 1 + 1 = 0 carry 1 1 + 1 = 0 carry 1
This is the end of the preview. Sign up to access the rest of the document.
• Fall '16
• Numerical digit, Decimal, Numeral system, Kashaf Syed Iqbal Student

{[ 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