Hw1 - CSc 252 Homework 1 Version 1.0 Homework 1 Due: 10am...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
CSc 252 — Homework 1 Version 1.0 1 of 9 Homework 1 Due: 10am Tuesday, Sep. 06, 2011 Turnin: Four solutions: 1 iv, 1 v , 5 and 9 . To receive credit for your solutions, you must show your work where applicable. Solutions to the remaining problems are attached. 1. — Assume that 16-bit, two’s complement, binary numbers are being used in this problem. Some binary arithmetic and conversions. For each of the pairs of numbers below, compute: a.) hexadecimal (base 16) equivalents for both a and b, assume unsigned numbers b.) octal (base 8) equivalents for both a and b, assume unsigned numbers c.) decimal (base 10) equivalents for both a and b, assume two’s complement numbers d.) a + b and indicate if overflow occurs, assume two’s complement numbers e.) a - b by negating b and adding, indicate if overflow occurs, assume two’s complement numbers i.) a = 0100 0111 0101 1000 b = 1000 0000 1100 0110 ii.) a = 0001 0000 0011 1000 b = 0111 0010 0100 1011 iii.) a = 0000 0000 0110 1100 b = 0000 0001 1010 1001 iv.) turnin this one (15 points, 3 points each part) a = 0110 1001 1000 1101 b = 1010 0011 0001 1100 v.) turnin this one (15 points, 3 points each part) a = 0110 1010 1100 1000 b = 0101 1011 0011 1110 2. — Given the bit pattern: 1100 0011 1010 0000 0000 0000 0000 0000 what does it represent, assuming that it is a.) a two’s complement integer? b.) an unsigned integer? c.) a floating-point number? 3. — This exercise is similar to the previous one, but this time, use the bit pattern: 0000 0000 0000 0000 0000 0000 0000 0000 4. — This exercise is similar to the previous one, but this time, use the bit pattern: 0011 1100 0011 0000 0000 0000 0000 0000 5. turnin this one (20 points, 5 points for b) and c) each, 10 points for c)) — This exercise is similar to the previous one, but this time, use the bit pattern: 1100 1000 0001 1011 1000 1001 0111 0101 6. — Based on problem 3.10.4, page 292. Show the IEEE754 binary representation for the floating-point number 10.0 ten . 7. — This exercise is similar to the previous one, but this time use 1,024.5 ten . 8. — This exercise is similar to the previous two, but this time use -42.3125 ten .
Background image of page 1

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

View Full DocumentRight Arrow Icon
CSc 252 — Homework 1 Version 1.0 2 of 9 9. turnin this one (10 points) — This exercise is similar to the previous one, but this time use +95,640.6015625 ten .
Background image of page 2
CSc 252 — Homework 1 Version 1.0 3 of 9 Homework 1 Provided Solutions 1. — Assume that 16-bit, two’s complement, binary numbers are being used in this problem. Some binary arithmetic and conversions. For each of the pairs of numbers below, compute:
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/28/2012 for the course CSC 252 taught by Professor Moon during the Fall '11 term at University of Arizona- Tucson.

Page1 / 9

Hw1 - CSc 252 Homework 1 Version 1.0 Homework 1 Due: 10am...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online