I think you mean host ip, but... whatever
there are 5 classfull address, A B C D E. The difference from each other is the first bits in the first octet:
- A first bit=0 so from 1 to 127 in decimal
- B first two bits=10 so from 128 to 191 in decimal
- C first tree bits=110 so from 192 to 223 in decimal
- D first four bits=1110 so from 224 to 239 in decimal
- E first five bits=1111 so from 240 to 255 in decimal
In the past those class was used instead of subnet mask,
- so a class A address mean by default 255.0.0.0 as subnet mask
- Class B address mean by default 255.255.0.0 as subnet mask
- Class C address mean by default 255.255.255.0 as subnet mask.
- Class D and E are used for particular purpose
so, in a class A the host-id is represented by the last 3 byte (the last 24 bits)
in a class B the host-id is represented by the last 2 byte (the last 16 bits)
in a class C the host-id is represented by the last 1 byte (the last 8 bits)
so, to calculate the host id in a classfull notation is pretty simple.
but if you want to calculate it in a classless notation... is quite simple, too:
you just have to take the portion of the host address in binary (just count the number of zeros in the subnet mask: that is the number of bit dedicated to the host), then translate it in decimal. Be carefull:
you have to translate in decimal maximum 8 bits each time, from right to left. If the host id is more than 8 bits, you have to translate in decimal the first part, write a dot on the left, then the other bits, maximum 8 bits each time. That's why an ip address like that (256.256.256.256) doesn't exist.