I have learned 8086 CPU has 16bit data bus, and Pentium CPU has 32bit data bus, which mean each memory address holds size of data bus.
For example:
16bit = 2^16 = 65,536
binary 0000 0000 0000 0000 ~ 1111 1111 1111 1111
hex 0000 0000 ~ FFFF FFFF
dec 000,000 ~ 65,535
65,536 / 1024 = 64 so can be 64kbyte of maximum memory address.
like 0x 0000,0000 ~ 0x FFFF,FFFF
32bit = 2^32 = 4,294,967,296
binary 0000 0000 0000 0000 0000 0000 0000 0000
~ 1111 1111 1111 1111 1111 1111 1111 1111
hex 0000 0000 0000 0000 ~ FFFF FFFF FFFF FFFF
dec 0,000,000,000 ~ 4,294,967,296
4,294,967,296 / 1024 / 1024 = 4 so can be 4mb of maximum memory address
like 0x 0000,0000,0000,0000 ~ 0x FFFF,FFFF,FFFF,FFFF
Am I correct? I think so. But in C programming:
int arr[2];
printf("%p %p \n", &arr[0],&arr[1]);
-----------------------------------
0x 7fff5c474b20, 0x 7fff5c474b24 (this is 64bit addressing)
I know integer is 4 byte.
Size of &arr[1]-&arr[0]
is 0x4
which means every address holds only 8bit data bus.
If the CPU can hold more than 8bit why does C hold only 8bit?