Coa Unit 2
Coa Unit 2
1. Define Requirements:
Instruction Set Architecture (ISA): Determine the instruction
set the CPU will support (e.g., x86, ARM).
Data Path Width: Decide on the width of the data path (e.g., 8-
bit, 16-bit, 32-bit, 64-bit).
Clock Speed: Determine the clock frequency at which the CPU
will operate.
5. Memory Management:
Implement memory management techniques such as caching,
virtual memory, and memory protection to optimize data access.
7. Interrupt Handling:
Implement mechanisms for handling interrupts and exceptions,
allowing the CPU to respond to external events or errors during
program execution.
9. Optimization:
Optimize the CPU design for performance, power efficiency, and
area (size of the CPU). This may involve various techniques,
including pipelining, out-of-order execution, and speculative
execution.
10. Documentation:
Document the CPU architecture, instruction set, and hardware
specifications for future reference and for programmers who will
write software for the CPU.
Example:
Let's multiply A = 6 (in 4-bit 2's complement: 0110) and Q = -3 (in
4-bit 2's complement: 1101).
1. Initialization:
A = 0110
Q = 1101
Q(-1) = 0
2. Iteration 1:
Last two bits of Q = 01.
Q = Q + A = 1101 + 0110 = 10011 (right shift) = 11001
(after 4 bits).
3. Iteration 2:
Last two bits of Q = 10.
Q = Q - A = 11001 - 0110 = 10111 (right shift) = 11011
(after 4 bits).
4. Iteration 3:
Last two bits of Q = 11.
No operation (right shift) = 11101 (after 4 bits).
5. Iteration 4:
Last two bits of Q = 11.
No operation (right shift) = 11110 (after 4 bits).
6. Result:
AQ = 1111 1010 (in 2's complement form).
Convert to decimal: -10 (in 4-bit 2's complement form).
Note: In this example, since A and Q were different signs, the 2's
complement of AQ (-10) is the correct answer. The final result is
in 4-bit 2's complement form.
Comparison:
Restoring Division: Restoring division always subtracts D from
the remainder R. If R is negative, it adds D instead. This algorithm
requires additional steps to restore R in case of negative results.
Non-Restoring Division: Non-restoring division can either
subtract or add D from R. This algorithm avoids the additional
steps of restoring R and is generally faster than restoring division.
The formula for calculating the actual exponent from the biased
exponent E is: Exponent=E−127 This biased representation
allows for both positive and negative exponents.
Special Values:
Zero: Exponent and fraction bits are all 0.
Denormalized Numbers: Exponent bits are all 0. These
numbers have a hidden bit (implied leading 1) in the fraction.
Infinity: Exponent bits are all 1, and the fraction bits are all 0.
Sign bit determines positive or negative infinity.
NaN (Not a Number): Exponent bits are all 1, and at least one
fraction bit is 1. NaNs are used to represent undefined or
unrepresentable values, like the result of 0/00/0