Why don't you re-read the answer in the message "Programming Pearls" binary search . He explains the process of 5 integers as you ask.
The idea is that you analyze each list and break it into 2 (where the binary part comes from) individual lists based on the value in the first bit.
those. display of the binary representation of the actual numbers Original list "": 001, 010, 110, 000, 100, 011, 101 => (broken into)
(we remove the first bit and add it to the "name" of the new list)
To form each of the lists below, we took values ββstarting from [0 or 1] from the list above
List " 0 ": 01, 10, 00, 11 (formed from a subset 001, 010, 000, 011 of list "", deleting the first bit and adding a new list to the "name")
List " 1 ": 10, 00, 01 (formed from a subset of 110, 100, 101 of list "", removing the first bit and adding it to the "name" of the new list)
Now take one of the resulting lists in turn and repeat the process:
List " 0 " becomes your original list, and you break it into
List "0 *** 0 **" and
List "0 *** 1 **" (bold numbers again are 1 [remaining] number of numbers in the broken list)
Continue until you are done with an empty list.
EDIT
The process step by step:
List ": 001, 010, 110, 000, 100, 011, 101 =>
List "0": 01, 10, 00, 11 (from a subset 001, 010, 000, 011 of the list "") =>
List "00": 1, 0 (from a subset 01, 00 of list "0") =>
List "000": 0 [end result] (from subset 0 of list "00")
List "001": 1 [end result] (from subset 1 of list "00")
List "01": 0, 1 (from subset 10, 11 of list "0") =>
List "010": 0 [end result] (from the subset 0 of list "01")
List "011": 1 [end result] (from subset 1 of list "01")
List "1": 10, 00, 01 (from a subset of 110, 100, 101 of list "") =>
List "10": 0, 1 (from subset 00, 01 of list "1") =>
List "100": 0 [end result] (from a subset of 0 of list "10")
List "101": 1 [end result] (from subset 1 of list "10")
List "11": 0 (from a subset of 10 from list "1") =>
List "110": 0 [end result] (from subset 0 of list "11")
List "111": missing [end result] (from a subset of the EMPTY list "11")
The positive thing about this method is that it allows you to find ANY number of missing numbers in the set - i.e. if more than one is missing.
PS AFAIR for 1 single missing number from the full range there is an even more elegant XOR solution for all numbers.