Chirality is ubiquitous in nature and chiral objects in condensed matter are often excited states protected by system's topology. The use of chiral topological excitations to carry information has been demonstrated, where the information is robust against external perturbations. For instance, reading, writing, and transfer of binary information are demonstrated with chiral topological excitations in magnetic systems, skyrmions, for spintronic devices. However, the next step, the logic or algebraic operation of such topological bits has not been realized yet. Here, we show experimentally the switching between solitons of different chirality in a one-dimensional electronic system with $Z_4$ topological symmetry. We found that a fast-moving achiral soliton merges with chiral solitons to switch their handedness. This corresponds to the realization of algebraic operation of $Z_4$ topological numbers. Chiral solitons could be exploited for storage and operation of robust topological multi-digit information.