The ring of continuous real-valued functions on a Stone space Let $X$ be a topological space and consider the ring $C(X,\mathbb{R})$ of continuous real-valued functions on $X$ (where ring-addition and multiplication are defined in the obvious point-wise way).
It is well-known that this ring uniquely determines the topological space, if the latter is compact and Hausdorff (Gelfand-Duality).
My question is the following: What properties does the ring $C(X,\mathbb{R})$ have, if $X$ is a Stone space (that is, if $X \in Comp_2$ is also totally disconnected)? Ideally, I would like to have a statement along the following line:
$X$ is a Stone space (if and) only if the ring $C(X,\mathbb{R})$ has the property [nice property given to me by the lovely folks from MO].
 A: At first Let me recall the notion of a clean ring:
Definition:A commutative ring $R$ is called  clean if every element of $R$ is a sum of a unit and an idempotent.
The following theorem is due to F.Azarpanah who first studied The notion of cleanness in rings of continuous real valued functions. you can find the details of it in This Article 
Theorem1:The following statements are equivalent:


*

*$C(X)$ is a clean ring.

*$C^*(X)$ is a clean ring.

*$X$ is strongly zero-dimensional.(i.e. $\beta X$ is zero-dimensional or stone space. )

*Every zero-divisor in $C(X)$ is clean.

*$C(X)$ has a clean prime ideal.


I think  the illustrious part the above theorem is the relation between cleanness of $C(X)$ and   Zero-dimensionality of $\beta X$.
Now Lets turn to your Question. I think the following theorem relates stone spaces to the cleanness property of $C(X)$.
Theorem2:Let $X$ be a compact space. then $X$ is a Stone Space if and only if the ring $C(X)$ is a clean ring.
The proof is clear. because in this case $C(X)=C^*(X)$ is clean iff $\beta X=X$ is Zero dimensional or iff $X$ is a Stone Space. 
A: The projections are the characteristic functions on compact open subsets. So you want an identity and that the projections generate a dense subalgebra. 
A: The answer is given by the following theorem (Davidson's $C^\*$-Algebras by Example, III, 2.5).

Let $A$ be a commutative C*-Algebra. Then the following statements are equivalent:

*

*$A$ is an AF-algebra, i.a. a colimit of a sequence of finite-dimensional C*-algebras

*$A$ is separable and the projections in $A$ generate a dense subspace.

*The spectrum of $A$ is totally disconnected.


Thus, the category of locally compact totally disconnected Hausdorff spaces is equivalent to the category of commutative AF-algebras; the inverse functors are $C_0(-,\mathbb{C})$ and $\mathrm{Spm}$. Under this equivalence, compact corresponds to unital. The finite-dimensional commutative algebras are just powers of $\mathbb{C}$, corresponding to finite sets, but colimits produce interesting examples:
For example, if $X$ is the Cantor set, then it is easy to see that $C_0(X,\mathbb{C})$ is the colimit of the sequence $\mathbb{C} \to \mathbb{C}^2 \to \mathbb{C}^{2^2} \to \dotsc$, where $\mathbb{C}^{2^n} \to \mathbb{C}^{2^{n+1}}, a \mapsto (a,a)$. In general, AF-algebras are classified via so-called Bratteli-diagrams (see loc. cit).
By the way, there is a nice connection to Stone duality, which says that $C_0(-,\mathbb{F}_2)$ exhibits an equivalence of categories between the category of locally compact totally disconnected Hausdorff spaces and the category of boolean rings. In the diagram you just exchange $\mathbb{C}$ with $\mathbb{F}_2$. I would love to see a purely algebraic functor $\mathbb{F}_2 \otimes_{\mathbb{C}} (-)$, which doesn't use the spectrum as an intermediate step ...
