# totally disconnected compact hausdorff space

could any one tell me how to show that a totally disconnected compact hausdorff space is homeomorphic to a closed subspace of a product of discrete two point spaces.

I am not able to see a known example of such space, so I am not able to proceed through my intuition.please help

-
The Cantor set is an example (or any convergent sequence including the limit point). –  Martin Jan 12 '13 at 17:18
@Martin Thank you very much –  Bunuelian Trick Jan 12 '13 at 17:19

HINT: For each clopen set $H\subseteq X$ the function
$$f_H:X\to\{0,1\}:x\mapsto\begin{cases} 1,&\text{if }x\in H\\ 0,&\text{if }x\notin H \end{cases}$$
is a continuous function from $X$ to the discrete two-point space. Let $\mathscr{H}$ be the set of all clopen subsets of $X$, and for each $H\in\mathscr{H}$ let $D_H$ be a copy of the discrete two-point space. Define a map
$$\varphi:X\to\prod_{H\in\mathscr{H}}D_H:x\mapsto\langle f_H(x):H\in\mathscr{H}\rangle\;,$$
and show that $\varphi$ is a homeomorphism of $X$ onto $\varphi[X]$.