The energy and entropy, expressed in free energy, determine the behavior of a system. Therefore, infinite knowledge of these two quantities leads to precise prediction of the system's trajectories. Here, we study how the energy and entropy affect the distribution of a two-component system in a box. First, using a model, we intuitively show that large particles prefer to position at contact with the wall as it accompanies an increase of the system's entropy. We intuitively show that this is a consequence of maximizing the accessible states for fluctuating degrees of freedom as a portion of excluded volumes reside outside of the box when they locate near the wall. Then we employ molecular dynamics simulations to extract the effect of entropy and energy on the binary mixture distribution and how they compete with each other to determine the system's configuration. While particle-particle and particle-wall attraction energies affect the distribution of particles, we show that the emergent entropic forces --- quasi-gravitational --- have a significant contribution to the configuration of the system. This system is realized clearly for a binary mixture of hard spheres in a box with reflective walls.