Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

College of Engineering (Top 100, U.S.

News 2016) Department of Electrical and Computer Engineering


ECE 238 – Assembly Language Programming Home Assignment 1

Submission Instructions: Submit the document as one PDF file . 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 11.59 pm of the due date will be graded.

Name:_________________________WSU ID:___________________________________

1. [10 points] Supply the missing two forms for each number(unsigned) in the following table:

Decimal Binary Hexadecimal

E68C

567

FE7

22B8

401

2B1F

1124

CDA

6BD3

C03F

2. [2x2 points] Each of the following hexadecimal numbers can be interpreted as representing a
decimal number or a pair of ASCII codes. Give both interpretations.

a) 4861
Decimal:
ASCII:

Page 1 of 3
College of Engineering (Top 100, U.S. News 2016) Department of Electrical and Computer Engineering
ECE 238 – Assembly Language Programming Home Assignment 1

b) 362B
Decimal:
ASCII :

3. [5x2 points] Find the ASCII codes for the characters in each of the following strings. Don’t
forget spaces, punctuation and special characters contained in the strings. The enclosing
double quotes are not part of the strings.

a) “Assembly rocks!!”

HEX:

b) “21 + 47 – 26 = ??”
HEX:

4. [5x2 points] Compute sum of the following pairs of signed (2’s complement) numbers.
Show the decimal equivalents of each operand and the sum. Indicate if there is overflow.

a. 001010
010110

b. 111111
001101

c. 001100
011111

d. 101001
101101

e. 101001
110001

Page 2 of 3
College of Engineering (Top 100, U.S. News 2016) Department of Electrical and Computer Engineering
ECE 238 – Assembly Language Programming Home Assignment 1

5. [4x4 points] For each of the following pairs of signed integers (2’s complement), subtract the
second from the first. Show the decimal equivalents of each operand and the difference,
Indicate overflow where appropriate

a) 111010
001111

b) 000100
011000

c) 010001
011010

d) 010000
100100

Page 3 of 3

You might also like