EE 308

Homework Assignment 2
Due Jan. 31, 2001

  1. Consider the following hexadecimal 8-bit numbers as unsigned. Find their decimal equivalents:
    1. 0xE2
    2. 0x81
    3. 0x79
    4. 0x47

  2. Repeat Problem 1, considering the numbers as signed.

  3. Consider the hexadecimal 8-bit numbers below. Do the indicated operation, and find the 8-bit result. Determine if a carry resulted. Determine if an overflow resulted.
    1. 0x52 + 0x4F
    2. 0x8C + 0x81
    3. 0x91 - 0x8F
    4. 0xC2 - 0x51

  4. Write an instruction sequence take the 8-bit number at address 0x0900, subtract from it the eight-bit number at address 0x0901, and store the result into address 0x0902.

  5. Consider the program of Figure 1 of Lab 2.
    1. Hand assemble this program. Determine the hexadecimal numbers which will be generated when this program is assembled, and at what locations they will be stored in the HC11. For example, the first instruction ldaa #12 will result in
          addr    code
         0x0800   0x86
         0x0801   0x0C
      
    2. How many instruction cycles will it take the HC12 to execute this program? (Do not consider the swi instruction.) How long will this take on an HC12 with an 8 MHz E-clock?

  6. Consider the program of Figure 3 of Lab 2.
    1. How many instruction cycles will it take to execute this program?
    2. How long will this take on your EVBU? (Do not consider the swi instruction.)


Bill Rison, <rison@ee.nmt.edu >