A ring is called generalized Boolean if $a^2 = a$ for every element $a$.
It can be easily proved that a generalized Boolean ring is commutative and $a + a = 0$ for every element $a$.
A generalized Boolean ring with a unity is called a Boolean ring.
As will be shown below, a Boolean ring can be identified with a Boolean algebra.
It is well known, by Stone's representation theorem, that a Boolean algebra corresponds canonically to a compact totally disconnected space.
I will explain that a generalized Boolean ring corresponds canonically to a locally compact totally disconnected space.
Let $B$ be a lattice, i.e. a partially ordered set in which any two elements have a supremum and an infimum. $B$ is called a generalized Boolean algebra if it satisfies the following conditions.
(1) $B$ has a least element $0$.
(2) Let $a, b, c$ be elements of $B$.
$a\cap(b\cup c) = (a\cap b)\cup (a\cap c)$
$a\cup (b\cap c) = (a\cup b)\cap (a\cup c)$
(3) Let $a \in B$. there exists $b'$ such that $b\cap b' = 0, b\cup b' = a$ for every $b \le a$
A Boolean algebra is characterized as a generalized Boolean algebra with a greatest element(denoted by $1$).
The following is a typical example of a generalized Boolean algebra.
Let $X$ be a set.
Let $\Phi$ be a non-empty subset of the power set $P(X)$.
$\Phi$ is called a ring of sets on $X$ if it satisfies the following conditions.
Let $A, B$ be arbitrary elements of $\Phi$.
(1) $A\cup B \in \Phi$.
(2) $A \backslash B \in \Phi$.
Then $\Phi$ is a generalized Boolean algebra with the inclusion order.
Let $B, C$ be generalized Boolean algebra.
Let $f\colon B \rightarrow C$ be a map.
$f$ is called a homomorphism if it satisfies the following properties.
$f(a\cup b) = f(a) \cup f(b)$
$f(a\cap b) = f(a) \cap f(b)$
$f(0) = 0$
When $B$ and $C$ are Boolean algebras, $f$ is called a homomorphism of Boolean algebras if $f(1) = 1$.
Let $B$ be a generalized Boolean algebra.
Let $a, b \in B$.
There exists $c \in B$ such that $a \le c, b \le c$(for example $c = a \cup b$).
There exists $b' \in B$ such that $b\cap b' = 0, b\cup b' = c$.
It can be proved that $a\cap b'$ does not depend on a choice of $c$.
We denote $a \cap b'$ by $a \backslash b$.
We denote $(a\backslash b)\cup(b\backslash a)$ by $a\triangle b$ and call it the symmetric difference of $a$ and $b$.
It can be easily proved that $B$ is a generalized Boolean ring with addition $\triangle$ and multiplication $\cap$.
Conversely let $A$ be a generalized Boolean ring.
We denote $a \le b$ if $ab = a$.
It can be easily proved that this is an order relation and $A$ is a generalized Boolean algebra with this order.
Let $GBoolRng$ be the category of generalized Boolean rings(the morphisms are homomorphisms).
Let $GBoolAlg$ be the category of generalized Boolean algebras(the morphisms are homomorphisms).
Let $\mathcal{Set}$ be the category of small sets.
Let $U\colon GBoolRng \rightarrow \mathcal{Set}$,
Let $V\colon GBoolAlg \rightarrow \mathcal{Set}$ be the canonical functors(i.e. the forgetful functors).
By the above results, we get a functor $F\colon GBoolRng \rightarrow GBoolAlg$ and a functor $G\colon GBoolAlg \rightarrow GBoolRng$.
It is easy to see that $U = VF, V = UG, GF = 1, FG = 1$.
Hence we can identify a generalized Boolean ring with a generalized Boolean algebra.
It can be easily seen that there exists a similar result concerning Boolean rings and Boolean algebras.
Let $A$ be a generalized Boolean algebra.
Let $F_2$ be the two element Boolean algebra.
A homomorphism $\chi\colon A \rightarrow F_2$ is called a character of $A$ if $\chi \neq 0$.
We denote by $X(A)$ the set of characters of $A$.
Let $F_2^{A}$ be the set of maps $A \rightarrow F_2$.
We consider $F_2^{A}$ as a topological space with the product topology, where $F_2$ is endowed with discrete topology.
We consider $X(A)$ as a topological space with the subspace topology induced by $F_2^{B}$.
It can be proved that $X(A)$ is a locally compact totally disconnected Hausdorff space.
Let $S(X(A))$ be the set of compact open subsets of $X(A)$.
It is easy to see that $S(X(A))$ is a generalized Boolean algebra with the inclusion order.
Then the following theorem holds.
Generalized Stone's representation theorem
Let $A$ be a generalized Boolean algebra.
For $a \in A$, we denote by $a^*$ the set $\{\chi\in X(A)\colon \chi(a) = 1\}$.
Then $a^* \in S(X(A))$.
We define a map $\rho\colon A \rightarrow S(X(A))$ by $\rho(a) = a^*$.
Then $\rho$ is an isomorphism of generalized Boolean algebras.