1. (9 points) Fill in the blanks in
the following table (the first row is completed as an example):
|
Eight-Bit Binary |
Modulo 28 |
Two's Complement |
IBM Extended |
|
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.
B9√j (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 PushMov eBx, 0309h 000C 8675Push eDx eSP-> 0008 0309Push eBx 0004 2112Pop 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 PopMov eBx, 0D00h 000C 8675Pop eDx 0008 0309Pop eBx 0004 2112Push eDx eSP-> 0000 9999eDX =eBX =