Assignment 1

In this assignment, you will implement conversions to and from binary, write very short machine language programs, write code generators to generate machine language from assembly language, and write simple assembly language programs.

In Assembler.scala, complete the implementation of:

  1. decodeUnsigned
  2. decodeSigned
  3. encodeUnsigned
  4. encodeSigned

In A1.scala, complete the implementation of:

  1. setMem
  2. returnTo31
  3. add134

Back in Assembler.scala, complete the implementation of ADD and the other instruction generation methods that come after it.

Back in A1.scala, complete the implementation of:

  1. maximum
  2. addOne
  3. followingAddress