Exercise 2         Name       _______________________   Points __/24

1. (9 points) Fill in the blanks in the following table (the first row is completed as an example):
 

Eight-Bit Binary
   Bit Pattern

    Modulo 28
Interpretation

Two's Complement
    Interpretation

  IBM Extended
ASCII 

   11100000

       224

        -32

         a

 

        71

 

 

 

 

        -118

 

  10000011

 

 

 

2. (2 points) What is the range of integers that can be represented with 32-bit binary numbers using:

    a) the modulo 232  number system (i.e. unsigned 32-bit numbers)?

    b) the two's complement number system?

3. (1 point) Translate the following character string to four 8-bit binary codes using the extended ASCII character code table.

        B9j (translate each of the four characters into their binary ASCII values)
 
 

4. (2 points) Perform the following arithmetic representing the numbers using 8-bit binary. Use two's complement representation for negative numbers. An example has been completed.

                        Binary        1's Comp      2's Comp

                                    (intermediate step)


    -15   -(00001111)   11110000     11110001
    +13  = +00001101 = +00001101+00001101
     -2    -00000010    00111101     11111110
 
 

a)    11                                b)    -22
     -17                                      +12
 
 

 

 

5. (4 points) Show the stack after the execution of the instructions at left.

Mov    eDx, 8675h           Address Stack Before      Stack After Push
Mov    eBx, 0309h            000C       8675
Push   eDx           eSP->   0008       0309
Push   eBx                   0004       2112
Pop    eDx                   0000       9999      

6. (6 points) Show the stack, eBx, and eDx after the execution of the instructions at left.

Mov    eDx, 0090h           Address Stack Before      Stack After Pop
Mov    eBx, 0D00h            000C       8675   
Pop    eDx                   0008       0309 
Pop    eBx                   0004       2112
Push   eDx            eSP->  0000       9999
 
eDX =         
eBX =