Hii
I want to compare two floating point IEEE754 numbers
For this which is efficient hardware design
one with normal comparator like ( just comparing sign, exponent, mantissa of both operands with < == > sign )
or with subtraction method ( operand1 - operand2 depends on result one can decide which is greater or smaller or both are equal )
That is a completely different question. If a CPU already has the hardware for subtraction in the ALU, why use additional hardware for implementing a different type of compare?
That is a completely different question. If a CPU already has the hardware for subtraction in the ALU, why use additional hardware for implementing a different type of compare?
thanks std_match
(I am already having subtraction unit in design)
So is it the case that if one is having subtraction unit then no need to go for separate unit for compare.?
Because subtraction unit is time consuming than compare unit (more delay or latency). Then I think we have to choose either between hardware efficient or timing efficient. Am I right ...?
If you design hardwired logic there is no penalty for having both a subtraction block and a compare block in the design. A CPU is special because the same ALU is used for all operations. If you have dedicated hardware for each operation, you can select the best hardware for each instance.