Midterm Exam, CSCI 312, Spring 2008
- Make sure you answer each question completely and thoughtfully.
- Please make sure your answers are clearly labeled with the question number.
- Please write neatly and make any diagrams as neat as you can. If I can't read it, it is wrong.
- Point values are listed by each question.
- (6 points) Give the boolean expression, truth table and circuit for "a is b and c"
- (4 points) Simplify the expression x = a(b+c) + b(a+c)
- (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.
- (10 points) Describe the relationship between machine language, assembly, and high level languages. How is a program in one form translated into another?
- (12 points) Give an example of the MPIS lw instruction.
- Explain how this instruction is represented in machine language.
- Explain what the fields of this instruction represent
- Explain what this instruction does.
- (10 points) Show how to implement an if then else statement in
MIPS assembly language.
- (13 points) Write a program in MIPS assembly language to print all odd numbers between 2 and 15.
- (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.
- (10 points) How do hardware consideration impact the design of an
instruction set? Give an example and provide a clear explanation.