CSci250 Assembly Language Programming: Homework 1 Solutions

Due date: Monday, September 22, 2008 in class
Absolutely no copying others' work

  1. What are the advantages of using microinstructions to implement machine instructions?     (10%)
    Ans>

  2. What is the minimum number of binary bits needed to represent the unsigned decimal integer: 1029? 11     (10%)

  3. What is the octal representation of the hexadecimal integer: 3D7B?     (10%)
       (3D7B)16 = (36573)8
  4. What is the unsigned hexadecimal representation of the decimal integer: 4095?     (10%)
       (4095)10 = (FFF)16
  5. What is the 16-bit hexadecimal representation of the signed decimal integer: -401?     (10%)
       (-401)10 = (FE6F)16
  6. The 16-bit hexadecimal number: A3C4 represents a signed integer. Convert to decimal.     (10%)
       (A3C4)16 = (-23612)10
  7. What is the decimal representation of the signed binary number: 11001101?     (10%)
       (11001101)2 = (-51)10
  8. What is the 8-bit binary (two's complement) representation of the signed decimal integer: -101?     (10%)
       (-101)10 = (10011011)2
  9. What is the smallest value you can represent using a 256-bit signed integer? -2255     (10%)

  10. Create a truth table to show all possible inputs and outputs for the boolean function described by
    A ∨ (¬B ∧ ¬C).     (10%)
    Ans>