comparator.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <html>
  2. <head>
  3. <title>Comparator</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1><img align="center" src="../../../../en/icons/comparator.gif" width="32" height="32">
  7. <em>Comparator</em></h1>
  8. <p><table>
  9. <tr><td><strong>Library:</strong></td>
  10. <td><a href="index.html">Arithmetic</a></td></tr>
  11. <tr><td><strong>Introduced:</strong></td>
  12. <td>2.0 Beta 22</td></tr>
  13. <tr><td valign="top"><strong>Appearance:</strong></td>
  14. <td valign="top"><img src="../../../../en/img-libs/comparator.png" width="44" height="43"></td></tr>
  15. </table></p>
  16. <h2>Behavior</h2>
  17. <p>Compares two values, either as unsigned values or as two's-complement
  18. values, depending on the Numeric Type attribute. Normally, one of the
  19. outputs will be 1, and the other two outputs will be 0.</p>
  20. <p>The comparison is performed starting at the most significant bits in
  21. each number and descending downward in parallel until a location is
  22. found where the two values disagree. If, however, an error value or
  23. a floating value is encountered during this descent, then all outputs
  24. will match that error or floating value.</p>
  25. <h2>Pins</h2>
  26. <dl>
  27. <dt>West edge, north end (input, bit width matches Data Bits attribute)
  28. <dd>The first of the two values to be compared.
  29. <dt>West edge, south end (input, bit width matches Data Bits attribute)
  30. <dd>The second of the two values to be compared.
  31. <dt>East edge, labeled <tt>&gt;</tt> (output, bit width 1)
  32. <dd>1 if the first input is greater than the second input, 0 if
  33. the first input is less than or equal the second input.
  34. <dt>East edge, labeled <tt>=</tt> (output, bit width 1)
  35. <dd>1 if the first input equals the second input, 0 if
  36. the first input is not equal the second input.
  37. <dt>East edge, labeled <tt>&lt;</tt> (output, bit width 1)
  38. <dd>1 if the first input is less than the second input, 0 if
  39. the first input is greater than or equal the second input.
  40. </dl>
  41. <h2>Attributes</h2>
  42. <p>When the component is selected or being added,
  43. Alt-0 through Alt-9 alter its <q>Data Bits</q> attribute.</p>
  44. <dl>
  45. <dt>Data Bits</dt>
  46. <dd>The bit width of the component's inputs.</dd>
  47. </dl>
  48. <h2>Poke Tool Behavior</h2>
  49. <p>None.</p>
  50. <h2>Text Tool Behavior</h2>
  51. <p>None.</p>
  52. <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
  53. </body>
  54. </html>