Danielle Gardner
Fundamentals of Computer Science
Dr Kihlstrom
26 September 2005
Chapter 5 Exc. #2,
9, 15, 16
Chapter 6 #4, 6,
11, 15, 18
2. a. 1 million bytes=
20 bits, because 2^2= 1, 048, 576 which is close to 1 million.
b. 10 million bytes=
24 bits, because 2^24- 16, 777, 216 which is close to 10 million
c. 100 million bytes=
27 bits, because 2^27= 134, 217, 728 which is close to one hundred million bytes.
d. 1 billion bytes=
30 bits, because 2^30= 1, 073, 741, 824 which is close to 1 billion.
9.
You would need a 32 by 5 multiplexor circuit in order to select exactly one of those 20 operations.
Need 20 but 2^4=16, which is not enough to cover 20 operations.
2^5= 32 which will cover all 20 operations.
It will be a 5 input
15. a. For an op code of 6, you would take 2^6= 64 distinct operations.
b. For Address-18 you would take 2^18= 262, 144 which equals the maximum memory size in the machine.
c. For each operation, you would add 6+18+18= 42 bits.
Since there are 8 bits in a byte, then you would divide the 42/8= 5.25
Answer: 6 bytes are required for each operation.
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 4
2 LOAD 203
3 STORE 202
4 JUMP 7
5 LOAD 204
6 STORE 202
7 Next instruction begin new
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 Next instruction begin new
Chapter 6 #4, 6,
11, 15, 18
4. R:13
60: 472
61: -1
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. .
DATA16387= 14 Bits
Since the 16, 387 is 3 over 2^14 if we execute the .data16387 it would spill over from the 12 bit address into 4 bits of op code which would lead to machine language instruction like
0010 000000000011 which would remind the machine that it should clear the decimal number 3, which is represented in the .data16387.
11. The Statement CLEAR SUM on line 2 is necessary because if you do not clear the sum, you might have a sum in there already from a previous operation and that number could get mixed up with the new operation. The Statement LOAD ZERO on line 4 is also necessary because Register R could have already something in it which would affect the operation.
15. Counting out the order of operations:
AGAIN- 3
ANS- 8
X-9
ONE-10
19. Some of the drawbacks in using password to limit access to a computer system would be just general forgetfulness of the user, death or a mental incapability or severe mental limitation. The alternative safeguards might be using a thumb print access guarantee so that the user is guaranteed access unless their fingers have been decapitated. In addition, you could have a password generated from the userŐs blood type, something that will never change and thus register the password. These alternative safeguards would be appropriate in applications where lives are at stake or if a threat to humanity is posted and can be stopped if someone could access the password.