Binary search - GCSE Computer Science Definition

Reviewed by: Robert Hampton

Last updated

Binary search is an efficient algorithm used to find the position of a target value within a sorted list. It works by repeatedly dividing the list in half and comparing the middle element with the target value. If the middle element matches the target, the search is complete. If the target value is smaller, the algorithm continues to search in the left half, otherwise it searches in the right half. This process is repeated until the target is found or the search interval is empty. Binary search is much faster than linear search, especially for large datasets, as it reduces the problem size by half with each step. This makes it particularly useful for searching in large, ordered datasets, which is a key concept in the GCSE Computer Science curriculum.

Need help reaching your target grade? Explore our notes, questions by topic and worked solutions, tailor-made for GCSE Computer Science.

Explore GCSE Computer Science

Share this article

Robert Hampton

Reviewer: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

The examiner written revision resources that improve your grades 2x.

Join now