To understand the energy and entropy contributions to the behavior of a system, we study their effects on the distribution of a binary mixture of particles in a cubic box. Studying a binary mixture as a two-component system allows us to understand the relative effect of volume and energy-related parameters of particles on the phase behavior of a confined system. A confined system carries characteristics distinguishable from those of a bulk system owing to energy and entropy effect of walls on the configuration of the confined system . It is intuitively comprehendible that energy affects the configuration of particles in a box. Strong particle-particle attraction energies lead to nucleation and growth of particles to form clusters inside the box and strong wall-particle attraction energies lead to the accumulation of particles adjacent to the wall. On the other hand, the effect of entropy as a counter-intuitive property can be manifested clearly when the energy effect is eliminated from the system. A satisfying representative of such a system is a hard-sphere model in a box with hard potential walls (reflective walls).