Tuesday, May 16, 2017

logical deduction - Find the direction of the disc


You have a disc. One half of the disc is painted white and the other half is black. The disc rotates in either a clockwise direction or an anti-clockwise direction.


There are two sensors which are not connected to the disc but are in a fixed position, pointed at the disc. They are at 90° from each other with respect to the center of the disc. The sensors output the value 1 when reading white and 0 when reading black.


Using only the output of the two sensors, find the direction in which the disc is rotating.


Diagram of Disc



Answer



There are four possible initial states for the sensor. There are two possible changes, one for clockwise, one for counter clockwise.


The disc is rotating clockwise if Sensor 1 changes to the value of Sensor 2 and Sensor 2 becomes Sensor 1 XOR 1



The disc is rotating counter clockwise if Sensor 1 changes to the value of Sensor 2 XOR 1 and Sensor 2 becomes Sensor 1.


enter image description here


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...