Swap     Last updated on 2009      10     3, a full moon day

 

Brief introduction: in 1995, this algorithm was invented together with classmate Ig. Wong [ at 10PM。 at main library。 while doing Computer Architecture homework assignment ], while studying for a MS degree in Computer Science, Western Illinois University, Macomb, Illinois, USA。

 

Swapping Two Integer Variables Without Temporary Variable。 By utilizing 3 exclusive-or gates, two integer variables can be swapped ...。e.g.:    x^=y^=x^=y。 in C language。 Notice that all the bits in the variables x and y will be swapped by the x-or gates。 Also see: MaterialsPin pointing technique for optical computingProcessorToggleTransistor

 

Time . Space . Action, Eastern Thought's concept must be understood 1st, and then how a processor behaves as a pivot table in time can be further studied。 Swap is one of the most difficult software techniques, and beyond this swapping technique, hardware engineering must be learnt such as HOW time is calculated in ACT1 stage [also see: 2000s' "light_rate" 1.... and 1 is in 24mm natural time aka "tic tic tic" in analog quartz . ...], simulation of HOW future parallel time is calculated for a processor in ACT2 stage, and ACT3 stage natural time slows down due to very very far distance away from our universe [a Myanmar's imaginary hyperspace craft's problem], ... 。  

 

Assume that variable x contains 5 in base 10. And variable y contains 10 in base 10.

Therefore,

x value in base 2 is:       0101

y value in base 2 is:       1010

 

x value in base 2 is:       1010

y value in base 2 is:       0101

 

IFF 88...88 aka light_rate, ☟Ⓞᅍ%^=ᅍ%^=ᅍ%^=ᅍ%。

IFF 1..1, ☟Ⓞɟ♯^=ɟ♯^=ɟ♯^=ɟ♯。

IFF language, x^=y^=x^=y。

 

Remark: USA MYANMAR NET provides/allows the swapping technique for further scientific testing purposes with/without propagation delay, clock cycles in pipelining, and etc. ... 。 Formula?

...

 

Up