Since this is the first day I'm learning about CS concepts in my 75 days of learning concepts, I asked chatGPT to give me a list of things I should learn. It gave me a pretty generic and gnarly list of things to learn, starting from data structures all the way to data warehousing and quantum computing. I'm not sure if this will be the list I'll follow. Maybe I'll have to come up with a list as I go day by day or week by week.
I was about to learn about data structures, like arrays and lists according to the list but a curious thought popped into my head while reading a random comment on HN.
What is the difference between a 32-bit and 64-bit processor?
This is something I haven't really thought about even though the distinction has existed for a long time and I remember at some point in the 2000s, my Windows PC had a separate x86 Program Files folder (for 32 bit), see the image below.
But, after moving to macOS as my primary OS and working with unix-based computers in most work situations, I never really gave it too much thought.
So, what is 32-bit computing?
This is the definition according to Wikipedia:
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units.
Ok, let's put it in layman terms. In 32-bit computing, you get 32 bits worth of space to work with. "Space" here can be the amount of data your CPU can process or in RAM, it can refer to how much each memory address can hold. I use the word "space" but in most places you'll see the term "address space" being used.
For RAM there is another limit, 32-bit RAM limits you to a maximum of 4GB of RAM.
Another thing is, if you have a computer with a 64-bit processor but a 32-bit RAM, you can't use more than 4GB either.
So then, what is 64-bit computing?
I wish it was as simple as saying, 64-bit is just more space than 32-bit. On its face, it seems like that's the case but it gets more complicated than that. It seems like the name has gotten confusing because some architectures like ARMv8 don't fully support 64-bit but are compatible with it.
Simply put, 64-bit gives you way more space to work with. Theoretically, you can have over 18 million terabytes of RAM in a 64 bit architecture. But in reality, it seems like RAM is not limited.
Since the usable space goes from 2^32-1 to 2^64-1 which means being able to store information from 0 to 18,446,744,073,709,551,615, this astronomical jump in usable space makes it possible for all kinds of applications to run efficiently.
For instance, a game built on 64 bit can store a ton more information in one address of RAM which can make larger data structures just that much more possible.
Because the memory limitation is so much larger than 32-bit, you can easily load binary data in memory without having to worry about the data overflowing.
Overall, learning about these differences opened my eyes to what exactly are some limitations of 32-bit that I didn't know about. I still feel like a novice about how exactly these changes are seen in the real world but I'm guessing that's left up to the people working on processors and other computer architecture.
I spent about an hour learning about this and writing up notes as I went. I think for the first day, this was fun and useful.
If you have a suggestion on a topic I should study or dig into, let me know.