0

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.

It's only worth two marks so I'm not sure what the point of this exactly is,

My answer was a single XOR gate with inputs from A0-a15 Any ideas?

rahulchawla
  • 170
  • 1
  • 3
  • 20
  • Write out the representations of some numbers that **are** divisible by 16, and some that **aren't**. What do you notice? – Oliver Charlesworth Dec 06 '17 at 18:06
  • mhm i notice only a few bits are 1, so would it be an or gate?@OliverCharlesworth – rahulchawla Dec 07 '17 at 04:43
  • theres no specific positions of 1's in the bit pattern @OliverCharlesworth – rahulchawla Dec 07 '17 at 04:57
  • `only worth two marks so I'm not sure what the point of this exactly is` A low rating is an indication that answering *should* be easy: take the need to guess as a hint that you missed something. – greybeard Mar 25 '18 at 09:52

0 Answers0