Sam is baking a cake. He needs 1/4 cup of sugar for each cake. One bag of sugar has 1/2 cup' of sugar. How many bags of sugar does he need to make 8 cakes? Use an explanation and solution.
A. 2 bags of sugar
B. 4 bags of sugar
C. 16 bags of sugar
D. 8 bags of sugar