COP3402, Fall 2000, Assignment 1
Due Wednesday, 9/14 at the start of class
Instructions for handing in the homework
-
All solutions must be typed. Show your work for partial credit. I will not
accept a homework if it is not typed. Be sure that your name is on the printout.
You must attest that you did the homework on your own.
-
Hand in a printout of the assignment at the start of class. Sign the printout.
-
Upload a text version of the assignment via the web. If you use a word processor
to do the homework, be sure that you save the file as text, not in the word
processor's format.
Submitting
homework on-line.
For the following numbers
-
b means binary
-
h means hex
-
d means decimal.
-
(1 point) What 20-bit address is specified if the CS register holds 1B73h,
and the IP register holds 70EFh?
-
(1 point) What is the difference between SRAM and DRAM?
-
(6 points) Perform the following arithmetic. For each one, assume that no
more digits can be displayed than are already shown. Also for each number,
indicate what the Carry and Overflow bits would be in the flags register.
-
-
-
(2 points) What decimal number does each of the following SIGNED numbers
represent?
-
(8 bits) 11010011b
-
(32 bits) FFFFFFE4h
-
(4 points) Perform the following conversions. Assume the numbers are
unsigned.
-
Change AFFDh to binary
-
Change 111010001b to hex
-
Change 399d to binary
-
Change 753d to hex
-
(1 point) What is the range of signed numbers that can be represented
in 16 bits?
-
(1 point) What is the range of unsigned numbers that can be represented
in 8 bits?
-
(2 points) Write the Assembler commands that will do the following. I want
one command for each step, do not combine 2 steps into 1. Assume that all
numbers are in hex.
-
Initialize the ax register to 20
-
Add F to the ax register
-
Initialize the bx register to 4E
-
Subtract 40 from bx (use the SUB instruction)
-
Subtract bx from ax
-
Store ax into memory, at a reasonable location
-
Terminate the program
-
(2 points) Write the equivalent machine code program for the assembler code
that you wrote in question 10. List the machine code for each instruction
next to each assembly instuction as I did in class, and as is shown in the
text. (Hint: use debug. However, only list the machine code for your
instructions.)