CS 282 Winter 2003
Assignment
1
1/29/2003
Due date: 2/5/2003 12:30 PM
- (10
points) Assume that an instruction fetch, single operand load, or
storage of a result takes 7 time units to complete. Instruction decode, operation
execution, and program counter update each take 1 time unit to complete.
How long does it take to execute the following code sequence?
mul A, B, C
div D, E, F
add X, A, B
- (5 points) Explain briefly the process of
translation from a high level language to machine language. Where and how
do a compiler and an assembler fit into this process?
- (3 points) Convert the following numbers into
decimal system:
- 1110 11002
- 0xABF16
- 012678
- (10 points) Convert 104410 into
- Octal system and
- Hexadecimal system,
using
Subtraction of Powers method. Please show the steps involved.
- (6 points) Problem 3.12 in textbook,
page 81, chapter 3
- (1 point) Convert 8A716 into
octal system, using the ‘Powers of Two’ special conversion technique (That
is, notice that both the bases 16 and 8 are powers of two and use the
technique we discussed in class.)