def unpackRangeBits(ur1, ur2, ur3, ur4):
    """Given the ulUnicodeRange1, ulUnicodeRange2, ulUnicodeRange3,
    ulUnicodeRange4 values from the OS/2 table, return a set of bit numbers.

        >>> unpackRangeBits(0x0, 0x0, 0x0, 0x0)
        set()
        >>> unpackRangeBits(0x1, 0x0, 0x0, 0x0)
        {0}
        >>> unpackRangeBits(0x1, 0x1, 0x1, 0x1)
        {0, 32, 64, 96}
        >>> unpackRangeBits(0xffffffff, 0x1, 0x2, 0x4)
        {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 65, 98}
    """
    bitNum = 0
    bitSet = set()
    for bitField in [ur1, ur2, ur3, ur4]:
        for localBitNum in range(32):
            mask = 1 << localBitNum
            if bitField & mask:
                bitSet.add(bitNum)
            bitNum += 1
    assert bitNum == 128
    return bitSet