woodylcy wrote
So shall I test these conditions in my program?
In addition, we know R0 R1 is 16 bits, So R0*R1, we should use 32 bits to store the result. So how Can I store the result ?
The book says that we may assume that these conditions
R0>0,
R1>0,
R0*R1<32768
hold for all inputs that our program is going to receive from the test script. Therefore, you don't need to test the initial values, nor do you need to worry about answers that are greater than 15 bits.
--Mark