title: Determining if two IP adresses are on same subnet - is it leading or trailing 0s get dropped from IP address?
body: <p>I understand if two IP addresses are AND'd with a subnet mask if the result is the same then they are on the same network. If the result is different then they are on different networks. My question is, when given an IP address omitting some 0s where do the extra 0s get placed?</p>
  
  <p>For example if the subnet mask is 255 . 128 . 0 . 0 , and you have IP 126 . 1 . 0 . 10 and IP 126 . 127 . 0 . 1 if you just blindly AND the IPs with the subnet mask you get different results even though they are on the same network.  </p>
  
  <p>Does 126.1.0.10 become 126.100.000.100 or 126.001.000.100?</p>
  
  <p>EDIT after reading replies:</p>
  
  <p>255128000000 AND 126001000010 = 1085496376*32* <strong>but</strong> 255128000000 AND 126127000001 = 1085276323*84*<br>
  Am I missing something?</p>