Search code examples
c++process32bit-64bitx86-64processor

How to be sure if a processor is 32bits or 64bits ? Are dual core processors 32 or 64 bits?


Having a Macbook Pro with windows installed thanks to bootcamp, I have several questions:

  • Under windows, I see that processes only use 50% maximum of the CPU charge, is that because the processor is a dual core and because the process is not multi-threaded ? Should I install windows xp version 64 bits instead, to have better performance ?

  • Are all dual core processors 64 bits ? How can I check it with C or C++ to be sure that the native is 64 bits and not 32 bits ? I tried to print:

    sizeof(void*);

it says 8, so it would mean 64 bits, but I'm not sure...

  • Does dual core explicitey means that if it has 2 32 bits cores, the processor itself supports 64bits instructions ? Is this the x86_64 architecture ?

  • Is is delicate to emulate PS2 games because the original game has 128 bits instructions ?

  • Why are long double 128 bits while

    sizeof(long long); sizeof(long);

both output the same thing ?


Solution

    • Yes 50% is maximum use for a single thread. No 64 bits won't change anything to that.
    • All Core 2 and Core i* processors are 64 bits. All Atoms are 32 bits. Your sizeof is correct, though it won't help if you compile as 32 bits app on a 64 bits system.
    • 2x 32 bits doesn't equal 64 bits. A 64 bits processor has 64 bits cores, a 32 bits processor has 32 bits cores.
    • It makes the emulation slow, but the difficulty comes from the complexity of the PS2 architecture, and from the differences with a PC. Plus, it might not be very well publicly documented, so finding specifics can be hard.
    • Ask the specs. Some types have sizes that are platform-dependent, which means an int might be 64 bits or 32 bits or even 16 bits.