Amazon Interview Question
Country: India
32-bit systems can address 4 GB of memory in one go (2^32), 64 bit can address 2^64 bits(16 exbibytes ). If a processor is 64 bit and you are running a 32 bit os, the os will run fine. the extra processing capacity of the processor will be unused. But a 64 bit processor will use all the processing power of the processor.
you cannot run a 64 bit os in a 32 bit processor.
Os all about using the computing capacity of the hardware.
You're a bit low on your addressable range there. You could address 128 GB with 37 bits (4GB *2^5). With 64 bits, the maximum addressable memory is 16 exbibytes (18446744073709.551616 GB).
32 bit and 64 bit OS refers to the number of address spaces that the operating system can access. A 64 bit OS will be able to access more address spaces, so can handle larger data.
If you have a 32 bit OS, any single application can access upto 2GB of space on RAM, which is not the case if you have a 64 bit OS.
For answering this question, first there is need to explain what does 32 in the 32-bit denotes.
- NaMo July 02, 201332 denotes the size of main system bus( including memory bus, io bus etc. ). Its the number of bits that can be processed in parallel. It also denotes the size of registers of the CPU. (means register can process 32 bits per cycle)
So, the 32-bit OS is the os which uses all the 32 bits(all 32 bus line) that are provided by the cpu architecture.
Edit: some more explanation
the OS which is using all 32 bits, can address 2^^32 addresses, can process 32 bits of data per clock cycle. If we are having 64bit processor we can install 32bit os on it(though it would not use hardware optimally) but if we are having 32bit processor we cant install 64bit os on it.