We can begin by adding:
12 + 24 = 36
There are 36 total students.
We can rewrite this ratio with boys to total students:
24 (boys): 36 (total)
The ratio of boys to total students is 24:36; however, we can divide these numbers by 12 to find that the simplified ratio is 2:3.
The ratio of boys to total number of students in the class is 2:3.