Memory Address / Pointer Size Confusion
I'm confused about the sizes of memory addresses and pointers. Suppose we have a 64-bit computer. When I display the address of any variable, we see a 16-character long hexadecimal address. A hexadecimal character can be represented by 4 bits, so 16 * 4 bits = 64 bits. For example, let's say we have two adjacent addresses: 0x00000000123ABCDE and 0x00000000123ABCDF. Their difference is 1 or 1 bit (e.g. 0xE = 0b1110, 0xF = 0b1111). Fair enough. Now if I didn't already make a mistake in that last paragraph, this is probably where I got things mixed up. We know integers in C are 4 bytes large (sizeof(int)). If we have an array of two integers, and we display their addresses, we can see that the difference of their addresses is 4. That implies that when we increment an address, we move it by 1 byte or 8 bits. However, that contradicts the understanding that addresses are 1 bit apart. I'm so confused.