Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Xor implementation C++

#include <iostream>
using namespace std;
  
int main() {
      // a = 5(00000101), b = 9(00001001)
    int a = 5, b = 9;
  
    // The result is 00001100
    cout << "a ^ b = " << (a ^ b) << endl;
  
    return 0;
}
  
//Output 
a^b = 12
Comment

PREVIOUS NEXT
Code Example
Cpp :: esp8266 wifi.localip() to string 
Cpp :: 271533778232847 
Cpp :: program in c++ for simple interest rate 
Cpp :: different way to print string in c++ 
Cpp :: C++ Booleans 
Cpp :: c++ unordered set count 
Cpp :: C:UsersBBCDocumentsc n c++ project8PuzzleSolvemain.c|38|warning: suggest parentheses around assignment used as truth value [-Wparentheses]| 
Cpp :: deal with bad input cpp 
Cpp :: c++ ignore_line 
Cpp :: How to write string in lpcstr in c++ 
Cpp :: pycuda install failed microsoft c++ 
Cpp :: Error: C++14 standard requested but CXX14 is not defined 
Cpp :: yearly interest calculator c++ using for loop 
Cpp :: C++: Methods of code shortening in competitive programming 
Cpp :: Normal Initialisation of 3D Vector 
Cpp :: tempcoderunnerfile.cpp:1:1: error: does not name a type 
Cpp :: multilevel inheritance in c++ private method 
Cpp :: cast c++ 
Cpp :: e.cpp 
Cpp :: tutti i tipi di equazioni trigonometriche 
Cpp :: amusia 
Cpp :: c++ get last element in array 
Cpp :: c++ array on heap 
Cpp :: c++ permutation 
Cpp :: how to make sound in c++ 
Cpp :: what is ++i and i++ 
C :: csrf_exempt 
C :: factorial in c 
C :: disable lua errors 
C :: find power of a number in c 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =