Having trouble determining circuit purpose
This isn't the solution to your assignment but I will give you a pretty good hint... What is the equivalent circuit for a half adder? (See below)



Picture can be found here... not my picture.

Wow, this sure looks pretty similar to your circuit above (wink wink)... Now look at the truth table... It's not the same as what your diagram has but there is some relationship. You notice that binary addition will give you a sum and a carry bit. Now try to relate a half adder circuit with the circuit that you have provided. What's the difference? How will X,Y,B,D relate? Could it be another binary operation other than binary addition? (The answer is yes but now it's up to you to figure that out.)