I tried this out and it worked fine (made a python version). So we have:
A = [2, 4, 6, 8, 10, 12]
key = 5
imin = 0
imax = 5
So let's go through the iterations (just going to print imin, imax, imid on each iteration, where imid = (imin + imax)/2):
0 5 2
0 1 0
1 1 1
key not found...