Estimating mle of parameter of exponential distribution I have a machine component whose life time is distributed as exponential with parameter $\lambda$
I switch on $n$ such components at time 0, then observe their performances during time $t$ and $t+z$ and see which one are still running during that time. I note binary variable for each such components with a random variable $X_i$ that takes 1 if fails and otherwise 0.
Based on this information, is it possible to obtain mle of $\lambda$?

Disclaimer: The final answer is pending on OP's further clarification.
This is an example of type I censoring in survival analysis: instead of observing the exact life duration, a binary status is observed for a pre-specified time period. In your question, you also noticed that the observation $X_i$ takes values $0$ and $1$ -- this is a good start, the next step is simply to ascertain the distribution of $X_i$, which is governed by the underlying exponential distribution.
If $t > 0$, the likelihood function depends on further clarification on the problem.  Below is a solution assuming that no components failed before time $t$, which yields the likelihood for component $i$ as:
\begin{align}
P(X_i = 1) = P(t < T_i < t + z | T_i > t) = 1 - e^{-\lambda z},
\end{align}
where $T_i \sim \exp(\lambda)$ is the actual life duration (unobserved) of the $i$-th component. The likelihood function based on the sample $\{X_1, X_2, \ldots, X_n\}$ is thus
\begin{align}
L(\lambda) = \prod_{i = 1}^n \left(1 - e^{-\lambda z}\right)^{X_i}\left(e^{-\lambda z}\right)^{1 - X_i}. \tag{1}
\end{align}
If denote $1 - e^{-\lambda z}$ by $p$, it is easy to verify that $(1)$ coincides with the likelihood function of a single observation $Y \sim B(n, p)$. Therefore, the MLE of $\lambda$ can be obtained by equating $1 - e^{-\lambda z}$ to $\sum X_i/n$ (of course, you may also maximize $(1)$ with respect to $\lambda$ to find $\hat{\lambda}$ directly), i.e.,
\begin{align}
1 - e^{-\hat{\lambda}z} = \frac{1}{n}\sum_{i = 1}^n X_i, 
\end{align}
which yields
\begin{align}
\hat{\lambda} = - \frac{1}{z}\log\left(1 - \frac{1}{n}\sum_{i = 1}^n X_i\right).
\end{align}
