The end of Moore's law for CMOS technology has prompted the search for low-power computing alternatives, resulting in promising approaches such as nanomagnetic logic. However, nanomagnetic logic is unable to solve a class of interesting problems efficiently, as it only allows for forward computing, due to the need for clocking and/or thermal annealing. Here, we introduce nanomagnetic self-organizing logic gates that can dynamically satisfy their logical proposition, irrespective of whether the signal is applied to the traditional input or output terminals, thus allowing for reversible computing. We present a design of a self-organizing NAND gate, the logically correct states of which are occupied equally in thermodynamical equilibrium, and ...