Danny Tervooren
CS-005-1
Assignment #3
9/26/06
Ch. 5: 2, 9, 15, 16
Ch. 6: 4, 6, 11, 15, 18
2.) a.) 20 bits
b.) 24 bits
c.) 27 bits
d.) 30 bits
9.) The multiplexor circuit would need twenty input lines numbered 0-19
15.) a.) 26 = 64 operation codes
b.) 218 = 262,144 bytes
c.) 6+18+18 = 42/8 = 5.25 = 6 bytes
16.) a.) 0 LOAD 202
1 SUBTRACT 203
2 ADD 204
3 STORE 200
b.) 0 LOAD 201
1 ADD 202
2 STORE 201
3 LOAD 203
4 ADD 204
5 STORE 203
6 LOAD 201
7 SUBTRACT 203
8 STORE 200
c.) 0 COMPARE 200, 202
1 JUMPLT 5
2 LOAD 203
3 STORE 202
4 JUMP 7
5 LOAD 204
6 STORE 202
7
d.) 0 COMPARE 203, 204
1 JUMPGT 9
2 LOAD 203
3 ADD 201
4 ADD 204
5 STORE 203
6 LOAD 204
7 ADD 200
8 STORE 204
9
4.) a.) R: 472 60: 472 61: -1
b.) R: 472 60: 472 61: -1
c.) R: 944 60: 472 61: -1
d.) R: 944 60: 472 61: -1
e.) R: 944 60: 472 61: 50
f.) R: 944 60: 472 61: 50
6.) If we accidentally executed the data: .DATA 16387, the binary representation of 16,387 would be put into the 12-bit address and spill into the 4 bits of the op code, resulting in the machine language instruction 0010 000000000011. This would effectively tell the machine to clear (0010) the decimal number positive 3 (000000000011).
11.) The statement CLEAR SUM in line 2 is necessary, as there may be a running sum left in the program from the last time it was run (if it has been run before). The statement LOAD ZERO is also necessary, as there may be a value already existing in register R.
15.) AGAIN: 3
ANS: 8
X: 9
ONE: 10
18.) In case of memory loss/erasure in machine operator due to various conditions (e.g., synapse-damaging concussion, death, simple forgetfulness, etc.), information may be irrecoverable without the forgotten password. Furthermore, passwords can be hacked without extreme difficult on the part of skilled hackers, resulting in undesired information loss and crude messages, such as, ÒYouÕve been h4x0rÕd.Ó Possible alternative means of access limitation may include data encryption with decoders given to those authorized to access the information, or thumbprint/retinal scan matching to ensure authorized access. Such safeguards would be appropriate in applications for which the value of safeguarding the information exceeds the cost of implementing its safeguarding (issues of national security/public safety, banking, etc.).