  A digit function is presented which provides the $i$th-digit in base $p$ of
any real number $x$. By means of this function, formulated within
$\mathcal{B}$-calculus, the local, nonlocal and global dynamical behaviors of
cellular automata (CAs) are systematically explored and universal maps are
derived for the three levels of description. None of the maps contain any
freely adjustable parameter and they are valid for any number of symbols in the
alphabet $p$ and neighborhood range $\rho$. A discrete general method to
approximate any real continuous map in the unit interval by a CA on the
rational numbers $\mathbb{Q}$ (Diophantine approximation) is presented. This
result leads to establish a correspondence between the qualitative behavior
found in bifurcation diagrams of real nonlinear maps and the Wolfram classes of
CAs. The method is applied to the logistic map, for which a logistic CA is
derived. The period doubling cascade into chaos is interpreted as a sequence of
global cellular automata of Wolfram's class 2 leading to Class 3 aperiodic
behavior. Class 4 behavior is also found close to the period-3 orbits.
