csci 10 :: book learning challenge 8 (due mon, oct 17)

Complete this exercise on your own.

Fill in all of the "Answer" boxes, then print the answer grid that you see after you press "Prepare for printing".

Staple all pages together and submit to the instructor on the date listed above.

Questions:

Read AoA V1 3.7, binary addition and answer the following:

1. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1111_0000, al);
and(%0000_1111, al);
2. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1010_1010, al);
and(%0101_0101, al);
3. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1001_1001, al);
and(%0000_0001, al);
4. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1111_0000, al);
or(%0000_1111, al);
5. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1010_1010, al);
or(%0101_0101, al);
6. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%0000_0000, al);
or(%0000_0001, al);
7. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1010_1010, al);
xor(%0101_0101, al);
8. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1111_0000, al);
xor(%0000_1111, al);
9. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%0101_0101, al);
xor(%0101_0101, al);
10. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%0000_0000, al);
not(al);
11. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1100_0011, al);
not(al);
12. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%1010_1010, al);
13. What is the value of AL after the following instructions? Write your answer in binary, preceding the binary value with % and separating each nibble with an underscore.
mov(%0000_1111, al);
14. What is the output of the following code?
mov(%1111_1111, al);
if (@c) then
stdout.put("OVERFLOW ");
endif;
stdout.put(al);