\[\boxed{\mathbf{501}\mathbf{.}}\]
\[1)\ 2\sin\frac{\pi}{8} \bullet \cos\frac{\pi}{8} = \sin\left( 2 \bullet \frac{\pi}{8} \right) =\]
\[= \sin\frac{\pi}{4} = \frac{\sqrt{2}}{2}\]
\[2)\cos^{2}\frac{\pi}{8} - \sin^{2}\frac{\pi}{8} = \cos\left( 2 \bullet \frac{\pi}{8} \right) =\]
\[= \cos\frac{\pi}{4} = \frac{\sqrt{2}}{2}\]
\[3)\ \frac{2\ tg\frac{\pi}{8}}{1 - tg^{2}\frac{\pi}{8}} = tg\left( 2 \bullet \frac{\pi}{8} \right) =\]
\[= \text{tg}\frac{\pi}{4} = 1\]
\[4)\ \frac{\sqrt{2}}{2} - \left( \cos\frac{\pi}{8} + \sin\frac{\pi}{8} \right)^{2} =\]
\[= \frac{\sqrt{2}}{2} - \left( 1 + \cos\frac{\pi}{4} \right) =\]
\[= \frac{\sqrt{2}}{2} - \left( 1 + \frac{\sqrt{2}}{2} \right) =\]
\[= \frac{\sqrt{2}}{2} - 1 - \frac{\sqrt{2}}{2} = - 1\]