Answer:
6 bits
Step-by-step explanation:
5 bits gets you 2^5=32 possibilities (values 0-31), which is not enough for 50.
6 bits gets you 2^6=64 possibilities (values 0-63), which is enough.
To calculate for an arbitrary number, take the 2-log, and round up:
rounded up is 6.