We use micromagnetic simulations to demonstrate the feasibility of creating magnetic logic gates that process binary data encoded within the internal magnetization structure of domain walls in ferromagnetic nanowires. In the simulated nanowires, domain walls take the form of magnetic vortices, where the magnetization circulates either clockwise or anticlockwise. By exploiting differences in how these two domain-wall states interact with both notch-shaped defects and junctions in the nanowires, we design nanowire segments that act as NOT, FAN-OUT, NAND, AND, OR, and NOR logic gates. Potentially, these gates could be cascaded to perform any desired logical operation. Our simulations demonstrate the possibility of a class of magnetic devices in which domain walls carry digital information rather than merely delineate it.