eli5: difference between 32 bit and 64 bit OS.


eli5: difference between 32 bit and 64 bit OS.

In: 6

Depends on the CPU. As you probably already know, everything at a very fundamental level on a computer runs on binary: values of 0 and 1.

A 32-bit system has 2^32 possible “0 or 1” slots, while a 64-bit system has 2^64 possible “0 or 1” slots.

A 32-bit OS has been coded and compiled to run on a 32-bit CPU, it supports a maximum memory address space of 4GB.

A 64-bit OS has been coded and compiled to run on a 64-bit CPU, it supports memory address upto a capacity of 16 billion GB.

An address pointer in a 32-bit operating system is 32 bits long. In a 64-bit one, it’s 64 bits long. Of course, some hardware (CPU chips) only support 32 bits and others 32 and 64.

64-bit programs are bigger, because the addresses are bigger, but they can support more memory, both virtual and physical.

The CPU will take and execute one instruction at a time, each instruction can be represented as a binary number. A 32 bit OS uses instructions 32 bits long (~4 billion possible combinations) and 64 bit OS uses instructions 64 bits long (~18 quintillion).

A major consequence of this length is that the RAM address must be able to be represented inside the space of a single instruction for the sake of efficiency, meaning this provides a limit to total RAM capacity.

Computers respresent numbers and characters with bits.

The amount of bits determines how many different combinations you can make and therefor also the maximum number you can represent. (Each additional bit doubles the amount of combinations.)

It is possible to represent a 64-bit numbers with 2 32-bit numbers and therefore 32 bit CPUs, 32-bit software and 32-bit O.S. are able to work with 64-bit numbers.
However, due to the way computers are constructed, this means additional work which means not as fast as *native* 64 bit for these large numbers.

As most CPUs are 64 bit, using a 64-bit OS and software will allow you to work faster with these larger numbers.

Under the hood there are also a lot of other major differences in how 64-bit programs work internally, but that is more a leasons learned and doesn’t change anything conceptually.

A 64-bit OS is one designed to run on a 64-bit CPU.

A 32-bit OS is one designed to run on a 32-bit CPU.

So the real question is what is the difference between a 32-bit and 64-bit CPU.

And to be honest, it depends. It refers to the bit width of *some* part of the CPU. Often, it matches the length of numbers the CPU can operate on in a single instruction. In that case, a 32-bit CPU will be able to add one 32-bit number to another 32-bit number in a single instruction, while a 64-bit CPU can do the same with 64-bit numbers.
It also often relates to the memory address space available to the CPU. A 32-bit CPU uses 32-bit values as memory addresses, meaning that whenever wants to look something up in memory, the location it wants to read is identified by a 32-bit number (which means around 4 billion different numbers are possible, meaning the CPU can handle around 4 billion bytes, or 4GB, of memory)

But sometimes it relates to neither of those. If you’re old enough to remember the Nintendo 64 games console, for example, it was *called* a 64-bit CPU, but it worked with 32-bit addresses and could do arithmetic on 32-bit numbers. However, unlike other contemporary games consoles, it had instructions which allowed it to do arithmetic on two *pairs* of 32-but numbers at a time. So while adding A and B together, it could *also* add C and D together.

There’s no hard and fast rule for exactly when a CPU is called 32-bit or 64-bit. It relates to *some* part of the CPU, but which, exactly, is open to interpretation.

With 32 bit you can only use 2^32 bytes or 4GB of memory without using awkward workarounds, with 64 bit that’s 16PB (over 16 billion TB).

It’s not really the OS that is different, but the underlying hardware.

Deep inside your CPU, there are lines that connect the various components together. These are called “bus”, and buses are designed with a specific bit width. This determines how much information your computer can operate on with a single instruction, as well as total amount of memory it can address at once.

Since the operating system is the piece of software that basically does the most direct interactions with the hardware, especially in terms of memory management, it needs to match the underlying bit width of the hardware to operate correct. For example, a 32 bit operating system can address up 4 gigabits ram (2^32), meaning that it can’t use any more even if you would have it installed.