7 7/8 = 63/ 8 ; 31/ 4 = 62/ 8 ; 63 / 8 - 62 / 8 = 1 / 8 .

[latex]7\frac{7}{8}-\frac{31}{4}=7\frac{7}{8}-\frac{28+3}{4}=7\frac{7}{8}-7\frac{3}{4}=7\frac{7}{8}-7\frac{3\cdot2}{4\cdot2}=7\frac{7}{8}-7\frac{6}{8}=\boxed{\frac{1}{8}}[/latex]