VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



An Xor explanation

by DMJefff (1 Submission)
Category: Encryption
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

A simple guide to understanding Xor.

Rate An Xor explanation

What is Xor? This article will tell you why 10 Xor 12 is 6 and other stuff like that so anyway. Lets just start simple. Xor is done in binary so, the first step would be to convert the numbers into binary. 10 in binary is 1010 and 12 in binary is 1100. This can be figured out by using the windows calculator. (I'll save counting in binary and binary conversions for the next article.) So how does 1010 Xor 1100 = 6? The simplest way to do this would be to write the up and down like you were about to add them.
1010
1100
OK. Now Xoring (whatever) them is real simple. Just add them, but when ever you see a 2 write 0 instead. So,
1010
1100 =
0110
Simple, yes! 110 (you can remove 0's at the beggining) in decimal is 6! One last thing worth mentioning is if there arn't enough digits in a number count them as 0's. For example:
1101
 110 =
1011
You count the blank spaces as 0's. This is my first article so please comment!

Download this snippet    Add to My Saved Code

An Xor explanation Comments

No comments have been posted about An Xor explanation. Why not be the first to post a comment about An Xor explanation.

Post your comment

Subject:
Message:
0/1000 characters