r/computerscience • u/Bitter-Today285 • Jul 22 '26
Why does the CPU’s size matter?
Why does it matter if it’s a 16-bit cpu, a 32-bit cpu, or 64-bit? For example, what can a 64-bit cpu do that a 32-bit one can’t? Or otherwise, and can you tell the difference when you casually use a computer?
9
Upvotes
29
u/MasterGeekMX Bachelors in CS Jul 22 '26
I'm doing my masters in computer architecture, so I know a thing.
First, what you are talking about is what is called word size, not CPU size, as that is how big is a chip. That being said, word size matters as that dictates the maximum size of numbers the CPU can handle in a single sweep, and very often how much RAM it can hold.
For casual use, it depends on the application, but sometimes the CPU needs to do operations that use a ton of bits, and while you can do that with smaller word sizes, it takes more instructions, and thus it is slower. Take for example adding two 64-bit numbers. In a 32 bit system, that would require at least 3 instructions: add the two lower halfs of each number, add the two upper halfs, and add 1 to the upper half if the lower half generated a carry. Meanwhile a 64-bit CPU does that in one instruction: a good ol' sum. If your program does a lot of those operations, you can feel the difference pretty much.
The other is RAM. The details vary on different architectures, but each Byte on your RAM is addressed by a number, which needs to fit in your CPU. 32 bits can hold numbers ranging from 0 all the way up to 4,294,967,295. That may seem a lot, but if you do the math, that is the number of Bytes on 4 GigaBytes, hence why many 32-bit CPUs can only have up to 4GB. While there are workarounds to address more RAM (like the famous Physical Address Extension that old Intel CPUs used), it is easier to simply use more bits.
A thing that I like as an example of the issues with 32-bits is the Y2k38 problem. In a nutshell, many computers keep up time by counting how many seconds have passed since January 1st 1970. The problem is that by the year 2038, the number of seconds since January 1st 1970 would need more than 32 bits to fit, which will cause a lot of issues that 64 bits don't have.
Finally, there is a new CPU architecture that is gaining momentum called RISC-V. It comes in both 32-bit and 64-bit versions, with the 32-bit one only used in small chips to control appliances, while 64-bit is for actual computer chips. Well, work is being done to make 128-bit RISC-V a thing.
3
u/high_throughput Jul 22 '26
There's nothing computationally that a 64bit CPU can do that a 16bit CPU can't. But some operations take disproportionately much longer.
If you ask a human to multiply 1-digit numbers like
4*9, it takes (say) five seconds to get 36. So if you ask them to multiply two digit numbers like42*93, does it take twice as long? 10 seconds?No, it easily takes minutes as the human now has to do long multiplication and split up the problem into four smaller multiplications with additions and carries on paper. They can do it, but it's N2 effort, not 2x effort.
It gets worse when you consider memory. When the CPU can no longer use its native sizes to compute where to look for things, it has to start doing a secondary long multiplications just to figure out where to look for the data of its original long multiplication. It's still possible, but it absolutely sucks now.
49
u/apnorton Devops Engineer | Post-quantum crypto grad student Jul 22 '26
An X-bit CPU has registers with width X. This allows you to store references to memory that are X-bits wide in a single register.
The impact of this is that an X-bit CPU can have a maximum of 2X memory addresses, which is why (e.g.) a 32-bit machine would (usually) have a memory maximum of 4GB. (I say "usually" because there can be some tricks to support more memory addresses, but without physical address extension it would be 4GB.)
3
u/AlmiranteCrujido Software Engineer Jul 22 '26
First define "n-bit CPU" - today, we're mostly talking about the integer word size, but that hasn't always historically been the case, and to a large extent prior to about 2000, it was as much a marketing term as a technical one.
For the modern 32 vs 64 bit systems, the answer is mainly:
Once you get back to 16-bit CPUs (or 8-bit, further back) the definitions of 8-bit, 16-bit, and for very old 32-bit systems, 32-bit become vague enough that you kind of have to go ¯_(ツ)_/¯ and look at the actual way the system is designed to tell what the difference is.
2
u/nuclear_splines PhD, Data Science Jul 22 '26
In principal, the "bits" here refer to how big a word is, or the common size of variables. In particular, this effects the size of a 'pointer' or memory address, which in turn impacts how much memory an application can use.
If your pointers are 32-bits, then memory addresses can range from 0 bytes to 232 - 1, or 4294967295 bytes, or about 4 GB. In other words, in a typical 32-bit architecture, an application (and indeed the operating system) can't use more than 4 gigabytes of RAM. With a 64-bit architecture that limit is over 18 exabytes.
In practice, there are other differences. Intel and AMD incrementally improved their CPU architectures and added new instructions and functionality over decades. However, software developers often couldn't make use of this new functionality in order to maintain backwards compatibility with older hardware. The jump to 64-bits required recompiling all software anyway, so it was a good opportunity to start using all that new functionality.
2
u/IchBinEinZwerg Jul 22 '26
Makes it easier to do sums with bigger numbers. 8-bit CPUs would trip you up whenever you went over 127 and you'd have to muck about with multiple memory locations, carries and so on. 16 bit goes up to 32767 which trips you up a lot less often but if you're doing longer calculations the intermediate results might go over that. 32 bit goes up to a couple of billion and I think the problem there was that we started needing more memory than 32-bit CPUs could support, rather than running out of mathematical headroom. 64-bit should keep us going for quite a while as it can address a metric crapton of memory and should have enough mathematical headroom to keep even Elon Musk's accountant happy.
But you're right of course: there's nothing a 64-bit CPU can do that a 4-bit one can't; it's just better parallelism. At the application layer all that carry flag management is handled behind the scenes and you could tell an application running on a 4-bit CPU to handle 25000000000000000000000000 and it'll just get one with it (if the application supports numbers that big).
(127, 32767: yeah 255 and 65535 but signed maths is usually more useful, depending what you're doing of course.)
2
u/Bobby6k34 Jul 23 '26
Think of a bit as spaces for numbers 1234 has 4 spaces for numbers lowest number is 0000 highest is 9999, thats 4 bits or numbers so if you needed to count to 99999 you would need to add 1 more bit. So it would be 54321 5 bits, so by having more bits you can count to higher numbers. This also let's you store more data as those numbers.
Now 64bits is alot of numbers if you are using out base 10 numbers(1234567890) but computers don't use our base 10 numbers they use base 2 so they count 01, so now that 4 bit space can only count to 1111 or in base 10 8, by adding more bits we get alot more numbers with each bit doubling to number we can count to or store
1
u/Recycled5000 Jul 22 '26
It’s about the size of the address space.
1
u/PvtRoom Jul 22 '26
Depends which size.
Practical uses tend to need "words" no bigger than 64 bit. This runs practically all physics and maths calcs with enough range and precision.
Sometimes people want 80 (tends to be financial) or 128 bit. a few want integer precision on billions of digits
it can be memory size, but this is redundant now as 32 bit does 4gb - 64bit would do 16PB - 40bit would cover 1TB (of ram)
1
u/burlingk Jul 23 '26
It directly relates to two things: How large a chunk of memory can be processed at once, and how large of a memory area can be mapped.
Those are MASSIVE.
1
u/Major_Instance_4766 Jul 23 '26
big number mean computer do thing more faster
0
u/[deleted] Jul 22 '26
[removed] — view removed comment