There are some elegant mathematical solutions in the comments, but think of it like this:
1 bit gives you two possible bit patterns.
2 bits gives you four
3 bits gives you eight
.
.
.
.
Continue in the same vein until you have a number of bit patterns larger than the number of students.