Most of the operations in computers are using floating-point arithmetic, and why a Floating Point Unit alone is not sufficient? Can we do away with ALU? Is FP operations are resource-intensive alone be the reason for this, over the advantages provided by FP operations?

  • 1
    $\begingroup$ Why do you think "most of the operations in [a] computer are using floating point arithmetic"? $\endgroup$ – Paul A. Clayton Mar 17 '17 at 23:29
  • $\begingroup$ Please read the comment on Quora, partirularly of Victor Eijkhout, which is the third answer from top. He clearly mentioned that integer operations are minority (compared to FP operations). quora.com/… $\endgroup$ – VEERARAGHAVAN JAGANNATHAN Mar 19 '17 at 5:40
  • $\begingroup$ It depends on the use of the computer. For the one currently viewing that webpage, there is probably more than 95% of integer operations. $\endgroup$ – TEMLIB Mar 19 '17 at 10:55
  • $\begingroup$ Thank you and I agree. I am talking about theoretical possiblity. It may not be a viable option in several fronts, however, it is a good option for scientific and numeric heavy tasks. $\endgroup$ – VEERARAGHAVAN JAGANNATHAN Mar 20 '17 at 12:37

Any 64 bit integer can be represented as an 80 bit IEEE 754 extended precision floating point numbers. Many processors (PowerPC and POWER, ARM) don't support extended precision floating point, so there is your first argument gone. They can't represent every integer number as a floating point number.

Most operations on integers can be done very cheaply with integers represented in an integer format, but are much more expensive if you try to implement them with numbers in a floating point format. That will reduce your clock speed and at the same time raise energy consumption, costing you battery life on any portable device.

  • $\begingroup$ Thanks for the reply. However, from your reply, if the CPU supports IEEE 754 extended precision FP numbers it is possible to design the CPU with FPU alone, ignoring the disadvantages like reduced clock speed etc. Am I right or Am I missing something? $\endgroup$ – VEERARAGHAVAN JAGANNATHAN Mar 19 '17 at 5:28
  • $\begingroup$ SHARC DSPs from Analog Devices are examples of CPUs with shared ALU/FPU. They supports 32bits integers and single precision IEEE, they had to extend the mantissa to 32bits (=40bits floats) to have the same resolution for integers and floats. $\endgroup$ – TEMLIB Mar 19 '17 at 10:50
  • $\begingroup$ Thank you TEMLIB for the informative reply. However, I want to know whether it is possible to design a processor with FPU alone for such tasks. Is it theoretically possible? I am a CS newbie, and zero knowledge in processor or Electrical Engg. Principles. It is a question out of curiosity. $\endgroup$ – VEERARAGHAVAN JAGANNATHAN Mar 20 '17 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.