COMP 200 - Assignment #3
COMP 200 - Assignment #3
328)
4. Assume that memory cell 60 has the value 472, memory cell 61 has the value –1, and
register R has the value 13. Using the instruction set in Figure 6.5, what are in
register R, and memory cells 60 and 61 after completing the following operations?
Assume that each instruction starts from the above condition.
b. STORE 60 13 13 –1
R → CON(60)
d. COMPARE 61 13 472 –1
CON(61) < R → LT = 1 (LT = 1)
f. OUT 61 13 472 –1
CON(61)
Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.
Assignment #3 – Chapter 7 (pg. 384)
Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.
Assignment #3 – Chapter 8 (pg. 417)
2. Using the hash function in Section 8.2.1, find the encrypted forms of the passwords:
fido, blank, ti34pper. The steps in the hash function on page 391 are:
1) Replace each letter with the number of its place in the alphabet; leave digits as is
2) Add digits from Step 1 to get a single integer
3) Divide integer from Step 2 by 7; find the remainder
4) Add 1 to integer from Step 3; multiply by 9
5) Reverse digits in integer from Step 4; replace digits with its letter of the alphabet
Schneider, G. M., & Gersting, J. L. (2012). Invitation to Computer Science (6th ed.). Cengage Learning.