Word Size: What 32-Bit and 64-Bit Really Mean
Word size is the native width of a CPU's registers and addresses. See what 32-bit and 64-bit change for pointers and long, with a C program and its output.

"This is a 64-bit machine" sounds like one fact, but it bundles several. The registers are 64 bits wide, the addresses the program uses are 64 bits wide, and the compiler's idea of long and void * follow from both. People also use "32-bit" loosely for old software, for a file format, or for an address limit. Sorting out which of those a statement means is the first step toward reading a platform's documentation.
This post defines word size, shows what it changes for pointers and integer types with a C17 program built for both widths, and explains the address limit that pushed everyone from 32 to 64. The examples use GCC 14 on Linux. The -m32 outputs need the 32-bit C library headers installed.
What a word is
A word is the natural unit of data for a processor: the width of its general-purpose registers and, usually, of its integer arithmetic and its addresses. A 32-bit CPU has 32-bit registers, and an add instruction operates on 32 bits at once. A 64-bit CPU has 64-bit registers.
The term is slippery because architectures disagree. On x86 the original word was 16 bits, and the assembler still calls 16 bits a "word", 32 bits a "doubleword" and 64 bits a "quadword", even on a 64-bit processor. Outside x86 documentation, "word" usually means the native register width. When a spec says "word", check which it means.
Word size is a property of the ISA, along with the register width and the way addresses are formed. A chip can mix widths: 64-bit CPUs are still able to run 32-bit instructions, and many microcontrollers have 8-bit data paths with 16-bit addresses. This is why a single number is a simplification.
What the width changes
Four things follow from the register width.
The integer range in one operation. An unsigned 32-bit value holds 0 to 4,294,967,295, and a 64-bit one holds up to 18,446,744,073,709,551,615. Larger values are not impossible on a 32-bit CPU, but they take several instructions, with carries between them.
The size of a pointer. A pointer is an address held in a register, so its size follows the address width. 32-bit pointers are 4 bytes and 64-bit pointers are 8 bytes. This is why a pointer-heavy data structure such as a linked list or a tree grows when moved to 64-bit: every link doubles in size.
The address space. A 32-bit address can name 2^32 bytes, which is 4 GiB. That ceiling is per process address space and it includes everything the process maps, not only the heap: code, libraries, stacks, memory-mapped files. A 64-bit register could name 2^64 bytes, which no machine needs.
The size of C's types. C does not fix the sizes of int or long. It defines minimum ranges, and the platform's ABI chooses. That is the part that surprises people, and it is worth seeing directly.
Printing the sizes
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
int main(void) {
printf("sizeof(int) = %zu\n", sizeof(int));
printf("sizeof(long) = %zu\n", sizeof(long));
printf("sizeof(long long) = %zu\n", sizeof(long long));
printf("sizeof(void *) = %zu\n", sizeof(void *));
printf("sizeof(size_t) = %zu\n", sizeof(size_t));
printf("sizeof(intptr_t) = %zu\n", sizeof(intptr_t));
printf("sizeof(ptrdiff_t) = %zu\n", sizeof(ptrdiff_t));
return 0;
}gcc -std=c17 -Wall -Wextra sizes.c -o sizes64
gcc -std=c17 -Wall -Wextra -m32 sizes.c -o sizes32
./sizes64
./sizes32sizeof(int) = 4
sizeof(long) = 8
sizeof(long long) = 8
sizeof(void *) = 8
sizeof(size_t) = 8
sizeof(intptr_t) = 8
sizeof(ptrdiff_t) = 8
sizeof(int) = 4
sizeof(long) = 4
sizeof(long long) = 8
sizeof(void *) = 4
sizeof(size_t) = 4
sizeof(intptr_t) = 4
sizeof(ptrdiff_t) = 4The first block is Linux x86-64, and the second is the same source built with -m32. Notice what moved and what did not. int stays at 4 bytes in both, and long long is 8 in both. long, void * and size_t track the word size. That pattern, where int stays 32 bits, long and pointers become 64, is called LP64, and it is the data model on Linux, macOS and the BSDs for 64-bit. The 32-bit model is ILP32: int, long and pointers are all 32 bits.
Windows made a different choice. In its 64-bit model, LLP64, long stays 32 bits and only long long and pointers are 64. Code that assumes long can hold a pointer works on 64-bit Linux and truncates on 64-bit Windows. The portable fix is to use the types made for the job: intptr_t or uintptr_t for pointer-sized integers, size_t for sizes and counts, ptrdiff_t for differences between pointers, and the fixed-width int32_t and uint64_t from <stdint.h> when the exact width matters.
The 4 GiB wall
On a 32-bit system, the 4 GiB address space is shared between the process and the kernel. Linux on 32-bit x86 traditionally gave the process 3 GiB and kept 1 GiB for the kernel by default, so a single process could not map more than about 3 GiB even if the machine had 16 GiB of RAM. Workarounds such as physical address extension let the kernel see more physical memory, but each process still had a 32-bit view.
That ceiling is the real reason for the move to 64-bit. Databases, browsers and anything that maps large files outgrew 3 GiB of address space long before they outgrew a machine's RAM.
Why 64-bit pointers do not use 64 bits
A 64-bit CPU does not use all 64 address bits. x86-64 implements 48-bit virtual addresses on standard hardware, giving 256 TiB of address space, and 57 bits with five-level paging on newer processors. The remaining top bits must be copies of the highest used bit, so an address is canonical only if bits 63 down to 47 are all equal. A non-canonical address faults when used.
You can see it in the way Linux x86-64 pointers print. A stack address looks like 0x7ffc... with 12 hex digits, and a heap address looks like 0x55..., never longer than 48 bits:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int local = 0;
void *heap = malloc(16);
printf("stack: %p\n", (void *)&local);
printf("heap: %p\n", heap);
free(heap);
return 0;
}stack: 0x7ffd3a6c1b9c
heap: 0x55a2c4e5d2a0The values change on every run because of address space layout randomization. Both fit in 47 bits, which is what a user-space address on Linux x86-64 can use, and the kernel keeps the upper half of the 48-bit range for itself.
Word size on small systems
The same ideas apply to microcontrollers, with smaller numbers. An 8-bit AVR core has 8-bit registers, and adding two 16-bit values takes two instructions with a carry between them. A 32-bit Cortex-M core handles 32-bit values in single instructions and has a 4 GiB address space that holds flash, RAM and peripheral registers together. Choosing uint8_t for a loop counter on a Cortex-M saves no registers and can add instructions to mask the value after each step, and that is one reason int and unsigned int are the natural default loop types in embedded C.
Where "64-bit" is a misleading label
Marketing uses "64-bit" for things that are not the register width: a 64-bit memory bus, a 64-bit file offset (off_t is 64 bits on a 32-bit system when built with _FILE_OFFSET_BITS=64), a 64-bit time value. A 32-bit process on a 64-bit kernel is also still a 32-bit process: it sees 32-bit pointers, 4 GiB at most, and ILP32 types, because the process's mode, not the machine's, decides it. Check the specific property rather than inferring it from the label.


