<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/style/rss/style.xsl" type="text/xsl" media="screen"?>
<rss version="2.0">
	<channel>
		<title>깊은 산 속 곰탱군</title>
		<link>http://rhakuma.tistory.com/</link>
		<description>곰탱군 스토리</description>
		<language>ko</language>
		<pubDate>Mon,  2 Jun 2008 18:16:42 +0900</pubDate>
		<generator>Tistory 1.1</generator>
		<image>
		<title>깊은 산 속 곰탱군</title>
		<url><![CDATA[http://cfs5.tistory.com/upload_control/download.blog?fhandle=YmxvZzE1NTMzNUBmczUudGlzdG9yeS5jb206L2F0dGFjaC8wLzAuanBn]]></url>
		<link>http://rhakuma.tistory.com/</link>
		<description>곰탱군 스토리</description>
		</image>
		<item>
			<title>XOR Swap Algorithm</title>
			<link>http://rhakuma.tistory.com/entry/XOR-Swap-Algorithm</link>
			<description>&lt;DIV id=globalWrapper&gt;
&lt;DIV id=column-content&gt;
&lt;DIV id=content&gt;
&lt;H1 class=firstHeading&gt;&lt;U&gt;XOR swap algorithm&lt;br /&gt;&lt;/U&gt;&lt;/H1&gt;&lt;FONT size=2&gt;From Wikipedia, the free encyclopedia&lt;/FONT&gt; 
&lt;DIV id=bodyContent&gt;
&lt;P&gt;In computer programming, the &lt;B&gt;XOR swap&lt;/B&gt; is an algorithm that uses the XOR bitwise operation to swap distinct values of variables having the same data type without using a temporary variable.&lt;/P&gt;
&lt;TABLE class=toc id=toc summary=Contents&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;DIV id=toctitle&gt;
&lt;H2&gt;&lt;U&gt;Contents&lt;/U&gt;&lt;/H2&gt;&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;1&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;The algorithm&lt;/SPAN&gt; 
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;2&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Proof that XOR swap works&lt;/SPAN&gt; 
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;3&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Code example&lt;/SPAN&gt; 
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;4&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Reasons for use in practice&lt;/SPAN&gt; 
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;5&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Reasons for avoidance in practice&lt;/SPAN&gt; 
&lt;UL&gt;
&lt;LI class=toclevel-2&gt;&lt;SPAN class=tocnumber&gt;5.1&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;The XCHG instruction&lt;/SPAN&gt; 
&lt;LI class=toclevel-2&gt;&lt;SPAN class=tocnumber&gt;5.2&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Aliasing&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;6&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Variations&lt;/SPAN&gt; 
&lt;LI class=toclevel-1&gt;&lt;SPAN class=tocnumber&gt;7&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;See also&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;SCRIPT type=text/javascript&gt;
//&lt;![CDATA[
 if (window.showTocToggle) { var tocShowText = &quot;show&quot;; var tocHideText = &quot;hide&quot;; showTocToggle(); } 
//]]&gt;
&lt;/SCRIPT&gt;

&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;The algorithm&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;Standard swapping algorithms require the use of a temporary storage variable. Using the XOR swap algorithm, however, no temporary storage is needed. The algorithm is as follows:&lt;/P&gt;&lt;PRE&gt;X := X XOR Y
Y := X XOR Y
X := X XOR Y
&lt;/PRE&gt;
&lt;P&gt;The algorithm typically corresponds to three machine code instructions. For example, in IBM System/370 assembly code:&lt;/P&gt;&lt;PRE&gt;XR    R1,R2
XR    R2,R1
XR    R1,R2
&lt;/PRE&gt;
&lt;P&gt;where R1 and R2 are &lt;A title=&quot;Processor register&quot; href=&quot;http://rhakuma.tistory.com/wiki/Processor_register&quot;&gt;registers&lt;/A&gt; and each XR operation leaves its result in the register named in the first argument.&lt;/P&gt;
&lt;P&gt;However, the problem still remains that if &lt;I&gt;x&lt;/I&gt; and &lt;I&gt;y&lt;/I&gt; use the same storage location, the value stored in that location will be zeroed out by the first XOR instruction, and then remain zero; it will not be &quot;swapped with itself&quot;. (Note that this is *not* the same as if &lt;I&gt;x&lt;/I&gt; and &lt;I&gt;y&lt;/I&gt; have the same values. The trouble only comes when &lt;I&gt;x&lt;/I&gt; and &lt;I&gt;y&lt;/I&gt; use the same storage location.)&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;Proof that XOR swap works&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;The &lt;A title=&quot;Binary operation&quot; href=&quot;http://rhakuma.tistory.com/wiki/Binary_operation&quot;&gt;binary operation&lt;/A&gt; XOR over bit strings has the following properties (where &lt;IMG class=tex alt=\oplus src=&quot;http://upload.wikimedia.org/math/b/7/1/b71edd70fcad670e99a9912ba5e55d77.png&quot;&gt; denotes XOR):&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;L1.&lt;/B&gt; &lt;A class=mw-redirect title=&quot;Commutative operation&quot; href=&quot;http://rhakuma.tistory.com/wiki/Commutative_operation&quot;&gt;Commutativity&lt;/A&gt;: &lt;IMG class=tex alt=&quot;A \oplus B = B \oplus A&quot; src=&quot;http://upload.wikimedia.org/math/d/a/4/da482083fa363b3eeaa469fd5953a77b.png&quot;&gt; 
&lt;LI&gt;&lt;B&gt;L2.&lt;/B&gt; &lt;A title=Associativity href=&quot;http://rhakuma.tistory.com/wiki/Associativity&quot;&gt;Associativity&lt;/A&gt;: &lt;IMG class=tex alt=&quot;(A \oplus B) \oplus C = A \oplus (B \oplus C)&quot; src=&quot;http://upload.wikimedia.org/math/a/d/9/ad9d756c5ecf7988fd972ab46fa8e3fe.png&quot;&gt; 
&lt;LI&gt;&lt;B&gt;L3.&lt;/B&gt; &lt;A title=&quot;Identity element&quot; href=&quot;http://rhakuma.tistory.com/wiki/Identity_element&quot;&gt;Identity exists&lt;/A&gt;: there is a value &lt;SPAN class=texhtml&gt;&lt;I&gt;Z&lt;/I&gt; = 0&lt;/SPAN&gt; such that &lt;IMG class=tex alt=&quot;A \oplus Z = A&quot; src=&quot;http://upload.wikimedia.org/math/3/7/3/373c3b0b5b2bcbcfd23f7c7f316823f7.png&quot;&gt; for any &lt;SPAN class=texhtml&gt;&lt;I&gt;A&lt;/I&gt;&lt;/SPAN&gt; 
&lt;LI&gt;&lt;B&gt;L4.&lt;/B&gt; Each element has an &lt;A title=&quot;Inverse element&quot; href=&quot;http://rhakuma.tistory.com/wiki/Inverse_element&quot;&gt;inverse&lt;/A&gt;: for each &lt;SPAN class=texhtml&gt;&lt;I&gt;A&lt;/I&gt;&lt;/SPAN&gt;, there is a value &lt;IMG class=tex alt=A^{-\!1} src=&quot;http://upload.wikimedia.org/math/6/1/b/61b68abba2c566658073db11dd85f0b8.png&quot;&gt; such that &lt;IMG class=tex alt=&quot;A \oplus A^{-\!1} = Z&quot; src=&quot;http://upload.wikimedia.org/math/4/c/8/4c8f11041335fcdb5597d5be67b2d760.png&quot;&gt; 
&lt;UL&gt;
&lt;LI&gt;&lt;B&gt;L4a.&lt;/B&gt; In fact, each element is its own inverse: &lt;IMG class=tex alt=&quot;A \oplus A = 0&quot; src=&quot;http://upload.wikimedia.org/math/2/3/d/23dfd4259c52f46d50d2a0bf30838b8d.png&quot;&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The first four properties are the definition of an &lt;A title=&quot;Abelian group&quot; href=&quot;http://rhakuma.tistory.com/wiki/Abelian_group&quot;&gt;Abelian group&lt;/A&gt;. The last is a structural feature of &lt;I&gt;XOR&lt;/I&gt; not necessarily shared by other Abelian groups or groups in general.&lt;/P&gt;
&lt;P&gt;Suppose that we have two registers &lt;CODE&gt;R1&lt;/CODE&gt; and &lt;CODE&gt;R2&lt;/CODE&gt;, as in the table below, with initial values &lt;I&gt;A&lt;/I&gt; and &lt;I&gt;B&lt;/I&gt; respectively. We perform the operations below in sequence, and reduce our results using the property list above.&lt;/P&gt;
&lt;TABLE class=wikitable&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH&gt;Step&lt;/TH&gt;
&lt;TH&gt;Operation&lt;/TH&gt;
&lt;TH&gt;Register 1&lt;/TH&gt;
&lt;TH&gt;Register 2&lt;/TH&gt;
&lt;TH&gt;Reduction&lt;/TH&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;Initial value&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;A&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;B&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;—&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;R1 := R1 ^ R2&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;A&lt;/I&gt;^&lt;I&gt;B&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;B&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;—&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;R2 := R1 ^ R2&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;A&lt;/I&gt;^&lt;I&gt;B&lt;/I&gt; = &lt;I&gt;B&lt;/I&gt;^&lt;I&gt;A&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;(&lt;I&gt;A&lt;/I&gt;^&lt;I&gt;B&lt;/I&gt;)^&lt;I&gt;B&lt;/I&gt; = &lt;I&gt;A&lt;/I&gt;^(&lt;I&gt;B&lt;/I&gt;^&lt;I&gt;B&lt;/I&gt;) = &lt;I&gt;A&lt;/I&gt;^0 = &lt;I&gt;A&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;L1, L2, L4, L3&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;&lt;CODE&gt;R1 := R1 ^ R2&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;(&lt;I&gt;B&lt;/I&gt;^&lt;I&gt;A&lt;/I&gt;)^&lt;I&gt;A&lt;/I&gt; = &lt;I&gt;B&lt;/I&gt;^(&lt;I&gt;A&lt;/I&gt;^&lt;I&gt;A&lt;/I&gt;) = &lt;I&gt;B&lt;/I&gt;^0 = &lt;I&gt;B&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;&lt;I&gt;A&lt;/I&gt;&lt;/TD&gt;
&lt;TD&gt;L2, L3, L4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;Code example&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;A &lt;A title=&quot;C (programming language)&quot; href=&quot;http://rhakuma.tistory.com/wiki/C_%28programming_language%29&quot;&gt;C&lt;/A&gt; function that implements the XOR swap algorithm:&lt;/P&gt;&lt;PRE&gt;&lt;CODE lang=c xml:lang=&quot;c&quot;&gt;void xorSwap (int *x, int *y)
{
    if (x != y) {
        *x ^= *y;
        *y ^= *x;
        *x ^= *y;
    }
}
&lt;/CODE&gt;
&lt;/PRE&gt;
&lt;P&gt;Note that the code does not swap the integers passed immediately, but first checks if their memory locations are distinct. This will remove problems caused by possible &lt;A title=&quot;Aliasing (computing)&quot; href=&quot;http://rhakuma.tistory.com/wiki/Aliasing_%28computing%29&quot;&gt;aliasing&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The body of this function is sometimes seen incorrectly shortened to &lt;CODE&gt;if (x != y) *x^=*y^=*x^=*y;&lt;/CODE&gt;. This may not obtain desired result because of a lack of &lt;A title=&quot;Sequence point&quot; href=&quot;http://rhakuma.tistory.com/wiki/Sequence_point&quot;&gt;sequence points&lt;/A&gt;; No evaluation order was given for the assignments.&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;Reasons for use in practice&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;The algorithm is not uncommon in embedded assembly code, where there is often very limited space available for a temporary swap variable, and this form of swap can also avoid a load/store which can be much faster than the equivalent operation using a temporary variable. On some architectures, certain operations require their operands to be in particular registers, requiring a swap; and all available &quot;temporary&quot; registers may be in use storing other data. Some &lt;A title=&quot;Compiler optimization&quot; href=&quot;http://rhakuma.tistory.com/wiki/Compiler_optimization&quot;&gt;optimizing compilers&lt;/A&gt; can generate code using XOR swap in these situations.&lt;SUP class=&quot;noprint Template-Fact&quot;&gt;&lt;SPAN title=&quot;This claim needs references to reliable sources since April 2007&quot; style=&quot;WHITE-SPACE: nowrap&quot;&gt;[&lt;I&gt;&lt;A title=&quot;Wikipedia:Citation needed&quot; href=&quot;http://rhakuma.tistory.com/wiki/Wikipedia:Citation_needed&quot;&gt;citation needed&lt;/A&gt;&lt;/I&gt;]&lt;/SPAN&gt;&lt;/SUP&gt;&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;Reasons for avoidance in practice&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;On modern (desktop) CPUs, the XOR technique is considerably slower than using a temporary variable to do swapping. One reason is that modern CPUs strive to execute commands in parallel; see &lt;A title=&quot;Instruction pipeline&quot; href=&quot;http://rhakuma.tistory.com/wiki/Instruction_pipeline&quot;&gt;Instruction pipeline&lt;/A&gt;. In the XOR technique, the inputs to each operation depend on the results of the previous operation, so they must be executed in strictly sequential order. If efficiency is of tremendous concern, it is advised to test the speeds of both the XOR technique and temporary variable swapping on the target architecture.&lt;/P&gt;
&lt;H3&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;The XCHG instruction&lt;/U&gt;&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;Modern &lt;A class=mw-redirect title=&quot;Optimizing compiler&quot; href=&quot;http://rhakuma.tistory.com/wiki/Optimizing_compiler&quot;&gt;optimizing compilers&lt;/A&gt; work by translating the code they are given into an &lt;A title=&quot;Intermediate representation&quot; href=&quot;http://rhakuma.tistory.com/wiki/Intermediate_representation&quot;&gt;internal flow-based representation&lt;/A&gt; which they transform in many ways before producing their machine-code output. These compilers are more likely to recognize and optimize a conventional (temporary-based) swap than to recognize the high-level language statements that correspond to an XOR swap. Many times, what is written as a swap in high-level code is translated by the compiler into a simple internal note that two variables have swapped memory addresses, rather than any amount of machine code. Other times, when the target architecture supports it, the compiler can use a single XCHG (exchange) instruction which performs the swap in a single operation.&lt;/P&gt;
&lt;P&gt;An XCHG operation was available as long ago as 1964, on the &lt;A title=PDP-6 href=&quot;http://rhakuma.tistory.com/wiki/PDP-6&quot;&gt;PDP-6&lt;/A&gt; (where it was called EXCH) and in 1970 on the &lt;A class=new title=&quot;Datacraft (page does not exist)&quot; href=&quot;http://rhakuma.tistory.com/w/index.php?title=Datacraft&amp;amp;action=edit&amp;amp;redlink=1&quot;&gt;Datacraft&lt;/A&gt; 6024 series (where it was called XCHG). The &lt;A title=&quot;Intel 8086&quot; href=&quot;http://rhakuma.tistory.com/wiki/Intel_8086&quot;&gt;Intel 8086&lt;/A&gt;, released in 1978, also included an instruction named XCHG. All three of these instructions swapped registers with registers, or registers with memory, but were unable to swap the contents of two memory locations. The &lt;A title=&quot;Motorola 68000&quot; href=&quot;http://rhakuma.tistory.com/wiki/Motorola_68000&quot;&gt;Motorola 68000&lt;/A&gt;&#039;s EXG operation can only swap registers with registers. The &lt;A title=PDP-10 href=&quot;http://rhakuma.tistory.com/wiki/PDP-10&quot;&gt;PDP-10&lt;/A&gt; inherited the PDP-6&#039;s EXCH instruction, but the &lt;A title=PDP-11 href=&quot;http://rhakuma.tistory.com/wiki/PDP-11&quot;&gt;PDP-11&lt;/A&gt; (the machine on which the &lt;A title=&quot;C (programming language)&quot; href=&quot;http://rhakuma.tistory.com/wiki/C_%28programming_language%29&quot;&gt;C programming language&lt;/A&gt; was developed) did not.&lt;/P&gt;
&lt;P&gt;However, the XCHG instruction in modern processors (e.g. &lt;A title=&quot;X86 architecture&quot; href=&quot;http://rhakuma.tistory.com/wiki/X86_architecture&quot;&gt;x86&lt;/A&gt;) should only be used to swap &lt;A title=&quot;Processor register&quot; href=&quot;http://rhakuma.tistory.com/wiki/Processor_register&quot;&gt;registers&lt;/A&gt; and not &lt;A title=&quot;Random access memory&quot; href=&quot;http://rhakuma.tistory.com/wiki/Random_access_memory&quot;&gt;memory&lt;/A&gt;, as an implicit &lt;I&gt;LOCK&lt;/I&gt; instruction may be imposed by the processor on the memory location(s) involved so that the operation is &lt;A title=&quot;Atomic operation&quot; href=&quot;http://rhakuma.tistory.com/wiki/Atomic_operation&quot;&gt;atomic&lt;/A&gt;.&lt;/P&gt;
&lt;H3&gt;&lt;SPAN class=mw-headline&gt;Aliasing&lt;/SPAN&gt;&lt;/H3&gt;
&lt;P&gt;The XOR swap is also complicated in practice by &lt;A title=&quot;Aliasing (computing)&quot; href=&quot;http://rhakuma.tistory.com/wiki/Aliasing_%28computing%29&quot;&gt;aliasing&lt;/A&gt;. As noted above, if an attempt is made to XOR-swap the contents of some location with itself, the result is that the location is zeroed out and its value lost. Therefore, XOR swapping must not be used blindly in a high-level language if aliasing is possible.&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;Variations&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;P&gt;The underlying principle of the XOR swap algorithm can be applied to any reversible binary operation. Replacing XOR by addition and subtraction gives a slightly different, but largely equivalent, formulation:&lt;/P&gt;&lt;PRE&gt;&lt;B&gt;procedure&lt;/B&gt; AddSwap (&lt;B&gt;var&lt;/B&gt; X, Y: integer);
&lt;B&gt;begin&lt;/B&gt;
  &lt;B&gt;if&lt;/B&gt; X &amp;lt;&amp;gt; Y &lt;B&gt;then begin&lt;/B&gt;
    X := X + Y;
    Y := X - Y;
    X := X - Y
  &lt;B&gt;end&lt;/B&gt;
&lt;B&gt;end&lt;/B&gt;
&lt;/PRE&gt;
&lt;P&gt;Unlike the XOR swap, this variation requires that the underlying processor or programming language uses a method such as &lt;A title=&quot;Modular arithmetic&quot; href=&quot;http://rhakuma.tistory.com/wiki/Modular_arithmetic&quot;&gt;modular arithmetic&lt;/A&gt; or &lt;A class=mw-redirect title=Bignum href=&quot;http://rhakuma.tistory.com/wiki/Bignum&quot;&gt;bignums&lt;/A&gt; to guarantee that the computation of &lt;CODE&gt;X + Y&lt;/CODE&gt; cannot cause an error due to &lt;A title=&quot;Integer overflow&quot; href=&quot;http://rhakuma.tistory.com/wiki/Integer_overflow&quot;&gt;integer overflow&lt;/A&gt;. Therefore, it is seen even more rarely in practice than the XOR swap.&lt;/P&gt;
&lt;H2&gt;&lt;SPAN class=mw-headline&gt;&lt;U&gt;See also&lt;/U&gt;&lt;/SPAN&gt;&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A title=&quot;Symmetric difference&quot; href=&quot;http://rhakuma.tistory.com/wiki/Symmetric_difference&quot;&gt;Symmetric difference&lt;/A&gt; 
&lt;LI&gt;&lt;A title=&quot;XOR linked list&quot; href=&quot;http://rhakuma.tistory.com/wiki/XOR_linked_list&quot;&gt;XOR linked list&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;!-- 
NewPP limit report
Preprocessor node count: 125/1000000
Post-expand include size: 1117/2048000 bytes
Template argument size: 330/2048000 bytes
Expensive parser function count: 1/500
--&gt;&lt;!-- Saved in parser cache with key enwiki:pcache:idhash:145555-0!1!0!default!!en!2 and timestamp 20080410130931 --&gt;
&lt;DIV class=printfooter&gt;Retrieved from &quot;&lt;A href=&quot;http://en.wikipedia.org/wiki/XOR_swap_algorithm&quot;&gt;http://en.wikipedia.org/wiki/XOR_swap_algorithm&lt;/A&gt;&quot;&lt;/DIV&gt;
&lt;DIV class=catlinks id=catlinks&gt;
&lt;DIV id=mw-normal-catlinks&gt;Categories: &lt;SPAN dir=ltr&gt;Algorithms&lt;/SPAN&gt; | &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:Articles with example C code&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:Articles_with_example_C_code&quot;&gt;Articles with example C code&lt;/A&gt;&lt;/SPAN&gt; | &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:Articles with example Pascal code&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:Articles_with_example_Pascal_code&quot;&gt;Articles with example Pascal code&lt;/A&gt;&lt;/SPAN&gt; | &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:Articles with example pseudocode&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:Articles_with_example_pseudocode&quot;&gt;Articles with example pseudocode&lt;/A&gt;&lt;/SPAN&gt; | &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:Computer programming&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:Computer_programming&quot;&gt;Computer programming&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class=mw-hidden-cats-hidden id=mw-hidden-catlinks&gt;Hidden categories: &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:All articles with unsourced statements&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:All_articles_with_unsourced_statements&quot;&gt;All articles with unsourced statements&lt;/A&gt;&lt;/SPAN&gt; | &lt;SPAN dir=ltr&gt;&lt;A title=&quot;Category:Articles with unsourced statements since April 2007&quot; href=&quot;http://rhakuma.tistory.com/wiki/Category:Articles_with_unsourced_statements_since_April_2007&quot;&gt;Articles with unsourced statements since April 2007&lt;/A&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;!-- end content --&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV id=column-one&gt;
&lt;DIV class=portlet id=p-cactions&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
			<category>기타</category>
			<category>swap</category>
			<category>XOR</category>
			<category>스왑</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/8</guid>
			<comments>http://rhakuma.tistory.com/entry/XOR-Swap-Algorithm#entry8comment</comments>
			<pubDate>Mon, 14 Apr 2008 23:45:18 +0900</pubDate>
		</item>
		<item>
			<title>마비노기 환생 이벤트!</title>
			<link>http://rhakuma.tistory.com/entry/%EB%A7%88%EB%B9%84%EB%85%B8%EA%B8%B0-%ED%99%98%EC%83%9D-%EC%9D%B4%EB%B2%A4%ED%8A%B8</link>
			<description>올해(2008년)동안 접속이 없었던 사용자들을 대상으로 환생 쿠폰을 준다.&lt;br /&gt;&lt;br /&gt;이제부터 다시 마비노기의 세계로...하루 2시간씩 빠져보는거다 -ㅅ-;&lt;br /&gt;&lt;br /&gt;근데 기껏 유료 계정 넣고 팔라딘 변신 배워놨더니...&lt;br /&gt;&lt;br /&gt;무료 사용자라고 변신도 못해 ㅠ_ㅠ&lt;br /&gt;&lt;br /&gt;돈독오른 넥슨 지금 장난하니? :(&lt;br /&gt;</description>
			<category>닉군왈...</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/6</guid>
			<comments>http://rhakuma.tistory.com/entry/%EB%A7%88%EB%B9%84%EB%85%B8%EA%B8%B0-%ED%99%98%EC%83%9D-%EC%9D%B4%EB%B2%A4%ED%8A%B8#entry6comment</comments>
			<pubDate>Thu,  6 Mar 2008 19:39:31 +0900</pubDate>
		</item>
		<item>
			<title>Flash와 Silverlight..</title>
			<link>http://rhakuma.tistory.com/entry/Flash%EC%99%80-Silverlight</link>
			<description>RIA 플랫폼이다.&lt;br /&gt;&lt;br /&gt;하나는 어도비꺼, 하나는 MS꺼.&lt;br /&gt;&lt;br /&gt;최근 MS에서 플래시를 따라잡으려고 노력을 많이 하는데 과연 성공할런지?&lt;br /&gt;&lt;br /&gt;이쪽 시장까지 MS가 먹고 나면 뭐..할 말이 없구만.&lt;br /&gt;&lt;br /&gt;그렇다고 이제와서 웹을 뒤엎을만한 새로운 트렌드의 서비스 개념을 성공시키기는 힘들테고.&lt;br /&gt;&lt;br /&gt;역시 돈 있는 놈이 돈 먹는 세상이다..쳇.&lt;br /&gt;</description>
			<category>닉군왈...</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/5</guid>
			<comments>http://rhakuma.tistory.com/entry/Flash%EC%99%80-Silverlight#entry5comment</comments>
			<pubDate>Thu,  6 Mar 2008 17:19:41 +0900</pubDate>
		</item>
		<item>
			<title>삼성 떡값 사건? 삼성 뇌물수수 사건!</title>
			<link>http://rhakuma.tistory.com/entry/%EC%82%BC%EC%84%B1-%EB%96%A1%EA%B0%92-%EC%82%AC%EA%B1%B4-%EC%82%BC%EC%84%B1-%EB%87%8C%EB%AC%BC%EC%88%98%EC%88%98-%EC%82%AC%EA%B1%B4</link>
			<description>언론이 자기네 편이면 좋은 이유.&lt;br /&gt;&lt;br /&gt;알아서 단어 순화를 해준다.&lt;br /&gt;&lt;br /&gt;삼성 떡값 사건이라니.&lt;br /&gt;&lt;br /&gt;이게 무슨 동네 애들이 장난치다 걸린건가?&lt;br /&gt;&lt;br /&gt;삼성 뇌물수수 사건이라고 해야지.&lt;br /&gt;&lt;br /&gt;단어에서조차 부정적인 이미지를 가리려고 난리치는 삼성. -_-&lt;br /&gt;&lt;br /&gt;하긴, 태안사건에서는 유조선의 선박명 &#039;허베이스피리트&#039;은 거의 대부분의 기사에 실렸지만..&lt;br /&gt;&lt;br /&gt;인양선과 부선의 선박명..삼성3호, 삼성5호던가? 이건 실린데도 몇군데 없었지.&lt;br /&gt;&lt;br /&gt;이제 법정공방에선 정박해있었던 유조선이 자기네들쪽으로 돌진해왔다고 주장하는 삼성...-_-;&lt;br /&gt;</description>
			<category>닉군왈...</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/4</guid>
			<comments>http://rhakuma.tistory.com/entry/%EC%82%BC%EC%84%B1-%EB%96%A1%EA%B0%92-%EC%82%AC%EA%B1%B4-%EC%82%BC%EC%84%B1-%EB%87%8C%EB%AC%BC%EC%88%98%EC%88%98-%EC%82%AC%EA%B1%B4#entry4comment</comments>
			<pubDate>Thu,  6 Mar 2008 14:20:30 +0900</pubDate>
		</item>
		<item>
			<title>We&#039;ve got everything!</title>
			<link>http://rhakuma.tistory.com/entry/Weve-got-everything</link>
			<description>&lt;br /&gt;Modest mouse - We&#039;ve got everything.&lt;br /&gt;&lt;br /&gt;&lt;object width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/AceNg5WrF9I&quot;&gt;&lt;/param&gt;&lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/AceNg5WrF9I&quot; type=&quot;application/x-shockwave-flash&quot; wmode=&quot;transparent&quot; width=&quot;425&quot; height=&quot;355&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;We&#039;ve got everything&lt;br /&gt;
We&#039;ve got everything&lt;br /&gt;
We&#039;ve got everything down to a science so I guess we know
everything &lt;br /&gt;
We know everything&lt;br /&gt;
We know everything&lt;br /&gt;
We know everything was built to expire so I guess we&#039;ve done
everything &lt;br /&gt;
If we carried it out to sea &lt;br /&gt;
Pushed it over the edge we&#039;d have all been through, &lt;br /&gt;
Well first off Gary got drunk fell asleep in his car til about
noon&lt;br /&gt;
Flat Top Tony got all messed up split his lip chasing cheap
perfume&lt;br /&gt;
Well look at our boat in the bay it looks like some sad ass
little canoe&lt;br /&gt;
We&#039;ve done everything &lt;br /&gt;
We&#039;ve done everything&lt;br /&gt;
We&#039;ve done everything like trial by fire so I guess we&#039;ll stop
trying now&lt;br /&gt;
We&#039;ve tried everything&lt;br /&gt;
We&#039;ve tried everything&lt;br /&gt;
We&#039;ve tried everything half assed and as liars and thats how
we&#039;ve got everything&lt;br /&gt;
If we carried it out to sea pushed it over the edge we could
have all been through&lt;br /&gt;
Well no one even bothered showin&#039; up but we still did what we
should have thought through&lt;br /&gt;
We crashed in like waves into the stars Didn&#039;t want it didn&#039;t
need it but we knew that we&lt;br /&gt;
Could see it so we opened up the door&lt;br /&gt;
We receded like waves out of the stars&lt;br /&gt;
Didn&#039;t want it didn&#039;t need it but we knew that we could steal it
left it dying on the&lt;br /&gt;
Floor &lt;br /&gt;
We&#039;ve got everything&lt;br /&gt;
We&#039;ve got everything&lt;br /&gt;
We&#039;ve got everything down to a science so I guess we know
everything&lt;br /&gt;
We&#039;ve got everything&lt;br /&gt;
We&#039;ve done everything&lt;br /&gt;
We&#039;ve tried everything&lt;br /&gt;
We&#039;ve got everything&lt;br /&gt;
We&#039;ve got everything</description>
			<category>닉군왈...</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/3</guid>
			<comments>http://rhakuma.tistory.com/entry/Weve-got-everything#entry3comment</comments>
			<pubDate>Wed,  5 Mar 2008 19:17:01 +0900</pubDate>
		</item>
		<item>
			<title>2009년 공휴일..</title>
			<link>http://rhakuma.tistory.com/entry/2009%EB%85%84-%EA%B3%B5%ED%9C%B4%EC%9D%BC</link>
			<description>설 연휴 : 일, 월, 화&lt;br /&gt;삼일절 : 일요일&lt;br /&gt;어린이날 : 화요일 (그나마 다행)&lt;br /&gt;현충일 : 토요일&lt;br /&gt;제헌절 : 금요일 ( 이건 굿! )&lt;br /&gt;광복절 : 토요일&lt;br /&gt;개천절 : 토요일&lt;br /&gt;추석 : 개천절과 겹치는데다가 금, 토, 일 -_-; ( 최악! )&lt;br /&gt;크리스마스 : 금요일 (마지막은 그나마..)&lt;br /&gt;&lt;br /&gt;즉, 2009년에 공휴일다운 공휴일은 달랑 3일이다.&lt;br /&gt;&lt;br /&gt;2009년엔 회사 때려치우고 알바나 하면서 살까나.&lt;br /&gt;</description>
			<category>닉군왈...</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/2</guid>
			<comments>http://rhakuma.tistory.com/entry/2009%EB%85%84-%EA%B3%B5%ED%9C%B4%EC%9D%BC#entry2comment</comments>
			<pubDate>Wed,  5 Mar 2008 19:06:55 +0900</pubDate>
		</item>
		<item>
			<title>제9회 한국 자바 개발자 컨퍼런스</title>
			<link>http://rhakuma.tistory.com/entry/jco</link>
			<description>&lt;A href=&quot;http://jco.or.kr/&quot; target=_new&gt;&lt;IMG src=&quot;http://jco.or.kr/img/conference9th_jco.jpg&quot;&gt;&lt;/A&gt;</description>
			<category>jco</category>
			<category>자바</category>
			<category>컨퍼런스</category>
			<author>곰ⓣing</author>
			<guid>http://rhakuma.tistory.com/1</guid>
			<comments>http://rhakuma.tistory.com/entry/jco#entry1comment</comments>
			<pubDate>Mon, 11 Feb 2008 16:09:11 +0900</pubDate>
		</item>
	</channel>
</rss>
