def get_bit_positions(bit_mask):
    """Return an array of positions for each enabled bit in bit_mask."""
    bit_positions = []
    # find bit positions of enabled bits in mask
    for i in range(16):
        if (bit_mask & (1 << i)) != 0:
            bit_positions.append(i)
    return bit_positions