Answer:
The output is 1 for:







Explanation:
The first step is creating the truth table, from the most significant bit to the least significant. Then, each value is converted to decimal, like these two examples:


After the conversion, if the decimal equivalent of the 4-bit number is prime, the output is 1.
So, the output is 1 for 1,2,3,5,7,11,13
So
A - B - C - D - Decimal - Output
0 - 0 - 0 - 0 - 0 - 0
0 - 0 - 0 - 1 - 1 - 1
0 - 0 - 1 - 0 - 2 - 1
0 - 0 - 1 - 1 - 3 - 1
0 - 1 - 0 - 0 - 4 - 0
0 - 1 - 0 - 1 - 5 - 1
0 - 1 - 1 - 0 - 6 - 0
0 - 1 - 1 - 1 - 7 - 1
1 - 0 - 0 - 0 - 8 - 0
1 - 0 - 0 - 1 - 9 - 0
1 - 0 - 1 - 0 - 10 - 0
1 - 0 - 1 - 1 - 11 - 1
1 - 1 - 0 - 0 - 12 - 0
1 - 1 - 0 - 1 - 13 - 1
1 - 1 - 1 - 0 - 14 - 0
1 - 1 - 1 - 1 - 15 - 0