### IPv4 Calculator

Address:34.239.179.22800100010.11101111.10110011.11100100

Netmask:255.255.255.0 (/24)11111111.11111111.11111111.00000000

Wildcard:0.0.0.25500000000.00000000.00000000.11111111

Network:34.239.179.0 /2400100010.11101111.10110011.00000000

Broadcast:34.239.179.25500100010.11101111.10110011.11111111

HostMin:34.239.179.100100010.11101111.10110011.00000001

HostMax:34.239.179.25400100010.11101111.10110011.11111110

Block size:256Class A

Bit Usage: nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh

h = host bit

### Explanation:

**Netmask (/24):**

- Take 32 bits (the length of the subnet mask), set the first 24 bits to 1 then set all remainning bits to 0 resulting in 11111111111111111111111100000000.
- Break the 32 bit string into 4 groups (octets) of 8 bits each and put a dot in between them to get 11111111.11111111.11111111.00000000.
- Convert these groups or octets from binary to decimal and you'll have the dotted decimal representation of the subnet mask which is 255.255.255.0.

**CIDR (255.255.255.0):**

- Convert each of the 4 octets or groups from decimal to binary to get 11111111.11111111.11111111.00000000.
- Count the number of 1's you have. This will give you /24.

**Block Size:**

- Subtract 24 (network bits) from 32 (which comes from 32 bits) to get the Host bits: 32 - 24 = 8.
- Use the Host bit number to do a power of 2 to get the block size: 2
^{8}= 256.

**Wildcard:**

- Get the dotted binary string representation of the Netmask from step 2 above which is: 11111111.11111111.11111111.00000000.
- Flip the bits or swap 1's out with 0's and 0's with 1's to get 00000000.00000000.00000000.11111111.
- Convert these octets from binary to decimal to get the Wildcard mask of 0.0.0.255.

*NOTES:*

255 is the magic number here. You don't have to do binary conversion to get the Wildcard Mask. For each octet of the subnet mask, subtract it from 255 and you will get the octet in the same position for the Wildcard Mask.

This is aso called inverse mask because all the bits of the subnet mask is inverted so 1 becomes 0 and vice versa; or it is said to be the opposite of the subnet mask.