extension Int { subscript(i: Int) -> Int { return self << i }}let n = 5 //101//shift left by 1let n1 = n[1]//n1 is 10 (1010)//shift right by 2let n2 = n[-2]//n2 is 1print("n1 is", n1)print("n2 is", n2)