def _ipv4_to_bits(ipaddr):
    """
    Accepts an IPv4 dotted quad and returns a string representing its binary
    counterpart
    """
    return ''.join([bin(int(x))[2:].rjust(8, '0') for x in ipaddr.split('.')])