Binary Searching is an efficient algorithm for locating a given
element in an array of sorted elements.

Binary Searching always regards only a certain partition of the array.
The first partition covers the complete array. The partition is
halved in each iteration by adapting the partition borders.
If the value is found, its position is returned; otherwise, 
the algorithm with return -1 as an 'error mark'.

Pseudo code:

Test if the array exists and has a valid length.
Test if the boundaries passed in are valid array indexes.
Determine the partition's middle position mid = (l + r) / 2.
If array[mid] = value:
  return mid.
If value < array[mid]:
  return search(array, value, l, mid - 1).
Otherwise:
  return search(array, value, mid + 1, r).

In the following animation, the current partition will be highlighted.