I have the setup shown below where I can type in the binary number for each octet in the IP address and it will help me visualize what I need to add to get the IP address, however if I could just do somewhat of an IF/ELSE statement stating "If there is a 1 in cell x3, add the number above it, and if 0, dont add" and then let it add the entire octet to get the decimal number for that (I hope that makes sense). In the example below, it would add 128 and 64 and not add the other 6 bits which would equal out to 192 for that octet. What formula could I do to achieve this conversion? Secondly, would there be an easy way to do the reverse method, whereby if I was given 192, I could have it convert it to binary across those numbers and give me the binary number?
Bookmarks