The 4 GB RAM limit for a 32 bit OS is an artificial limit. The OS is 32 bit but that refers to the virtual address space and has nothing to do with RAM addressability. Most even semi modern CPUs have a 36 bit address bus so can theoretically address up to 64 GB RAM. Some 32 bit server editions are able to address up to 32 GB RAM. And the method used to accomplish this is actually simpler than that used by a 64 bit OS, even when RAM is less than 4 GB.
There is a technical reason why the 4 GB limit was imposed but it is still an artificial limit.
All RAM limits in 64 bit Windows are artificial. Server 2012 Standard and Datacenter editions can address up to 4 TB RAM. That limit was imposed because Microsoft was unable to test it with more.
Note that I am speaking of RAM limits of the OS. In most cases the real limit is imposed by the hardware.