Sensys Networks Interview Question

Write a binary search function in any language.