There are only 4.29 billion possible values of an int32, so even if you used 2 lines for each case, it’d still be under 10 billion lines of code
bool isOdd(int num) {
if (num == 1)
{ return true; }
if (num == 2)
{ return false; }
if (num == 3)
{ return true; }
…
}
10 shannons, that is, 10 bits, each with 50% probability would be equivalent to the amount of information gained from observing an event with 1/1024 chance of occurring, not 1/10. Thats because this unit gets combined multiplicatively. The wikipedia article mentions that if there are 8 possible events with equal probability, the information content would be 3 shannons.