Constants?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Constants?

Jacob Zimmerman
I'm attempting to make something that turns a 16-bit number into its opposite, using the twos compliment.  Unfortunately, I can't figure out how to pass '1' into the Add16 chip.
Anyone know how to do constants like this without making it an input?
I think I may have found a workaround with a dummy chip that, no matter what you input into it, it returns a 16-bit '1', but this seems dumb.
Reply | Threaded
Open this post in threaded view
|

Re: Constants?

cadet1620
Administrator
Jacob Zimmerman wrote
I'm attempting to make something that turns a 16-bit number into its opposite, using the twos compliment.  Unfortunately, I can't figure out how to pass '1' into the Add16 chip.
Read Appendix A.5.3 carefully to learn how to use true and false to set a part's input to 1.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Constants?

Jacob Zimmerman
Still lost.
Reply | Threaded
Open this post in threaded view
|

Re: Constants?

cadet1620
Administrator
You want something that looks like this. Fill in the blanks.
    Add16(a[__]=__, a[__]=_, b=...);

Still lost? Send me email.

--Mark