Are you planning on replacing/upgrading any of the components?
Have a look at the components (CPU, GPU, memory, and PSU) of each system, to get your answer.
4GB is not enough for gaming nowadays. 8 is minimum, 16 recommended.
Some AAA games won't run as well on 8GB as they will on 16GB.