Midterm Exam, CSCI 312, Spring 2008


  1. (6 points) Give the boolean expression, truth table and circuit for "a is b and c"
  2. (4 points) Simplify the expression x = a(b+c) + b(a+c)
  3. (15 points) Parity is a way to test if a bit string transmitted through a network contains an error. In a 4 bit string, the parity is even if it contains 0, 2 or 4 ones. The strings 0000, 0101, 1100, and 1111 are examples of strings with even parity. Design and implement a circuit which takes 4 bits and outputs a 0 if the parity is even and a 1 otherwise.
  4. (10 points) Describe the relationship between machine language, assembly, and high level languages. How is a program in one form translated into another?
  5. (12 points) Give an example of the MPIS lw instruction.
    1. Explain how this instruction is represented in machine language.
    2. Explain what the fields of this instruction represent
    3. Explain what this instruction does.
  6. (10 points) Show how to implement an if then else statement in MIPS assembly language.
  7. (13 points) Write a program in MIPS assembly language to print all odd numbers between 2 and 15.
  8. (10 points) How does the instruction set specification impact the design/implementation of the hardware? (consider the ALU) Give an example and provide a clearly explanation.
  9. (10 points) How do hardware consideration impact the design of an instruction set? Give an example and provide a clear explanation.