creating.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <html>
  2. <head>
  3. <title>Creating bundles</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1>Creating bundles</h1>
  7. <p>Every input and output on every component in the circuit has a
  8. bit width associated with it. Often the bit width is 1, and there is no way
  9. of changing that, but many of Logisim's built-in components
  10. include attributes allowing you to customize the bit widths of
  11. their inputs and outputs.</p>
  12. <p>The below screen shot illustrates a simple circuit
  13. for finding the bitwise AND of two three-bit inputs. Notice how the three-bit
  14. output is the bitwise AND of the two inputs. All components have been
  15. customized to deal with three-bit data via its Data Bits attribute; the screen
  16. shot shows the AND gate attributes, including the Data Bits attribute of 3.</p>
  17. <center><img src="../../../img-guide/bundles-create.png" width="502" height="251"></center>
  18. <p>All components in Logisim define a bit width for each of input and output.
  19. In contrast, a wire's bit width is undefined:
  20. Instead, the wire's width adapts to the components to which it
  21. is attached.
  22. If a wire connects two components demanding different bit widths,
  23. Logisim will complain of "Incompatible widths" and indicate the
  24. offending locations in orange.
  25. In the below, the output pin's Data Bits attribute has been
  26. changed to 1, and so Logisim complains that the wire cannot
  27. connect a three-bit value to a one-bit value.</p>
  28. <center><img src="../../../img-guide/bundles-error.png" width="502" height="251"></center>
  29. <p>Wires that connect incompatible locations (drawn in orange)
  30. do not carry values.</p>
  31. <p>For single-bit wires, you can see at a glance what value the wire carries
  32. because Logisim colors the wire light or dark green depending the value.
  33. It does not display values for multi-bit wires: They are simply
  34. black. You can, though, probe a wire by clicking it using the
  35. poke tool (<img src="../../../icons/poke.gif" width="16" height="16">).</p>
  36. <center><img src="../../../img-guide/bundles-probe.png" width="502" height="251"></center>
  37. <p>This probing feature is helpful for debugging circuits using
  38. wire bundles.</p>
  39. <p><strong>Next:</strong> <a href="splitting.html">Splitters</a>.</p>
  40. </body>
  41. </html>