If num is less than 2, return True since 0 and 1 are perfect squares.
Set the left boundary to 2 and the right boundary to num / 2.
While the left boundary is less than or equal to the right boundary:
a. Take the middle element as the guess (x = (left + right) / 2).
b. Calculate guess_squared (x * x).
c. If guess_squared equals num, return True.
d. If guess_squared is greater than num, move the right boundary to x - 1.
e. If guess_squared is less than num, move the left boundary to x + 1.
If the loop ends, return False as num is not a perfect square.