Quiz 8.6

DIRECTIONS: Read each question carefully. Then click on the dot next to the answer that most closely fits the question. Try to answer all questions on this quiz and when you are done, click on the grade me button at the bottom.


Coverage: Section 8.6

  1. How do computers quickly multiply by 4?
right shift by 2 bits
right shift by 4 bits
left shift by 2 bits
left shift by 4 bits

  1. Which C statement is implemented by the following CSC-1 program fragment?
                  LDI 1000
                  ADD 2000
                  A2S
                  LOD 2500
                  STS
                  ...
           1000   NUM  (array stuff begins here)
                  ...
           2000   NUM  (value of i)
                  ...
           2500   NUM  (value of j)
    
stuff[i] = j;
stuff[j] = i;
i = stuff[j];
j = stuff[i];

  1. Which kind of memory addressing is most common in personal computers as well as mainframes today?
bit-addressable
byte-addressable
word-addressable (where 1 word > 8 bits)

  1. Which kind of memory addressing would have the shortest memory addresses?
bit-addressable
byte-addressable
word-addressable (where 1 word > 8 bits)

  1. In the CSC-1, which register holds the address when LDS and STS are being executed?
A
S
PC
IR
Questions 6 and 7 deal with the following picture of an array in memory:
GIFs/array.gif

  1. What would be the base addressing be?
0
9
1000
1009

  1. Which C declaration would match the picture?
int stuff[0];
int stuff;
int stuff[9];
int stuff[10];