Professional Documents
Culture Documents
Sign Magnitude:: Computer Arithmetics
Sign Magnitude:: Computer Arithmetics
Two’s complement: There is a simple algorithm to convert a binary number into 2’s
complement. To get 2’s complement of a binary number, simply invert the given
number and add 1 to the least significant bit (LSB) of given result.
4. Signed and unsigned number? What are the 4 bits lowest sign number and
highest unsigned number?
Ans: For signed
Highest 4 bits number 0111
Lowest 4 bits number 1000
Highest unsigned 4 bits number 1111
8. What is an Overflow error? How to check the overflow error? What is the
logic to check to generate the overflow bit?
Ans: Overflow occurs when the magnitude of a number exceeds the range
allowed by the size of the bit field. The sum of two identically-
signed numbers may very well exceed the range of the bit field of those
two numbers, and so in this case overflow is a possibility.
addition – same sign overflow occur . example : (+a)+(+a)= - a (-a)+(-a)=+a
Subtraction _ different sign overflow occur . example : (+a)-(-a)=-a (-a)-
(+a)=+a
1. What is Datapath?
Ans: A datapath is a collection of functional units such as arithmetic logic units or
multipliers that perform data processing operations, registers, communication buses
and ALU.
2. What is control?
Ans: Datapath for each step is set up by control signals that set up dataflow directions on
communication buses and select ALU and memory functions. Control signals are generated by a
control unit. OR
A control unit or CU is circuitry that directs operations within a computer's processor. It lets the
computer's logic unit, memory, and both input and output devices know how to respond to
instructions received from a program. Examples of devices that utilize control units include
CPUs and GPUs.
4. How many cycles are required to run one instruction in a single cycle
datapath?
Ans: 1clock cycles are required to run one instruction in a single cycle
datapath.
23. How does ALU control unit generate the 3 bits input signal for ALU?
Ans:
24. How many signals are generated by the Main control unit?
Ans:
1. What is a pipeline?
Ans: Pipelining is a technique where multiple instructions are overlapped during
execution. Pipeline is divided into stages and these stages are connected with one
another to form a pipe like structure.
16. What is the task of the Hazard detection unit? How does it detect control
hazards?
Ans:
17. What is the task of the Forwarding unit? How does it solve the data hazard
problem?
Ans:
18. What is for IF.Flush signal?
Ans:
21. During Forwarding if hazard occurs in both EX/MEM and MEM/WB registers
rd, which one value will be forwarded?
Ans:
24. How does control hazard detect and make pipeline workable using NOP
instruction?
Ans:
26. Why does in the pipeline all instruction must have 5 stages? What is the
problem if anyone does not maintain all 5 stages?
Ans: