The product of reduction of niacinamide is shown. For simplicity, the R group at the endocyclic N-atom is replaced by a H-atom. In NAD cation, nicotinamide is connected to the sugar as a pyridinium ion. The pyridinium ion accepts a hydride in the 4-position to form the quinoid system.