Binary search calculates the middle element using the formula (low + high) / 2, where low and high are the current bounds.