ICS312 - Spring 2009 - Homework #1 -

Work alone
You are expected to do your own work on all homework assignments. You may (and are encouraged to) engage in general discussions with your classmates regarding the assignments, but specific details of a solution, including the solution itself, must always be your own work. (See the statement of Academic Dishonesty on the course's syllabus.)

What to turn in?
You can turn your answers on paper on the day the assignment is due (during class or in my office). Alternately you can turn in an electronic copy via e-mail to henric@hawaii.edu with a subject line like "ICS312: HW#1" before 11:59PM on the day the assignment is due.


Exercise #1: Conversions [5pts]

Perform the following conversions, and show the details of your work:

  1. hexadecimal 4AD3 into binary
  2. binary 1011110101011 into hexadecimal
  3. decimal 231 into binary
  4. decimal 677 into hexadecimal
  5. hexadecimal A32 into decimal
Exercise #2: Two's Complement [15pts]

Give the binary 16-bit two's complement representation of the following decimal integers, and show the details of your work:

  1. 341
  2. -1
  3. 0
  4. -56
  5. -101
Give the hexadecimal 32-bit two's complement representation of the following decimal integers, and show the details of your work:
  1. 783
  2. -1
  3. -1,321
  4. -32
  5. 421
Give the decimal value of the following 12-bit two's complement hexadecimal representations, and show the details of your work:
  1. A34
  2. 81F
  3. D73
  4. 7AA
  5. 63A
Exercise #3: Additions and Subtractions [8pts]

Perform the following binary arithmetic operations, and show carries:

  1. 1010111 + 101101
  2. 1000010 + 0111011
  3. 1101110 + 1111011
  4. 0001111 + 1010101
Perform the following hexadecimal arithmetic operations, and show carries:
  1. A3F1E + 32BAA
  2. FF31A + BB4FB
  3. 13111 + FFFFF
  4. 32AAA + F0F0F

henric@hawaii.edu