ALU/FPU register width performance impact on big number computing?

  • Thread starter Thread starter Bubba
  • Start date Start date
B

Bubba

Greetings to everyone,

If we take a processor with 16bit precise ALU and try to compute a
factorial (n!) form 2^80, what happens with ALU then? To be more precise,
does ALU width (precision) limits it from computing numbers higher than it
can allocate and how (if?) does it impacts performance of integer
computing? In other words, how come it is possible to compute very large
number if ALU is not precise enough for them (or my calculator is being
dishonest).

I hope I made my point clearly enough. Thanks in advance.
 
from the said:
Greetings to everyone,

If we take a processor with 16bit precise ALU and try to compute a
factorial (n!) form 2^80, what happens with ALU then? To be more precise,
does ALU width (precision) limits it from computing numbers higher than it
can allocate and how (if?) does it impacts performance of integer
computing? In other words, how come it is possible to compute very large
number if ALU is not precise enough for them (or my calculator is being
dishonest).

All sensible math packages (for big numbers) break the calculation up
into smaller sized (i.e. 16 bit, 32 bit, whatever) pieces. Some simple
ones designed for very long numbers actually work in binary coded
decimal, and do long multiplication the 'very hard' way.

BTW, even 16 bit ALUs generally have a 16bit*16bit multiply, which will
give a 32 bit answer (in two registers).

Google is your friend (and yep, this sounds suspiciously like a homework
assignment, so hints is all you get).
 
Bubba said:
Greetings to everyone,

If we take a processor with 16bit precise ALU and try to compute a
factorial (n!) form 2^80, what happens with ALU then? To be more precise,
does ALU width (precision) limits it from computing numbers higher than it
can allocate and how (if?) does it impacts performance of integer
computing? In other words, how come it is possible to compute very large
number if ALU is not precise enough for them (or my calculator is being
dishonest).

I hope I made my point clearly enough. Thanks in advance.

The really large numbers (or the really small ones too) are worked on
inside the FPU rather than the ALU. The floating point unit gives up
some level of precision for some flexibility in estimation.

Yousuf Khan
 
Greetings to everyone,

If we take a processor with 16bit precise ALU and try to compute a
factorial (n!) form 2^80, what happens with ALU then? To be more precise,
does ALU width (precision) limits it from computing numbers higher than it
can allocate and how (if?) does it impacts performance of integer
computing? In other words, how come it is possible to compute very large
number if ALU is not precise enough for them (or my calculator is being
dishonest).

The same way you do arithmetic only knowing the 9x9 tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top