Google interview question

write a binary search code to search through a sorted array