And to make it plainly obvious, 255 = 11111111 in binary. where the 8 is from is the 1 bits in the subnet mask, so a /24 is: 11111111.11111111.11111111.00000000 or 255.255.255.0
since there are 24 ones, the mask is /24. Alternatively, you can consider the host bits, which are to the right of...