# Logic Circuits - Binary divisible by 16 [closed]

I have a question

  Given a 16-bit register A holding a number in 2’s complement form, use a
single gate (e.g., AND, OR,
XOR, NAND, NOR, NOT) with an arbitrary number of inputs to implement a
circuit that produces an
output 1 if the number is divisible by 16, and an output 0 otherwise. The
bits are labelled A15, A14, ..., A0.


I'm confused at how this answer is expected because the question is only 2 marks my answer was that it would be a single XOR gate with inputs a0-a15 - would this be correct and why?

• We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. – D.W. Dec 7 '17 at 6:04
• Why don't you write some code to implement your solution, and check what it computes for all $2^{16}$ possible values of the register and check whether it is correct in all cases? That way you can check your own answer... you don't need us. – D.W. Dec 7 '17 at 6:05