I cannot understand why no comments have been written because this is brilliant. The basics are properly explained for you to master and use for further study. A definite thumbs up from me..
Hint: With a x86-64 we can use the 64 bit mode, the 32 bit mode and the 16 bit mode. With a 80386+ we can use the 32 bit mode and the 16 bit mode. Using a 80386+ within the 16 bit mode we can use the 16 bit instruction set and the 32 bit instruction set together with address size and operand size prefixes for to address 4 GB within the 16 bit mode. The only one difference between the 16 bit mode and the 32 bit mode on a 80386+ is the default address and operand size and the usage of the address size and operand size prefixes. Starting with the Pentium MMX (32 bit CPU) we can additional use the MMX instruction set with eight 64 bit MMX register within the 32 bit mode and also within the 16 bit mode using MMX instruction prefixe. Using a x86-64 within the 32 bit mode we can use the 32 bit instruction set and the 16 bit instruction set, but we can´t use the 64 bit instruction set within the 32 bit mode or within the 16 bit mode. So the difference between the 64 bit mode and the 32 bit and the 16 bit mode is much greater as the difference between the 16 bit mode and the 32 bit mode.
Great addition to the info provided. Unless one actually did some low-level programming with a CPU, this stuff gets hard to understand. I think the basic crux is that the x86-64 has a 'mode' where it allows for a much larger addressing space than 4GB. In this mode, it uses the same 32 bit instruction set of the x86 so that it is fully compatible with all existing x86 apps that existed at that time. The Intel Itanium was a totally new CPU architecture that was 64-bit and accessed lots of memory, but its native instruction set was not compatible with the 32-bit x86 CPU and so people had to re-write/recompile their code, which was more effort than people wanted to take. When Intel realized it was not being adopted, it incorporated various levels of x86 'emulation' to allow people to run older apps. But too little, too late. Thus the x86-64, while called a 64-bit CPU, is really more of a modified x86 core that allows a much larger addressing space.. This was what happened when it first appeared. Since then CPU designs have evolved significantly and I have not tracked their capabilities.
yes.. the size of the address register affects how much memory can be accessed. Not all registers inside a CPU are the same size. (But most are) When we say a CPU is '8 bit', that used to reference the basic size of the OpCodes. However, as CPUs became more and more complex, there was no single way to define what '64-bit' means. It became more of a marketing game.
Good stuff but I prefer to have the simple picture in my head that 64 bit means registers of 64 bit so that you can access 2^64 different pieces of memory. That is still explainable to the sales person that sells the software in my company.
But it is not correct. The "64-bit" Athlon did not have a 64-bit instruction set, nor did its address register have 64 bits. It could more 64 bits of data at once.
I was looking around for something describing how the 386 had 32 bit capability when Linux could use it and not windows. I assume it was just done prospectively and microsoft was behind on it. I think it is important to mention how starting with 32 bit, the preemptive capability existing, and the ability to access address in a straight, non memory segmented manner are the biggest differences.
When switching to 32 bit instructions, all drivers for hardware devices, such as video cards, had to be re-written. This takes much time. I remember when using Linux in these days, the list of hardware peripherals that would work was very, very limited. It was generally a nightmare taking a random PC and installing Linux on it, unless you knew how to recompile drivers. As Microsoft had to support thousands of different hardware combinations, it took them a while to get a stable OS out.
I don't understand what you mean by ls\st. Fetching multiple pieces of data to chain into a longer command is beyond the scope of what I wanted to discuss in this video.
if your PC is less than 5 years old, you've like installed the 32-bit version of Windows.. Install the 64-bit version and you will likely have access to 8GB RAM.
There are many groups of registers inside a CPU. Saying the Athlon is a 64-bit CPU comes from their marketing department. It did not have a 64-bit instruction set, nor did it have a 64 bit address register. It did have an address register with more than 32 bits.. about 38 bits, I think; which gave it the ability to access more RAM than the INTEL designs (until Intel copied AMD in this x64 design)
There are many registers inside a CPU. The registers that move data on the data bus are 64 bits so that 64 bits can be moved at once. However, there is an address bus register and this can be any size. In the 8086 it was 20 bits and so 2^20 was 1MB and thus the memory limit. In the 32 bit pentiums, it was 32 and so 2^32 was 4GB and that limit. The "64 bit" AMD enhancement in some Athlons increased the size of the address register to about 36 bits I think (not 64), and so this beat Intel at its own game and allowed more than 4GB of memory to be used. AMD started outselling INTEL in server CPUs until Intel copied AMDs enhancement.
Not quite that simple.. if you have 4 address lines.. then you can 'address' 2^4 or 16 'things'.. the size of the databus determines how many bits you can transfer.. so with 4 address lines and 8 data lines I can move 16 x 8 bit chunks of data or 16 Bytes of data. If I have 20 address lines, I can move 2^20 or 1Mega chunks of data.. If the data moved as on 8 data lines, I'm moving 1 byte of memory, so 20 address lines allow me to move and access (or address) 1MByte of memory.. I'm simplifying it a bit here.. .. basically the number of address lines (which are controlled by the address register) determines how much memory your CPU can use.
I cannot understand why no comments have been written because this is brilliant. The basics are properly explained for you to master and use for further study. A definite thumbs up from me..
This was the clearest explanation I have found on UA-cam. Thank you.
This guy... explains so well. You are a good teacher!
Your explanation s are very simple and easy to understand. Look forward to seeing more videos .
A simple and amazing explanation of the basics. Thanks for the content, helped a lot!!!
thanks for taking the time to do this
you are great man! please keep up the good work on some low-level aspects of enginnering! it's great!
Really awesome.
Please add more tutorials like this.
Hint: With a x86-64 we can use the 64 bit mode, the 32 bit mode and the 16 bit mode. With a 80386+ we can use the 32 bit mode and the 16 bit mode.
Using a 80386+ within the 16 bit mode we can use the 16 bit instruction set and the 32 bit instruction set together with address size and operand size prefixes for to address 4 GB within the 16 bit mode. The only one difference between the 16 bit mode and the 32 bit mode on a 80386+ is the default address and operand size and the usage of the address size and operand size prefixes.
Starting with the Pentium MMX (32 bit CPU) we can additional use the MMX instruction set with eight 64 bit MMX register within the 32 bit mode and also within the 16 bit mode using MMX instruction prefixe.
Using a x86-64 within the 32 bit mode we can use the 32 bit instruction set and the 16 bit instruction set, but we can´t use the 64 bit instruction set within the 32 bit mode or within the 16 bit mode. So the difference between the 64 bit mode and the 32 bit and the 16 bit mode is much greater as the difference between the 16 bit mode and the 32 bit mode.
Great addition to the info provided. Unless one actually did some low-level programming with a CPU, this stuff gets hard to understand. I think the basic crux is that the x86-64 has a 'mode' where it allows for a much larger addressing space than 4GB. In this mode, it uses the same 32 bit instruction set of the x86 so that it is fully compatible with all existing x86 apps that existed at that time. The Intel Itanium was a totally new CPU architecture that was 64-bit and accessed lots of memory, but its native instruction set was not compatible with the 32-bit x86 CPU and so people had to re-write/recompile their code, which was more effort than people wanted to take. When Intel realized it was not being adopted, it incorporated various levels of x86 'emulation' to allow people to run older apps. But too little, too late. Thus the x86-64, while called a 64-bit CPU, is really more of a modified x86 core that allows a much larger addressing space.. This was what happened when it first appeared. Since then CPU designs have evolved significantly and I have not tracked their capabilities.
This is a very helpful video.
nice video, but isn't it the register bit size that determines how much memory can be accessed? Rather than the instruction set bit size?
yes.. the size of the address register affects how much memory can be accessed. Not all registers inside a CPU are the same size. (But most are) When we say a CPU is '8 bit', that used to reference the basic size of the OpCodes. However, as CPUs became more and more complex, there was no single way to define what '64-bit' means. It became more of a marketing game.
now..this is some real lecture
Great explanation 👍 Look for more videos
A special thanks from you sir!
I really have learnt a lot from this and all your videos ..
Keep it Up ... :)
Great explanation.
You look like the guy in "les incroyables" :)
Awesome tutorial!
Good stuff but I prefer to have the simple picture in my head that 64 bit means registers of 64 bit so that you can access 2^64 different pieces of memory. That is still explainable to the sales person that sells the software in my company.
But it is not correct. The "64-bit" Athlon did not have a 64-bit instruction set, nor did its address register have 64 bits. It could more 64 bits of data at once.
Awesome tutorial!
I was looking around for something describing how the 386 had 32 bit capability when Linux could use it and not windows. I assume it was just done prospectively and microsoft was behind on it. I think it is important to mention how starting with 32 bit, the preemptive capability existing, and the ability to access address in a straight, non memory segmented manner are the biggest differences.
When switching to 32 bit instructions, all drivers for hardware devices, such as video cards, had to be re-written. This takes much time. I remember when using Linux in these days, the list of hardware peripherals that would work was very, very limited. It was generally a nightmare taking a random PC and installing Linux on it, unless you knew how to recompile drivers. As Microsoft had to support thousands of different hardware combinations, it took them a while to get a stable OS out.
That was a great explanation, thank you!
Clear, Instructive, Great!
really great explanation! thank you!
wow this is the real lecture
So clear and well explained ;)!
Thank you, learned a lot today !
Awesome video sir!
it would be good if you explained about ls\st
so it will be clear why and how longer commands realate to bigger RAM
I don't understand what you mean by ls\st. Fetching multiple pieces of data to chain into a longer command is beyond the scope of what I wanted to discuss in this video.
Thank you for this useful video
Very nice, thank you sir.
Thank you so much 🍀🍀🍀🍀
I got 8 gb ram and can only use half so if i upgrade the cpu i can use it?
if your PC is less than 5 years old, you've like installed the 32-bit version of Windows.. Install the 64-bit version and you will likely have access to 8GB RAM.
Great video, thanks for the help :)
thanks for the explanation u deserve a sub and one like
You said that the Athlon 64 had a 64bit register , doesn't that mean that this CPU could access 2^64 of RAM ?
There are many groups of registers inside a CPU. Saying the Athlon is a 64-bit CPU comes from their marketing department. It did not have a 64-bit instruction set, nor did it have a 64 bit address register. It did have an address register with more than 32 bits.. about 38 bits, I think; which gave it the ability to access more RAM than the INTEL designs (until Intel copied AMD in this x64 design)
There are many registers inside a CPU. The registers that move data on the data bus are 64 bits so that 64 bits can be moved at once. However, there is an address bus register and this can be any size. In the 8086 it was 20 bits and so 2^20 was 1MB and thus the memory limit. In the 32 bit pentiums, it was 32 and so 2^32 was 4GB and that limit. The "64 bit" AMD enhancement in some Athlons increased the size of the address register to about 36 bits I think (not 64), and so this beat Intel at its own game and allowed more than 4GB of memory to be used. AMD started outselling INTEL in server CPUs until Intel copied AMDs enhancement.
Thank you.
Thank you
Good video.
good one
8 bits = 1 byte. why 2^20 = 1 MByte and not 1Mbit?
Not quite that simple.. if you have 4 address lines.. then you can 'address' 2^4 or 16 'things'.. the size of the databus determines how many bits you can transfer.. so with 4 address lines and 8 data lines I can move 16 x 8 bit chunks of data or 16 Bytes of data. If I have 20 address lines, I can move 2^20 or 1Mega chunks of data.. If the data moved as on 8 data lines, I'm moving 1 byte of memory, so 20 address lines allow me to move and access (or address) 1MByte of memory.. I'm simplifying it a bit here.. .. basically the number of address lines (which are controlled by the address register) determines how much memory your CPU can use.
thank for good video
thaaaaanks keep it up
thanks..
Great🥰
u look like charlie sheen :D