Intro to Architecture

Spring 2002, Test 1


  1. Encoding (10 points)
    1. Define encoding.
    2. Give an example of an encoding.
    3. Why is an encoding formed?
  2. Binary (5 points) 101110112 represents an unsigned number, convert it to:
    1. Decimal
    2. Octal
    3. Hexadecimal
    4. Describe how to covert this number to base 7
  3. Signed Numbers. (5 pts)
    1. How many numbers can be represented with 5 bits?
    2. What range of unsigned numbers can be represented with 5 bits?
    3. What range of twos complement numbers can be represented with 5 bits?
    4. Give the extremes of the range mentioned above.
  4. Two's Compliment (15 pts)
    1. Represent -9 in 5 bit twos compliment form.
    2. Represent 7 in 5 bit twos compliment form.
    3. Represent -7 in 5 bit twos compliment form.
    4. Add -9 + 7 in 5 bit twos compliment form, convert the result to decimal.
    5. Add -9 + -7 in 5 bit twos compliment form, convert the result to decimal.
    6. Explain the answer in part 5 above.
    7. How can you detect overflow when using twos compliment arithmetic?
  5. Huffman Code (10 pts)
    1. How many bits are required to represent an alphabet of 10 letters with a fixed length code?
    2. Describe the algorithm for building a Huffman code.
    3. A Huffman code to represent a 10 character alphabet may encode the last two letters with 9 characters. Will messages stored in this code ever take less space than the fixed length code above? Justify your answer.
  6. Circuits (5 pts)
    1. What is a sequential circuit?
    2. What is a combinational circuit?
    3. What is the difference between the two?
  7. Basic Circuits (5 pts)
    1. Give the gate, truth table, and boolean expression for and.
  8. Full Adder. (10 pts)
    1. Using the basic gates (and, or, not, xor), draw the circuit for a full adder.
    2. Discuss how to measure the time it takes for a full adder to perform its function.
  9. Flip Flops (10 pts)
    1. Describe the operation of a D flip flop
    2. Draw a D flip flop.
    3. Give a timing diagram that demonstrates the behavior of a D flip flop. (You should demonstrate when the input of the flip flop effects the state of the flip flop)
  10. Registers (15 pts) Draw a 3 bit register that supports load, shift left and shift right. (You should have a load/not shift control line, and a right/not left control line.).
  11. Memory (10 pts)
    1. What is memory cycle time?
    2. What is memory access time?
    3. Describe the relationship between the two.