Assignment 7, due Mar 5
Part of
the homework for 22C:122/55:132, Spring 2004
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due on Fridays at the start of class, and unless there is what insurance companies call "an act of God", the only exceptions to this rule will be by advance arrangement.
There is a midterm exam on March 12!
The web version of this material is miserably formatted, as a result of OCR without sufficient proofreading. The presentation is supposed to be a tree saying that 100 percent of the instructions are fetched, 40 percent of the instructions have a source operand and 68 percent have a destination operand (this includes all single-operand instructions). The probabilities of the source modes are about 13, 3, 15, 1, 3, 0, 2 and 0 percent, in order of numerical opcodes - this adds up to 40 percent! The probabilities of the destination modes are about 31, 5, 8, 3, 8, 0, 5 and 1 percent, again in order. the probabilities of the 13 double operand instructions are 5, 2, 3, 0, 0.1, 0.1, 6, 2, 0.4, 0.1, 15, 5 and 0, respectively, in order. This should be enough information to help you decode the really bad formatting of the information in the paper.
a) How many bits should have been devoted to the opcodes of each of the the 2-operand instructions, based on the information from this paper, for an optimal encoding?
b) How many bits should have been devoted to the addressing modes for source and destination addresses in an optimal encoding of the PDP-11 instruciton set. You will need to give two sets of 8 answers, one for source and one for destination, and you will have to fudge the numbers, since the probabilities you were given are absolute and not conditional on the instruction having a source or destination field.
c) What instructions should have been omitted from the instruction set?
d) What addressing modes should have been omitted?