Tech Mahindra interview question

Explain about Binary search and how to implement it.