A nonstrict three-bit adder. This adder has one input port, which is a
multiport, and two output ports, which are single ports. All of the ports
are of type int, and inputs are outputs are single bits. An exception is
thrown if a number other than 0 or 1 is received as an input, or if there
are not exactly three channels connected to the input port. This actor
adds the three input bits, and outputs the result to the lowBit and highBit
ports. Only two of the inputs must be known for highBit to be determined.
All inputs are necessary for lowBit to be determined. An absence of a token
is considered to have no contribution to the sum (same as value the zero).
If no input tokens are available at all, then no output is produced.
Paul Whitaker
$Id: NonStrictThreeBitAdder.java 70398 2014-10-22 23:44:32Z cxh $
Ptolemy II 2.0
Red (pwhitake)
Red (pwhitake)
Inputs for bits to be added. The types are integer, and only
ones and zeros are expected.
Output for the high bit. The type is integer, and only ones and
zeros will be sent.
Output for the low bit. The type is integer, and only ones and
zeros will be sent.