10 lines
287 B
Text
10 lines
287 B
Text
|
|
[[wp:Two's_complement|Two's complement]] is an important concept in representing negative numbers. To turn a positive integer negative, flip the bits and add one.
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
;Task
|
||
|
|
Show how to calculate the two's complement of an integer. (It doesn't necessarily need to be a 32 bit integer.)
|
||
|
|
|
||
|
|
|
||
|
|
|