Saturday, May 11, 2019

Find XOR of 1 to n

Find XOR of 1 to n

πŸ‘‰πŸ‘‰πŸ‘‰ https://www.dyclassroom.com/programming/find-xor-of-1-to-n

In this programming tutorial we will find XOR of 1 to n.

About XOR operator

XOR operator is a binary operator and it gives us 1 for odd number of 1s and 0 for even number of 1s.
In programming XOR is represented by ^ caret symbol.
We also represent XOR with this  plus inside circle symbol.
Following is the truth table for the XOR operator.
ABA^B
000
011
101
110
Remember!
XOR of odd 1s = 1
XOR of even 1s = 0
Check out Boolean Algebra tutorial.
Let's solve the problem.
#programming #coding #xor #computer #tutorial #dyclassroom

1 comment:

  1. How to get free spins no deposit
    Free spins μͺ½λ°• κ±Έ are usually offered to players who deposit via the λ°”μΉ΄λΌμ‚¬μ΄νŠΈμΏ ν° casino without bet365es the need for a deposit before they get started. λ²³ 365 μ£Όμ†Œ The more you μ˜¬μΈκ΅¬μ‘°λŒ€ deposit, the more

    ReplyDelete