The answer is 4. It's binary code.
Imagine the top line is 1, the middle is 2 and the bottom is 4.
In the first puzzle, lines 2 and 3 are intact. The values for lines 2 and 3 is six.
In the second, only the top line is intact, so the value is one.
The third has the top two lines, 1+2=3