http://windows.microsoft.com/en-US/windows-8/upgrade-to-windows-8
you need to install the UPgrade assistant, after it checking your system you can buy one. You then save it to .iso or on USB instead of installation.
Then you got the code, the .iso so you can install on any machine.
The 32 or 64 bit will determined by the machine you launch your assistant on.