Professional Documents
Culture Documents
Solution CS301-hw2
Solution CS301-hw2
Solution CS301-hw2
Assignment # 2
1. (3 pts) Briefly describe the main functionality of the program counter register (PC), the instruction
register (IR), and the fetch-execute process in a computer.
- The main functionality of the Program Counter (PC) register: It holds the address of the next instruction to
be executed in the computer.
- The functionality of the Instruction Register (IR): It holds the current instruction being executed in the
computer.
- The fetch-execute process: It refers to the computer's process of fetching instructions from memory and
executing them in a sequential manner. The PC register and the IR are used in this process to determine and
fetch the next required instruction from memory.
2. (2.5 pts) Describe two advantages for programming in assembly and two advantages for
programming in a high-level language.
Advantages of programming in assembly:
1. Fine-grained control: Assembly language provides a higher level of control and direct access to internal components
of the computer, such as registers and memory addresses.
2. Efficiency: Assembly programs can achieve high performance and efficient resource utilization, as they can execute
instructions written in assembly language quickly and effectively.
Q.4. (4.5 pts) Find the word or phrase from the list below that best matches the description in the following
questions. Each answer should be used only once.
b) Computer inside another device used for running one predetermined application or collection of software.
Embedded system.
c) Interface that the hardware provides to the low-level software. Instruction set architecture.
e) Microscopic flaw in a wafer. Defect.
f) Percentage of good dies from the total number of dies on the wafer. Yield.
h) Thin disk sliced from a silicon crystal ingot, which will be later divided into dies. Wafer
i) Component of the processor that performs arithmetic operations. Datapath
j) Component of the processor that tells the datapath what to do according to the instructions of the program.
Control
n) Program that converts symbolic versions of instructions into their binary formats.
Abstraction. Assembler.