Discrete Binary Search

Can someone explain please the discrete binary search with an example…
I read from here http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binarySearch and got the basic idea of what it is. But still I am unable to understand the code part and its implementation.

//