from typing import List


def un(n:int, i:int) -> List[int]:
    """returns a list [0,1,1,0] which has n elements and is the binary expression of i, most significant bit first"""
    r = []
    while n > 0:
        r.insert(0, i % 2)
        i = i >> 1
        n = n - 1
    assert i == 0, "i to big for n"
    return r