How many 1/2 unit cubes does it take to fill the prism?

Check the picture below.
since the larger cube has a volume of 6 cubic units, let's see what is the volume of one of the small cubes, and check how many times does that volume go into the other.
[tex]\bf \stackrel{\textit{volume of a cube}}{V=s^3}~~ \begin{cases} s=side's~ length\\ \cline{1-1} s=\frac{1}{2} \end{cases}\implies V=\left( \cfrac{1}{2} \right)^3\implies V=\cfrac{1}{8} \\\\[-0.35em] ~\dotfill\\\\ \stackrel{\textit{how many times does }\frac{1}{8}\textit{ go into 6?}}{6\div \cfrac{1}{8}\implies \cfrac{6}{1}\div \cfrac{1}{8}\implies \cfrac{6}{1}\cdot \cfrac{8}{1}}\implies 48[/tex]