My solutions to the homework exercises appear in these
boxes below the problem.
Enjoy... yow, bill |
1. Complete problem 1 on page 113. Hint: nano-seconds are 10^-9 seconds, and MIPS are 10^6 instructions per second
Execution of a single instruction will take:
With the time per instruction, take the inverse to get the instructions per second (adjusting units to MIPS):
|
2. Complete problem 11 on page 114
The "trick" to these problems is recognizing that
an n-bit memory address allows 2^n cells. It is not "possible"
to address more cells than this and it's not "reasonable" to
waste address bits and address fewer cells. The cell size has no
relationship to the number of bits in the address.
a. 10 bit address, 1024 cells, 8 bit cell size
b. 10 bit address, 1024 cells, 12 bit cell size
c. 9 bit address, 1024 cells, 10 bit cell size
d. 11 bit address, 1024 cells, 10 bit cell size
e. 10 bit address, 10 cells, 1024 bit cell size
f. 1024 bit address, 10 cells, 10 bit cell size
|
3. Complete problem 13 on page 115
Memory amounts are typically powers of 2 because an n-bit address can access 2^n cells. Of course, memory/computer manufacturers aren't dumb, and the powers of 2 have been rounded to their closest decimal value:
- 10 address bits gives 2^10 1 byte cells = 1KB (kilo-byte)
- 20 address bits gives 2^20 1 byte cells = 1MB (mega-byte)
- 28 address bits gives 2^8 * 2^20 1 byte cells = 256 MB
- 30 address bits gives 2^30 1 byte cells = 1GB (giga-byte)
4. Complete problem 29 on page 116
Even though a bit map terminal can display 2^24 different
colors, it can only display 2^8 (256) different colors at one time. The
choice of these colors is made using a color palette which is an
index that maps each 8 bit color number to a 24 bit RGB (yes, 8 bits for
each color: red, green, blue) value. Get it?
BTW, this method is also used by the GIF image file format that is prominently used on the web. |
5. Complete a Hamming code for 4 data bits using the Venn diagram approach on page 63. This should require 3 check bits.
Yes, peek at the Venn diagrams on page 63. It has 7
regions. The A, B and C regions will be used as the 3 parity bits that
comprise the code. The 4 intersection regions (AB, ABC, AC, BC) will map
onto the 4 bits of the data value: bit 1 is AB, bit 2 is ABC, bit 3 is AC,
bit 4 is BC. This mapping is arbitrary; you just need to be consistent
once you chose what bits are assigned where.
With this mapping, the 3 code bit for each 4 bit data value can be determined. Each parity bit is assign 0 if there are an even number of 1's in its region and 1 if there are an odd number of ones. Let's try a couple:
Continue is the same fashion for the rest of the data values. The result of this is shown in the table below:
Now, let's see if this puppy works. If the original data word is 0000 and, through some error, a value of 0001 is received, then:
One more try. If the original data word is 1111, and a value of 0111 is actually received, then:
|