'Return a string representation as a binary value.
>>> print(IP(\'127.0.0.1\').strBin())
01111111000000000000000000000001
>>> print(IP(\'2001:0658:022a:cafe:0200::1\').strBin())
00100000000000010000011001011000000000100010101011001010111111100000001000000000000000000000000000000000000000000000000000000001'

def strBin(self, wantprefixlen=None):

    bits = _ipVersionToLen(self._ipversion)
    if ((self.WantPrefixLen == None) and (wantprefixlen == None)):
        wantprefixlen = 0
    ret = _intToBin(self.ip)
    return ((('0' * (bits - len(ret))) + ret) + self._printPrefix(wantprefixlen))
