Constructor
new Adder(line1, line2, cIn, result, cOut)
Wire up a the full adder with the specified input and output locations
Parameters:
Name | Type | Description |
---|---|---|
line1 |
Tri | Tri to read first input from |
line2 |
Tri | Tri to read second input from |
cIn |
Tri | Tri to read carry in from |
result |
Tri | Tri to output sum to |
cOut |
Tri | Tri to output carry out to |
Properties:
Name | Type | Description |
---|---|---|
line1 |
Tri | the first input line |
line2 |
Tri | the second input line |
cIn |
Tri | the carry in line |
result |
Tri | the output line |
cOut |
Tri | the carry out line |
hAdd_lines |
HalfAdder | the half adder for the input lines |
hAdd_cIn |
HalfAdder | the half adder for the result and carry in |
inter_c_1 |
Tri | the intermediate carry term for the input lines |
inter_c_2 |
Tri | the intermediate carry term for the result and carry in |
- Source:
Classes
Methods
compute()
Computes the sum and carry out of the two input lines and the carry in
line. The result is stored in the output line and the carry out is stored
in the specified carry out line.
- Source: