CS 238 – Assembly Language Programming
Fall 2019
Assignment 1
(Due: September 10, 2019)
Submission Instructions: Online submissions on Blackboard are
preferred. Feel free to edit this Word document to insert your
answers. Multiple online submissions on Blackboard are allowed, but
only the last online submission made by the midnight of September
10 will be graded. Alternatively, a paper submission is possible,
but it needs to be done in class on September 10.
1. Data can be interpreted as required by the programmer.
Depending upon context, a number can be interpreted as a signed
integer or a positive unsigned integer.
a) [4 marks] Provide the result of the following sum using
Hexadecimal addition
0xFEB + 0x00A =?
b) [2 marks each] In this problem 0xFEB can be interpreted as
an unsigned positive integer, or the 16s complement representation
of a signed integer.
i. Provide the unsigned decimal interpretation of 0xFEB:
ii. Provide the unsigned decimal interpretation of the result
of 0xFEB + 0x00A:
iii. Provide the signed decimal interpretation of 0xFEB:
iiii. Provide the signed decimal interpretation of the result
of 0xFEB + 0x00A:
2. [5 marks each] Subtracting a larger number from a smaller
number can be formulated as adding the complement of the larger
number to the smaller number. Provide solutions for the following
problems and show your steps.
a) Perform 16s complement subtraction of the following
problem. Convert the result back and provide the resultant signed
hexadecimal value: (show your steps)
0x123 – 0xABC =?
b) Perform 10s complement subtraction of the following
problem. Convert the result back and provide the resultant signed
decimal value: (show your steps)
567 – 4071 =?
3. [7 marks each] Provide the results and show your steps for
the following problems.
a) Provide the result of the following hexadecimal
multiplication: (show your steps)
0x3FA * 0x77 =?
b) Provide the result of the following binary division: (show
your steps)
=?