Intro to Architecture
Spring 2002, Test 1
- Please answer all questions carefully and thoughtfully.
- Use as much paper as you wish, but make sure that you label your
answers and that you put your name on the top of each page.
- Encoding (10 points)
- Define encoding.
- Give an example of an encoding.
- Why is an encoding formed?
- Binary (5 points)
101110112 represents an unsigned number, convert it to:
- Decimal
- Octal
- Hexadecimal
- Describe how to covert this number to base 7
- Signed Numbers. (5 pts)
- How many numbers can be represented with 5 bits?
- What range of unsigned numbers can be represented with 5 bits?
- What range of twos complement numbers can be represented with 5 bits?
- Give the extremes of the range mentioned above.
- Two's Compliment (15 pts)
- Represent -9 in 5 bit twos compliment form.
- Represent 7 in 5 bit twos compliment form.
- Represent -7 in 5 bit twos compliment form.
- Add -9 + 7 in 5 bit twos compliment form, convert the result to decimal.
- Add -9 + -7 in 5 bit twos compliment form, convert the result to decimal.
- Explain the answer in part 5 above.
- How can you detect overflow when using twos compliment
arithmetic?
- Huffman Code (10 pts)
- How many bits are required to represent an alphabet of
10 letters with a fixed length code?
- Describe the algorithm for building a Huffman code.
- 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.
- Circuits (5 pts)
- What is a sequential circuit?
- What is a combinational circuit?
- What is the difference between the two?
- Basic Circuits (5 pts)
- Give the gate, truth table, and boolean expression for and.
- Full Adder. (10 pts)
- Using the basic gates (and, or, not, xor), draw the circuit
for a full adder.
- Discuss how to measure the time it takes for a full adder
to perform its function.
- Flip Flops (10 pts)
- Describe the operation of a D flip flop
- Draw a D flip flop.
- 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)
- 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.).
- Memory (10 pts)
- What is memory cycle time?
- What is memory access time?
- Describe the relationship between the two.