I'm struggling to understand how to compute the CIDR number from an IP address for hours. Examples I've seen don't explain how the provided answer was found. For example, if I have the IP 126.96.36.199, I thought the CIDR number was 24 because 188.8.131.52 is a class C address with a subnet mask of 255.255.255.0 so the first 24 bits would be 1s. Is this answer correct? If not, please explain how to find the CIDR number in this case. Thanks.
The CIDR number is simply the number of one bits in the network mask. You cannot get a CIDR number from an address, it comes from the network mask.
You have no idea what the number is for your example of
184.108.40.206, but if you had the mask
255.255.255.192, you would know that it is
220.127.116.11 with a mask of
255.255.255.192 would be