Intro to Architecture
Fall 2003, Final Exam
- 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.
- Unreadable or incomprehensible answers will receive no credit.
- (7 pts) A keyless entry system has a special embedded CPU to support its
operations. The system receives a command from a key fob, and performs
the action specified by the command. Design a machine language for
this CPU. Discuss the reasons behind your design. The commands are:
- Unlock Trunk
- Unlock Doors
- Open Trunk
- Open Door N (N= Driver Front, Passenger Front, Driver Rear,
Passenger Rear, ALL)
- Start Engine
- (5 pts) The x86 processor is capable of addressing two bytes of
memory without respect to alignment, but this costs an extra memory
cycle. What does this mean? Give a plausible explanation for the
extra cost.
- (3 pts) Most sparc assemblers provide for pseudo-ops or
operations such as
Clear R3
Copy R2, R2
which are not
implemented in the ISA, but are useful for programmers. Why does
the ISA for the sparc lack these instructions?
- (5 pts) Use the conditional sum algorithm to add 101001012 and 101001102
- (5 pts) What is a floating point number? Describe how to represent a
floating point number in a computer. Give the format for an IEEE 754
floating point number, you may ignore the denormals.
- (5 pts) We discussed three types of hazards in a pipelined machine. Name and describe one. Describe how this hazard can be overcome.
- (5 pts) Describe what is required in an assembly language/machine implementation to support a language that has recursive subroutines.
- (10 pts) The instruction
Load R2, R3[R4]
will load the
memory contents at R4+R3 into R2. Discuss how this example can be used
to support the following programming language constructs
- Pointers
- Arrays of integers
- Structures
- Arrays of Structures
- (5 pts) Describe the differences between CISC and RISC architectures.