...

  • Home
  • Articles
    • Current Issue
    • Archives
  • Authors
    • Author Guidelines
    • Policies
    • Downloads
  • Editors
  • Reviewers
...

International Journal of Mathematics Trends and Technology

Research Article | Open Access | Download PDF

Volume 71 | Issue 8 | Year 2025 | Article Id. IJMTT-V71I8P108 | DOI : https://doi.org/10.14445/22315373/IJMTT-V71I8P108

An Algorithm for the XOR Operation in Python Programming


Sanjay M Chinchole
Received Revised Accepted Published
21 Jun 2025 29 Jul 2025 16 Aug 2025 31 Aug 2025
Citation :

Sanjay M Chinchole, "An Algorithm for the XOR Operation in Python Programming," International Journal of Mathematics Trends and Technology (IJMTT), vol. 71, no. 8, pp. 49-53, 2025. Crossref, https://doi.org/10.14445/22315373/IJMTT-V71I8P108

Abstract

Bitwise operators are fundamental tools used in computer science programming. The Exclusive OR operator is one of the bitwise operators. It is a binary operator, also known as the XOR operator, which plays a vital role in computer programming. When the XOR operator operates on two different input bits, it results in a value ‘true’ (or ‘1’). Otherwise, it results in a value ‘false’ (or ‘0’). It has been helpful in many applications such as error detection, cryptography, digital circuit design, etc. In Python, the logical operation XOR compares two Boolean values. It results in ‘1’ if exactly one of the two binary inputs is ‘1’ and results in ‘0’ otherwise. The caret symbol (^) is used to denote this operation in Python. The XOR bitwise operation can be performed on two integers. This article explains the mechanism of the XOR operator and presents a simple algorithm to manually compute the logical XOR of two variables in Python. 

Keywords

Decimal to binary conversion, Bitwise operator, Cryptography, Python programming, Algorithm.

References

[1] M.F. Sanner, “Python: A Programming Language for Software Integration and Development,” Journal of Molecular Graphics and Modelling, vol. 17, no. 1, pp. 57-61, 1999.
[Google Scholar] [Publisher Link]
[2] A. Bogdanchikov, M. Zhaparov, and R. Suliyev, “Python to Learn Programming,” Journal of Physics: Conference Series, vol. 423, no. 1, 2013.
[CrossRef] [Google Scholar] [Publisher Link]
[3] Anil K. Maini, Digital Electronics: Principles, Devices and Applications, John Wiley & Sons, 2007.
[Google Scholar] [Publisher Link]
[4] Allen Downey, Think Python: How to Think Like a Computer Scientist (Version 2.4. 0), Green Tea Press, 2015.
[Google Scholar] [Publisher Link]
[5] Rydhm Beri, Python Made Simple: Learn Python Programming in Easy Steps with Examples, 2019.
[Google Scholar] [Publisher Link]

  • PDF
  • Citation
  • Abstract
  • Keywords
  • References
Citation Abstract Keywords References
  • Home
  • Authors Guidelines
  • Paper Submission
  • APC
  • Archives
  • Downloads
  • Open Access
  • Publication Ethics
  • Copyrights Infringement
  • Journals
  • FAQ
  • Contact Us

Follow Us

Copyright © 2025 Seventh Sense Research Group® . All Rights Reserved