hw7 - (Least Common Multiple of two numbers 3(20 pts Write...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework seven EECS 203 Due 22 May 2009 1. (10 pts.) For the simple machine we started discussing in class, show reasonable encodings for each of the eight instructions: add, adr1, adr2, adr3 subtract, adr1, adr2, adr3 compare, adr1, adr2, adr3 cjump, adr1, adr2, adr3 jump, adr halt input, adr output, adr For example, the add instruction might have the following encoding: instruction 0–3 4–7 8–11 12–15 add 0000 adr 1 adr 2 adr 3 2. (20 pts.) Write assembly code for the simple machine to compute the LCM
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (Least Common Multiple) of two numbers. 3. (20 pts.) Write assembly code for the simple machine to find the maximum among 10 numbers. 4. (5 pts.) How many bits must the simple machine’s PC register have? Justify your answer in two or fewer sentences. 5. (5 pts.) If you were permitted to make one or two simple changes to the instruc-tion set of the simple machine, what would they be? 1...
View Full Document

This note was uploaded on 01/12/2011 for the course EECS 203 taught by Professor Wu during the Winter '08 term at Northwestern.

Ask a homework question - tutors are online