The document defines registers to store values and pointers used in a binary search algorithm. It initializes pointers to the first and last data items, loads a target value, and displays a prompt. The main loop calculates a midpoint, compares the target value, and either updates the start or end pointer before repeating. If found, the location is displayed, otherwise a not found message displays before restarting.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views1 page
Binary Search
The document defines registers to store values and pointers used in a binary search algorithm. It initializes pointers to the first and last data items, loads a target value, and displays a prompt. The main loop calculates a midpoint, compares the target value, and either updates the start or end pointer before repeating. If found, the location is displayed, otherwise a not found message displays before restarting.