Find all pairs $(m,n)$ of positive integers such that $m+n$ and $mn+1$ are both powers of $2$.
1. We start by expressing \( m+n \) and \( mn+1 \) as powers of 2:
   \[
   m+n = 2^{a+1} \quad \text{and} \quad mn+1 = 2^b
   \]
   where \( a \ge 0 \) and \( b \ge 1 \).

2. Without loss of generality, assume \( m \ge n \). This implies that both \( m \) and \( n \) are even, because the sum of two odd numbers or two even numbers is even, and the product of two odd numbers plus one is even.

3. Let \( d = \frac{m-n}{2} \), which is an integer. Then we can write:
   \[
   m = 2^a + d \quad \text{and} \quad n = 2^a - d
   \]

4. Substitute these expressions into the equation \( mn + 1 = 2^b \):
   \[
   (2^a + d)(2^a - d) + 1 = 2^b
   \]
   Simplify the left-hand side:
   \[
   4^a - d^2 + 1 = 2^b
   \]
   Rearrange to get:
   \[
   4^a - 2^b + 1 = d^2
   \]

5. We need \( 4^a - 2^b + 1 \) to be a perfect square. Note that:
   \[
   4^a - 2^b + 1 < 4^a = (2^a)^2
   \]
   Therefore:
   \[
   4^a - 2^b + 1 \le (2^a - 1)^2 = 4^a - 2^{a+1} + 1
   \]
   This implies:
   \[
   a+1 \le b
   \]

6. Since \( 2^b \mid d^2 - 1 \), we have:
   \[
   2^{a+1} \mid d^2 - 1 = (d-1)(d+1)
   \]
   One of the factors \( d-1 \) or \( d+1 \) must be divisible by \( 2^a \) because not both can be divisible by 4. Given \( 0 < d < 2^a \), this is only possible if \( d = 1 \) or \( d = 2^a - 1 \).

7. If \( d = 1 \):
   \[
   m = 2^a + 1 \quad \text{and} \quad n = 2^a - 1
   \]
   If \( d = 2^a - 1 \):
   \[
   m = 2^{a+1} - 1 \quad \text{and} \quad n = 1
   \]

8. Therefore, the pairs \((m, n)\) that satisfy the conditions are:
   \[
   (2^{a+1} - 1, 1) \quad \text{and} \quad (2^a + 1, 2^a - 1)
   \]
   and their reverses.

The final answer is \( \boxed{ (2^{a+1} - 1, 1) } \) and \((2^a + 1, 2^a - 1)\).