Elements in beginning or end of an array in Binary Search

I have been trying to understand the binary search algorithm which is quite simple but I have one question which is bothering me. I might have understand it wrong.

1) When we start searching for an element in an array, we checked three scenarios i) If the element is in the middle. ii) If it is greater then middle element. iii) If it less then the middle element.

My question is I understand this algorithm tries to find the element by diving the array and using the above check pints but what if the element we are searching for is in the beginning or end of array. for example if

a = {12, 14, 15, 16, 17, 18 , 19, 20} ;

and we are looking for number 12 then why would it has to do all the divide and checking when it can find it in the first element of array. Why don't we also check the starting and end element of every binary search iteration instead of just only three scenarios stated above?

Thanks.
It's not worth it. On average it would be slower.
Thank for your reply Peter. That's what I thought too and it makes sense. This situation will probably come ten in a million time and I think not worth checking in every iteration.
Topic archived. No new replies allowed.