Every IP address has a network and host part, determined by the subnet mask.
A device has an IP and subnet mask of:
192.168.0.5;255.255.255.0 means that it has an network address of 192.168.0 and the rest of the ip address is allocated to hosts on the network (for a host to be on the same network it would need an ip in the range of 192.168.0.1 -> 192.168.0.254; 192.168.0.0 is the subnet address and 192.168.0.255 is the broadcast address)
another example:
A device has an IP and subnet mask of:
192.168.0.5;255.0.0.0 means that it has an network address of 192 and the rest of the ip address is allocated to hosts on the network (for a host to be on the same network it would need an ip in the range of 192.0.0.1 -> 192.255.255.254; 192.0.0.0 is the subnet address and 192.255.255.255 is the broadcast address)
As a final, more complicated example, A device has an IP and subnet mask of:
192.168.200.5;255.255.240.0. To find the network we convert the mask to binary
255.255.240.0
11111111.11111111.11110000.00000000
then convert the ip to binary, and apply the mask to find our ip range of the network
192.168.200.5
11000000.10101000.11001000.00000101 apply mask ->
11111111.11111111.11110000.00000000 logical AND to get our network portion:
11000000.10101000.11000000.00000000 (192.168.192.0)
to get our first and last host address on the same network, fill in the network portion plus all 0’s for the first, and all 1’s for the last address:
11000000.10101000.11000000.00000000(192.168.192.0 -> subnet)
11000000.10101000.11001111.11111111(192.168.207.255-> broadcast)
so to be on the same network as 192.168.200.5;255.255.240.0; a device would need an ip in the range of 192.168.192.1;255.255.240.0 -> 192.168.240.254;255.255.240.0
solved Ip Address and network