Converts a sign and magnitude into a twos complement value. The TwosComplement output is the same dataset as the Unsigned input. A List input will produce List outputs.
CoreLib\Converters\Advanced
|
Bit/List Sign |
High if the input is to be converted to a negative twos complement output value. Low if the input is to be converted to a positive twos complement output value. This value is the same as the high bit of the twos complement input. |
|
Var/List Unsigned |
An MSBxxx, Lsbxxx, or BINxxx dataset to be converted to a twos complement number along with the specified Sign input. This input can also be considered the magnitude of the value. |
|
Bit ClkG |
Global clock if disconnected or a specific clock if connected |
|
Bit AClr |
Asynchronous clear. Has a value of 0 if disconnected. |
|
Bit Go |
Go |
|
Bit Wait |
Wait. Has a value of 0 if disconnected. Holds off Dones. |
|
Bit/List OFL |
Goes high if the input had its high bit set. This value is the same as the high bit of the Unsigned (magnitude) input. If the high bit of the Unsigned input is always zero, this OFL output is unnecessary. |
|
Var/List TwosComp |
The combination of the Unsigned input (the magnitude) with the Sign input resulting in a twos complement representation of the value. |
|
Bit ClkG |
Clock input pass through |
|
Bit AClr |
Asynchronous clear input pass through |
|
Bit Done |
Done. Data valid while Done is high. |
|
Bit Busy |
Busy. Hold off Gos. |
None
Input/Output Examples:
|
Sign |
Unsigned |
TwosComp |
OFL |
|
0 |
000 (0) |
000 (0) |
0 |
|
0 |
001 (1) |
001 (1) |
0 |
|
0 |
010 (2) |
010 (2) |
0 |
|
0 |
011 (3) |
011 (3) |
0 |
|
0 |
1XX |
??? |
1 |
|
1 |
000 (0) |
000 (0) |
0 |
|
1 |
001 (1) |
111 (-1) |
0 |
|
1 |
010 (2) |
110 (-2) |
0 |
|
1 |
011 (3) |
101 (-3) |
0 |
|
1 |
1XX |
??? |
1 |
None
None
Converts a sign and magnitude into a twos complement value. The TwosComplement output is the same dataset as the Unsigned input. A List input will produce List outputs. This object is asynchronous and may have difficulty meeting timing specifications with large datasets and/or faster frequencies.
CoreLib\Converters\Async\Advanced
|
Bit/List Sign |
High if the input is to be converted to a negative twos complement output value. Low if the input is to be converted to a positive twos complement output value. This value is the same as the high bit of the twos complement input. |
|
Var/List Unsigned |
An MSBxxx, Lsbxxx, or BINxxx dataset to be converted to a twos complement number along with the specified Sign input. This input can also be considered the magnitude of the value. |
|
Bit/List OFL |
Goes high if the input had its high bit set. This value is the same as the high bit of the Unsigned (magnitude) input. If the high bit of the Unsigned input is always zero, this OFL output is unnecessary. |
|
Var/List TwosComplement |
The combination of the Unsigned input (the magnitude) with the Sign input resulting in a twos complement representation of the value. |
None
Input/Output Examples:
|
Sign |
Unsigned |
TwosComp |
OFL |
|
0 |
000 (0) |
000 (0) |
0 |
|
0 |
001 (1) |
001 (1) |
0 |
|
0 |
010 (2) |
010 (2) |
0 |
|
0 |
011 (3) |
011 (3) |
0 |
|
0 |
1XX |
??? |
1 |
|
1 |
000 (0) |
000 (0) |
0 |
|
1 |
001 (1) |
111 (-1) |
0 |
|
1 |
010 (2) |
110 (-2) |
0 |
|
1 |
011 (3) |
101 (-3) |
0 |
|
1 |
1XX |
??? |
1 |
None
None