Jump to content

Two = One ?


sj-bradley

Recommended Posts

Guest Hammy360

My favourite (used it in machine code in the sixties) is the boolean arithmetic ability to swap registers without using an intermediary.

The binary value in a register can be considered as an array of true false values.

 

So place any value in register A

and any value in register B

 

Then

 

Let A = A XOR B

Let B = A XOR B

Let A = A XOR B

 

The value that was in A is now in B

and value that was in B is now in A

 

No intermediary used.

 

QED

 

Try it and see it really works.

 

Just what I was gonna say........ :80:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...