Given a decimal, generate the binary equivalent string of
        given length.
        e.g. binary(2, 5) = 00010

def to_binary(decimal, length):
        """
        Given a decimal, generate the binary equivalent string of
        given length.
        e.g. binary(2, 5) = 00010
        """
        b = bitstring.Bits(int=decimal, length=length)
        return b.bin