hw4solns

# hw4solns - CMPS 10 Homework Assignment 4 Solutions Problems...

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

CMPS 10 - Homework Assignment 4 – Solutions Problems: Chapter 4 (p.184): 1abc, 3abcd, 4ab, 5abc, 6, 7 1.) Given our discussion of positional numbering systems in Section 4.2.1, see whether you can determine the decimal value of the following numbers. a.) 133 (base 4) b.) 367 (base 8, also called octal ). c.) 1BA (base 16, also called hexadecimal. B is the digit that represents 11, A is the digit that represents 10). Solution: a.) (1 x 4 2 ) + (3 x 4 1 ) + (3 x 4 0 ) = 16 + 12 + 3 = 31 Thus, 133 (base 4) = 31 (base 10) b.) (3 x 8 2 ) + (6 x 8 1 ) + (7 x 8 0 ) = 192 + 48 + 7 = 247 Thus 367 (base 8) = 247 (base 10) c.) (1 x 16 2 ) + (11 x 16 1 ) + (10 x 16 0 ) = 256 + 176 + 10 = 442 Thus 1BA (base 16) = 442 (base 10) 3.) Determine the decimal value of the following unsigned binary numbers. a.) 1100 c.) 1111111 b.) 110001 d.) 1000000000 Solution: a.) 2 3 + 2 2 = 8 + 4 = 12 Thus 1100 (base 2) = 12 (base 10) b.) 2 5 + 2 4 + 2 0 = 32 + 16 + 1 = 49 Thus 110001 (base 2) = 49 (base 10) c.) 2 6 + 2 5 + 2 4 + 2 3 + 2 2 + 2 1 + 2 0 = 64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 Thus 1111111 (base 2) = 127 (base 10) d.) 2 9 = 512 Thus 1000000000 (base 2) = 512 (base 10) 4.) Using 8 bits, what is the unsigned binary representation of each of the following values: a.) 23 b.) 55 c.) 275

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

View Full Document
Solution: a.) 23 = 16 + 4 + 2 + 1 23 = 2 4 + 2 2 + 2 1 + 2 0 Thus 23 (base 10) = 10111 (base 2) b.) 55 = 32 + 16 + 4 + 2 + 1 55 = 2
This is the end of the preview. Sign up to access the rest of the document.

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