Remember, the computer sees an IP address in binary. You can quickly convert a number to binary in windows by pulling up a calculator, clicking on 'scientific', entering the number, and clicking on the radio button. 192.168.1.0 looks like this-
11000000.10101000.00000001.00000000
The /24 tells us what our subnet mask looks like. In this case, we have 24 1's followed by 8 0's (for a total of 32 bits); specifically:
11111111.11111111.11111111.00000000
(in decimal, 255.255.255.0)
The subnet mask is used to compare two IP's to find out if they're in the same local area network. Line up the two IP's and the subnet mask. If the IP's are different on any bit where the subnet mask is a 1, they are on different networks. If the IP's are the same for all bits where the subnet mask is a 1, they're on the same network. In this case, with our current subnet mask the host portion (all the network bits are the same, and only the host bits are different) gives us 8 bits of freedom for a total of 2^8 = 256 combinations. In other words, this subnet has all addresses from 192.168.1.0 through 192.168.1.255 as local IP's, which is to say they are different hosts on the same network. The address with all 0's for the host portion is reserved and will always be the network address ( in this case 192.168.1.0) and the address with all 1's for the host portion will always be the broadcast IP (in this case 192.168.1.255 ). I'm not sure how you're supposed to be counting hosts, but I would exclude the network and broadcast (and possibly the gateway IP) from my count of hosts, and say that 192.168.1.0/24 has 253 host (usable for computers or other devices) addresses. I get this number by taking the total combinations available (in this case 256) and subtracting 3 IP's, which represent the network, broadcast, and gateway IP's.
You can move move the subnet mask left or right to get more or less host addresses. If we use 192.168.1.0/25 our subnet mask now looks like
11111111.11111111.11111111.10000000
(in decimal, 255.255.255.128)
Notice that we have 25 1's followed by 7 0's for a total of 32 bits.
That gives us 2^7 or 128 addresses to use on the host side. All the IP's from 192.168.1.0 - 192.168.1.127 are in the host portion. That first address is the network IP, the last one is the broadcast, and everything in between is usable for devices. I personally only deal with networks on the internet so I'll need a gateway IP in there somewhere and that leaves me with 128-3 = 125 possible IP's for hosts.
The next subnet will be a /26 which looks like this-
11111111.11111111.11111111.11000000
or in decimal, 255.255.255.192
Every time our subnet moves to the right, that cuts the host IP space in half.
/26 192.168.1.000 to 192.168.1.63, 64 total IP's, 61 available for devices
/27 192.168.1.000 to 192.168.1.31, 32 total IP's, 29 available for devices
/28 192.168.1.000 to 192.168.1.15, 16 total IP's, 13 available for devices
/29 192.168.1.000 to 192.168.1.7, 8 total IP's, 5 available for devices
/30 192.168.1.000 to 192.168.1.3, 4 total IP's, 1 available for devices
Notice that a /31 would have 2 total IP's, specifically the network IP and the broadcast IP, leaving no IP's available for hosts to use.
This stuff is important to know. If you put in the wrong subnet mask, if your block is too small, your gateway will try to route to some of your local IP's as though they're on the internet. If your block is too large, your gateway will try to route to some public IP's as though they're on the LAN. In either case, the traffic isn't going to get there. Sad days all around.