11/12/2006


If you understood what is being asked for in Problem 5, then feel free
to delete and move on.  I thought the statement of the problem was clear.
But, since the purpose of the problem set is to help students learn, I would 
rather not have anyone leave this problem unattempted because they did not 
know what we are asking.  (On the exam, you are expected to know what we 
are asking.)

So, ...

A student writes:

hi Dr. Patt,
on #5b problem set 5, we have to write the subroutine that puts the
zero-extended binary number input by the user into R0. that's mean the
user is just supported to type only 1 and 0. what is " at least one 
and no more than 16 zeroes and/or ones?. do we have to echo what in 
R0 finally to the screen?
thanks
<<name withheld to protect one who needs me to make things clearer>>

The point of the problem is to write a program that will take a bit pattern
typed by a user, zero-extend it to 16 bits, and load that 16-bit value into
R0.  The program will accept any bit pattern from 1 to 16 bits and fill in
the remaining bits with 0s.

So, if a user types 111000, the program will load 0000000000111000 into R0.
If the user types 1, the program will load 0000000000000001 into R0.
And, if the user types 1100110011110000, your program should load
1100110011110000 into R0.

Okay?

Good luck with the second exam.

Yale Patt