How efficient is your code – Processor: 32 or 64 bit

In the last post I gave a overview of what processors are, and what are they capable to do. In this post

  • What is 32 bit or 64 bit systems?
  • Which  is better 32 or 64?

In the last post  we discussed that the processor does the following tasks:

  1. Fetch the  instruction and store it memory
  2. Decodes all instructions to Assembly level, Assembly level are then decoded to machine level for Processor to understand
  3. Executes instruction
  4. Stores the resulting output to the memory

So before actually executing the instruction, the processor needs to keep the instruction in a place where it can be fetched in a nimble. So it stores it in Registers. Registers are part of processors, and the smallest storage unit. It can hold instructions, Memory addresses or data. So basically the size of the registers decide how much data can the processor can hold/process. So when we say 32 bit processor, What really mean is the registers are 32 bits(4 bytes) i.e.. at an instant the processors registers can internally hold /process 32 bit of information. Similarly a 64 bit processor means that the internal registers can hold/process 64 bit information( or 8 bytes).

So which is better 32 or 64?

64 bit can hold more data, It can take a lot of information from RAM and queue it for processing as compared to 32 bit. A 32 bit can only hold 4 GB’s of RAM, but theoretically a 64 bit can hold is 16.7 million TB’s(Terabytes) that’s a really big number, this is one of the major advantages of 64 bit. Now as we have more RAM, our focus is to use it efficiently.

On a 64 bit system you can install a 32 bit OS(Operating System). It works because x64(64 bit) is an extension of x86(32 bit) architecture( Issue: Only 4GB RAM will be utilized, we are not using it to its full potential )

One another advantage is that 64 bit systems have Patch guard, which basically prevents programs and drivers from modifying the Kernel(central part of OS, managers the operations).

Leave a Reply