A fab produces a batch of 8 ASICs. Exactly one of them is highly resistive (defective) and draws less current, making it run slightly cooler, while the other 7 are identical and run hotter. You have a thermal comparator that can compare the heat of two groups of chips simultaneously to see which group is cooler, or if they are equal. What is the minimum number of comparisons needed to guarantee finding the defective chip?
Divide the 8 chips into three groups: A (3 chips), B (3 chips), and C (2 chips). Comparison 1: Compare A and B.
If A and B are equal, the defective chip is in C. Comparison 2: Compare the 2 chips in C; the cooler one is defective.
If A is cooler, the defective chip is in A. Take the 3 chips in A and pick any 2. Comparison 2: Compare these 2 chips. If one is cooler, it's the defective one. If they are equal, the 3rd unweighed chip from group A is the defective one. Thus, 2 comparisons are always sufficient.