A broadcast address is an IP address that you can target you to all systems on a specific subnet instead of single hosts. The broadcast address of any IP address can be calculated by taking the bit compliment of the subnet mask , sometimes referred to as the reverse mask, and then applying it with a bitwise OR calculation to the IP address in question.
Some systems which are derived from BSD use zeros-broadcasts instead of ones-broadcasts. This means that when you create a broadcast address, you fill the host area of the IP address while displayed using binary values with zeros instead of ones. Most operating systems use ones-broadcasts.
Changing systems to use zeros-broadcasts will break some communications in the wrong environments, so understand your needs before changing your broadcast address or its type.
Math example for Broadcast:
If you have a system with IP address 192.168.12.220 and a network mask of 255.255.255.128, what should the broadcast address for the system be?
Remember, to do this calculation, you need to convert all numbers to binary values. For bitwise OR, remember that any two values where at least one value is “1″, the result will be “1″, otherwise the result is “0″.
IP Address: 11000000 .10101000 .00001100 .11011100
Reverse Mask: 00000000 .00000000 .00000000 .01111111
Bitwise OR: ———————————————–
Broadcast: 11000000 . 10101000 . 00001100 . 11111111
Convert the binary value back to octal, and you have your resulting value of 192.168.12.255.