Implementing a qubit quantum computer in continuous-variable systems conventionally requires the engineering of specific interactions according to the encoding basis states. In this work, we present a unified formalism to conduct universal quantum computation with a fixed set of operations but arbitrary encoding. By storing a qubit in the parity of two or four qumodes, all computing processes can be implemented by basis state preparations, continuous-variable exponential-swap operations, and swap-tests. Our formalism inherits the advantages that the quantum information is decoupled from collective noise, and logical qubits with different encodings can be brought to interact without decoding. We also propose a possible implementation of the required operations by using interactions that are available in a variety of continuous-variable systems. Our work separates the 'hardware' problem of engineering quantum-computing-universal interactions, from the 'software' problem of designing encodings for specific purposes. The development of quantum computer architecture could hence be simplified.Introduction-In a wide range of quantum computational tasks, the basic quantity of quantum information is a two-level system that can be prepared in an arbitrary superposition state (qubit) [1]. If the quantum system consists of individually addressable energy eigenstates, such as the internal levels in trapped atoms or the polarisation states of electron spins [2], the qubit bases are most trivially represented by two of such states. On the other hand, there are also quantum systems, such as optical modes [3], mechanical oscillators [4], quantised motion of trapped ions [5], and spin ensembles [6,7], that consist of an abundance of evenly-spaced energy levels. In these systems, usually referred to as continuous-variable (CV) systems, addressing a particular energy eigenstate is usually challenging. There is thus no trivial CV representation of a qubit.