How ALU actually does if we need to compute power of 2 (2ˆ32) in a 32-bit system,is it possible? In simple terms, say I have to compute power with a given base,then if the result of computation is greater than the number of bits that the computer can handle at a time (known as word),I am confused as I belong to high level programming only and curious to know about it.
Asked
Active
Viewed 103 times
1
-
Two 32-bit registers are often used for 64-bit numbers. Larger than that, a "Bit Int" library is often used. There is a ton of information out there about this, you just need to do some research and reading. – Jonathon Reinhart Nov 19 '13 at 09:17
-
@JonathonReinhart thanks for your answer. Is it for 32-bit architecture (Two 32-bit registers)? – Parveez Ahmed Nov 19 '13 at 09:19
-
Yes. For example x86 (before x86-64 came around). The general purpose registers are all 32 bits. – Jonathon Reinhart Nov 19 '13 at 09:20
-
@JonathonReinhart ohhh yes,thanxxxx again. I studied a bit in college,but my specification was software engineering,so these things are left to electronics department or so... :) but they go hand in hand with one another... – Parveez Ahmed Nov 19 '13 at 09:32
-
possible duplicate of [How does a processor calculate bigger than its register value?](http://stackoverflow.com/questions/17205968/how-does-a-processor-calculate-bigger-than-its-register-value) – Jonathon Reinhart Nov 19 '13 at 09:33
-
@JonathonReinhart How computer stores a float value,for example if I have to store 2147483648 as a float,then it would be something like 2.147483648*10ˆ9 which is converted into binary equivalent? I have been trying to learn it for sometime now but not able to wrap it yet. – Parveez Ahmed Nov 20 '13 at 11:50