This isn't the first time the question occurred to me, but I was playing an old SNES game today when I thought about it again and wanted to seek an answer from people who know more about it than I do.
Take the Super Nintendo for example. It's a 16-bit system. With 16 bits, you can count up to 65536, or 2^16. So how does the machine cope with me having, for instance, a score of greater than 65536?
In reality it's a bit more complex, but the simple explanation is that a 16bit processor can do a operations on 16 bit numbers in a single operation, and to deal with larger numbers you need to break things up. For example to add two 32-bit numbers, you would add least significant words in one operation, then add the most significant words and then add any carry bits.
Obviously this is much slower (3 instructions instead of one), but almost any operation can be done if needed. This is a reason that processors with larger words can be faster; they can do larger operations with a single instruction instead of several instructions. From the programmers point of view, the compiler will usually take care of this, you'd never do it by hand unless you're writing assembly.
In reality though, many processors have dedicated hardware to do math operations, so calling a processor 32-bit or 64-bit really has more to do with memory addressing and the size of registers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With