Find all solutions $x,y \in \mathbb{Z}$, $x,y \geq 0$, to the equation \[ 1 + 3^x = 2^y. \]
To find all solutions \( x, y \in \mathbb{Z} \) with \( x, y \geq 0 \) to the equation 
\[ 1 + 3^x = 2^y, \]
we can proceed as follows:

1. **Consider the equation modulo 8:**
   \[ 1 + 3^x \equiv 2^y \pmod{8}. \]
   We need to analyze the possible values of \( 3^x \mod 8 \) and \( 2^y \mod 8 \).

2. **Evaluate \( 3^x \mod 8 \):**
   - For \( x = 0 \): \( 3^0 = 1 \equiv 1 \pmod{8} \).
   - For \( x = 1 \): \( 3^1 = 3 \equiv 3 \pmod{8} \).
   - For \( x = 2 \): \( 3^2 = 9 \equiv 1 \pmod{8} \).
   - For \( x = 3 \): \( 3^3 = 27 \equiv 3 \pmod{8} \).
   - Notice that \( 3^x \mod 8 \) cycles with a period of 2: \( 1, 3, 1, 3, \ldots \).

3. **Evaluate \( 2^y \mod 8 \):**
   - For \( y = 0 \): \( 2^0 = 1 \equiv 1 \pmod{8} \).
   - For \( y = 1 \): \( 2^1 = 2 \equiv 2 \pmod{8} \).
   - For \( y = 2 \): \( 2^2 = 4 \equiv 4 \pmod{8} \).
   - For \( y = 3 \): \( 2^3 = 8 \equiv 0 \pmod{8} \).
   - For \( y = 4 \): \( 2^4 = 16 \equiv 0 \pmod{8} \).
   - For \( y \geq 3 \), \( 2^y \equiv 0 \pmod{8} \).

4. **Analyze the possible values:**
   - If \( y \geq 3 \), then \( 2^y \equiv 0 \pmod{8} \). This implies \( 1 + 3^x \equiv 0 \pmod{8} \), which is not possible since \( 1 + 3^x \) can only be \( 2 \) or \( 4 \pmod{8} \).
   - Therefore, \( y < 3 \).

5. **Check the cases for \( y = 0, 1, 2 \):**
   - For \( y = 0 \): \( 2^0 = 1 \). The equation becomes \( 1 + 3^x = 1 \), which implies \( 3^x = 0 \), not possible.
   - For \( y = 1 \): \( 2^1 = 2 \). The equation becomes \( 1 + 3^x = 2 \), which implies \( 3^x = 1 \). Thus, \( x = 0 \).
   - For \( y = 2 \): \( 2^2 = 4 \). The equation becomes \( 1 + 3^x = 4 \), which implies \( 3^x = 3 \). Thus, \( x = 1 \).

6. **Verify the solutions:**
   - For \( (x, y) = (0, 1) \): \( 1 + 3^0 = 1 + 1 = 2 = 2^1 \), valid.
   - For \( (x, y) = (1, 2) \): \( 1 + 3^1 = 1 + 3 = 4 = 2^2 \), valid.

Thus, the only solutions are \( (x, y) = (0, 1) \) and \( (x, y) = (1, 2) \).

The final answer is \( \boxed{ (x, y) = (0, 1) } \) and \( (x, y) = (1, 2) \).