First, the algorithm must be given a sorted list and the item to look for, called the target value. The algorithm then compares the middle item of the sorted list with the target value. If the middle item is the same as the target value, then the position of that middle item in the sorted list is returned by the algorithm. If the middle item is larger than the target value, then the algorithm will repeat the previous step, but this time only working on the lower half of the sorted list (where all the items are smaller than the middle item). The same is done if the middle item is smaller than the target value, but the algorithm will repeat the previous step on the upper half of the sorted list (where all the items are larger than the middle item).