Multivalued logic devices are promising candidates for achieving high-density, low-power memory and logic functionalities. We present a ferromagnetic multilayer Hall junction device with four distinct resistance - and thus logic - states. The states can be encoded as a quaternary bit and decoded into two binary bits. We demonstrate a nonvolatile full adder that is based on a single Hall junction, the extraordinary Hall balance. The device can be easily integrated into complex logic circuits for logic-in-memory architectures.