HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Why a separate ALU is needed, since any integer can be represented as floating point numbers?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
representedwhyneededcanpointfloatinganynumbersseparatesince

Problem

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?

Solution

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.

Context

StackExchange Computer Science Q#71674, answer score: 3

Revisions (0)

No revisions yet.