Celeb Glow
updates | March 01, 2026

How is the word size often same as pointer size?

A pointer stores a memory address , so its size is the size of a memory address which depends on no of memory locations . On the other hand , Word size is the largest unit ,that an instruction can work/ works, on , So the size of a memory location is irrelevant, as multiple ones can be collected at a time. So what is the relation between word size and pointer size ?

4

3 Answers

They don't have to be the same, and the number of computer systems where they aren't vastly outnumbers the ones where they are. Still, there are some relationships between pointer size and "word" size.

Programs do a LOT of pointer arithmetic. Array subscripting is pointer addition. Pointers get compared to each other. If your CPU can't do arithmetic on something the size of a pointer, your address has to be split across multiple variables, which results in a segmented or banked address space. These are complicated to manage and cause proliferation of pointer-like types (near pointer, far pointer, based pointer). As a consequence you get additional weird limitations such as linked lists being able to hold more items than an array can.

Still, microcontrollers with 8-bit data busses and larger address spaces (perhaps only for code and not data) are common. In the other direction modern general purpose CPUs with 32-bit or 64-bit pointers have much wider data words than pointers (for example, 512-bit data words in the AVX subsystem of modern x86_64 CPUs). Many lock-free algorithms depend on atomic access to data which are a minimum of twice the size of a pointer.

2

TLDR: Coincidence, probably.

A pointer isn't part of computer architecture per se, it is a programming language feature. For example the Windows API defines its own types of pointers and how large they are. In C on Windows, a pointer to a char (char*) varies between 32 and 64 bits depending on your version. The size of a word may have little to do with it.

Word is a very overloaded word, ahem, term. In CPU architecture a word can refer to the size of an instruction, the data bus, the memory bus, etc. In the Windows API a word is an unsigned short, i.e. at least 2 bytes, and thus depends on how shorts are implemented.

There may be a correlation between MS words and instruction size words, but I think you'd need an OS developer to debate that, and I doubt it will affect the size of pointers.

At one time, computer registers and internal buses have gone from 4-bit, to 8-bit, then 16-bit, 32-bit and currently 64-bit. The maximum address space depends on the size of a pointer (though some early CPU's, e.g. Z80A, might page memory in chunks the size of a pointer).

As buses became wider, it was also desirable to increase RAM, so the size of a pointer also increased. Sometimes the OS did not keep up with the larger bus, though, e.g. in the transition from Windows 7 32-bit to 64-bit, maximum addressable RAM at first moved from 4 GB to 8 GB, and finally 192 GB on high-end versions.

So the size of the registers and of the bus (from a nibble to a byte, then a Word, then a DWORD in MS 16-bit OS, usw.) increased arbitrarily, as did the address space. A more complete explanation is available from @DarkDust.

16

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy