XOR Rechner | Bitweise exklusive OR-Logik (2024)

Benutze den XOR-Rechner, um eine bitweise XOR-Verknüpfung zwischen zwei Zahlen durchzuführen. Du kannst Daten in binärer, dezimaler oder oktaler Darstellung eingeben. Wenn du bitweise AND- oder OR-Verknüpfungen durchführen möchtest, ist unser Bitweise Operatoren Rechner 🇺🇸 das richtige Werkzeug für dich.

Lies weiter, um zu erfahren:

  • Was die XOR-Operation ist;
  • Wie man das XOR von zwei Zahlen berechnet; und
  • Was die Anwendungen der XOR-Logik sind.

Was ist die XOR-Operation?

XOR oder eXclusive OR (exklusive ODER) ist eine logische Operation, die die Eingangswerte (Bits) vergleicht und den Ausgangswert (Bit) erzeugt. Die XOR-Logik ist sehr einfach. Wenn die Eingabewerte gleich sind, ist die Ausgabe 0 (oder falsch). Wenn die Eingabewerte unterschiedlich sind, ist das Ergebnis 1 (oder wahr).

Es gibt verschiedene Symbole für die XOR-Operation, zum Beispiel ⊕, ^, XOR oder EXOR. Der boolesche Ausdruck für die XOR-Operation lautet:

  • AB+AB=YA \cdot \overline{B} + \overline{A} \cdot B = YAB+AB=Y; oder

  • AB=YA\oplus B = YAB=Y

Um eine binäre XOR-Verknüpfung in elektronischen Schaltungen zu realisieren, verwenden wir XOR-Gatter. Im nächsten Abschnitt werden wir sehen, was ein XOR-Gatter ist.

Das XOR-Gatter

Das XOR-Gatter (oder Exklusiv-OR-Gatter) ist eine Kombination aus OR-, AND- und NOT-Gatter (siehe Abbildung 1). Der Ausgang eines XOR-Logikgatters ist wahr (1), wenn einer der Eingänge wahr (1) ist. Wenn beide Eingänge wahr sind (1) oder beide Eingänge falsch sind (0), ist der Ausgang falsch (0).

XOR Rechner | Bitweise exklusive OR-Logik (1)

Abbildung 2 zeigt das logische Symbol des XOR-Gatters.

XOR Rechner | Bitweise exklusive OR-Logik (2)

Wenn du mehr über andere Logikgatter wissen möchtest, schau dir den Logikgatter Rechner an.

Exklusive OR-Wahrheitstabelle

Die folgende Tabelle zeigt die Wahrheitstabelle der binären XOR-Verknüpfung (Exklusiv-OR) zwischen zwei Eingängen A und B (A XOR B).

Tabelle: Wahrheitstabelle für die XOR-Operation.

A

B

Ausgabe (Y)

1

1

1

1

1

1

Aus der Wahrheitstabelle kannst du sehen, dass die XOR-Operation eine binäre Addition ist, wenn wir die Überträge nicht mit einbeziehen. Daher wird die XOR-Operation auch Mod-2-Addition genannt.

In der gegebenen Wahrheitstabelle haben wir nur die XOR-Operation für zwei einzelne Bits betrachtet. Wir müssen jedoch eine bitweise XOR-Operation durchführen, wenn wir es mit Bitvektoren (z. B. einem Byte) zu tun haben.

Wie berechnet man das XOR von zwei Zahlen?

Um die bitweise eXclusive OR-Logik zu verstehen, lass uns das XOR von zwei Zahlen berechnen, 80 und 100.

  1. Zuerst werden wir die beiden Zahlen in die binäre Darstellung umwandeln:

    • Die 8-Bit-Binärdarstellung von 80 ist 0101 0000.
    • Die 8-Bit-Binärdarstellung von 100 ist 0110 0100.

    Es ist wichtig, dass beide Zahlen die gleiche Bitlänge haben.

  2. Jetzt werden wir das XOR jedes Paares von entsprechenden Bits finden, vom ersten bis zum letzten, indem wir die Regel anwenden:

    • Wenn beide Bits gleich sind, d.h. 1 (oder 0), ist das Ausgangsbit 0.
    • Wenn beide Bits unterschiedlich sind, ist die Ausgabe 1.
  3. Wenn zum Beispiel das erste Bitpaar 0⊕0 ist, ist das Ausgangsbit 0. Auf ähnliche Weise können wir das Ausgangsbit für alle Paare bestimmen.

XOR-Operation:

0101 0000

0110 0100

=

0011 0100

  1. Das Ergebnis der XOR-Verknüpfung von 80 und 100 ist also 0011 0100.

Wenn du dich für komplexere logische Operationen wie die Bitverschiebung interessierst, empfehlen wir dir den Bitverschiebung Rechner 🇺🇸.

Wie benutzt man den XOR-Rechner?

Schauen wir uns an, wie wir den XOR-Rechner benutzen können, um das XOR zweier Zahlen zu berechnen:

  1. Wähle im Dropdown-Menü die Anzahl der Bits in der Binärdarstellung. Wir wählen 8 Bits, da dies die Dezimalzahlen zwischen -128 und 127 ermöglicht.

  2. Wähle als Eingabedatentyp den Dezimaltyp. Mit dem bitweisen XOR-Rechner kannst du Zahlen im binären, dezimalen und oktalen System eingeben.

  3. Gib nun die Zahlen 80 und 100 in die Felder Zahl 1 bzw. Zahl 2 ein.

  4. Der bitweise XOR-Rechner gibt das Ergebnis der XOR-Verknüpfung in binärer (0011 0100), dezimaler (52) und oktaler Schreibweise (64) aus.

Anwendungen der XOR-Logik-Operation

Die XOR-Logik wird häufig in digitalen elektronischen Schaltungen und bei der Computerprogrammierung verwendet. Einige der häufigsten Anwendungen der XOR-Logik sind:

  • Kryptografie: Die XOR-Logik wird häufig in Verschlüsselungsmethoden eingesetzt.

  • Fehlererkennung: Die XOR-Logik liefert die Ausgabe 0, wenn eine gerade Anzahl von Eingangsbits 1 ist (gerade Parität), und sie liefert das Ergebnis 1, wenn eine ungerade Anzahl von Eingangsbits 1 ist (ungerade Parität). Deshalb verwenden wir die XOR-Logik, um die Parität der übertragenen Daten zu erkennen. Mit dieser Technik lässt sich feststellen, ob die Daten beim Senden digitaler Informationen verfälscht wurden.

  • RAID-Datenschutz: Indem sie die Festplatten so anordnen, dass eine der Festplatten das XOR aller anderen enthält, stellen RAID-Systeme (redundant arrays of inexpensive disks) beschädigte Festplatten wieder her.

  • Additionsschaltung: XOR-Logikgatter werden in Computerschaltungen häufig verwendet, um grundlegende arithmetische Operationen wie Addition und Subtraktion durchzuführen.

FAQ

Was bedeutet bitweises XOR?

Bei der bitweisen XOR-Verknüpfung zweier Binärzahlen vergleichen wir ein Paar einzelner Bits an entsprechenden Positionen. Das Ausgangsbit ist 1, wenn nur eines der Eingangsbits 1 ist, ansonsten ist es Null.

Wie berechne ich das XOR von zwei Zahlen?

Um das XOR von zwei Zahlen zu finden, befolge diese Anweisungen:

  1. Wandle die Zahlen in die binäre Darstellung um.
  2. Vergleiche die entsprechenden Bits der beiden Zahlen.
  3. Wenn nur eines der Eingangsbits wahr (1) ist, ist die Ausgabe wahr (1). Andernfalls ist die Ausgabe falsch (0).

Wie berechne ich das XOR von drei Binärzahlen?

Um das XOR von drei oder mehr Binärzahlen zu finden, vergleichst du die entsprechenden Bits nach der angegebenen Regel:

  1. Wenn eine ungerade Anzahl von Eingabebits wahr ist (1), ist die XOR Ausgabe wahr (1).
  2. Wenn eine gerade Anzahl von Eingangsbits wahr ist (1), ist die XOR Ausgabe falsch (0).

Was ist die Wahrheitstabelle für die XOR-Logik mit 3 Eingängen?

Die Wahrheitstabelle für die XOR-Logik mit 3 Eingängen, d. h. A XOR B XOR C, ist unten angegeben:

A

B

C

A XOR B XOR C

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

1

XOR Rechner | Bitweise exklusive OR-Logik (2024)

FAQs

Can exclusive or XOR logic gates be constructed from logic? ›

Exclusive-OR (XOR) logic gates can be constructed from what other logic gates? So in the above expression, the following logic gates are used: AND, OR, NOT. Thus, 2 AND gates with two-inputs and 1 OR gate with two-inputs will be required for constructing a XOR gate.

What is the logic statement for XOR? ›

If both inputs are false (0/LOW) or both are true, a false output results. XOR represents the inequality function, i.e., the output is true if the inputs are not alike otherwise the output is false. A way to remember XOR is "must have one or the other but not both".

What is the logic equation for the XOR gate? ›

The output of a multi-input XOR gate is 'true' if an odd number of inputs are true. Consider a 3-input XOR gate with inputs A, B, and C. The output (Y) can be represented by the equation: Y = A ⊕ B ⊕ C Here denotes the XOR operation.

Is exclusive or XOR a logical operator in Javascript? ›

What is XOR. XOR (exclusive OR) is a boolean operator, like && and || , but with the following logic: It is successful if the expression on either side is true (like || ), but not if both sides are true (like !(

Why is XOR gate called exclusive? ›

XOR gate (sometimes called EOR, EXOR, and pronounced as Exclusive OR) is a digital logic gate that results in true (either 1 or HIGH) output when the number of true inputs is an odd count. An XOR gate implements an exclusive OR, i.e., a true output result if one, and only one, of the gate inputs, is true.

How many minimum types of logic gates are needed to implement XOR logic gate? ›

The number of 2-input NAND gates required to implement a 2-input XOR gate is 4.
Logic GatesMin. number of NOR GateMin. number of NAND Gate
NOT11
AND32
OR23
EX-OR54
7 more rows
Feb 19, 2024

What is the logic law of XOR? ›

The logical operation exclusive disjunction, also called exclusive or (symbolized XOR, EOR, EXOR, ⊻ or ⊕, pronounced either / ks / or /z /), is a type of logical disjunction on two operands that results in a value of true if exactly one of the operands has a value of true.

Is the XOR gate logically complete? ›

Since NOR and NAND are the only functionally complete singleton gate sets; therefore, XOR is not functionally complete on its own (or together with NOT).

What is the Boolean logic for XOR? ›

Logical exclusive OR operator ^

The ^ operator computes the logical exclusive OR, also known as the logical XOR, of its operands. The result of x ^ y is true if x evaluates to true and y evaluates to false , or x evaluates to false and y evaluates to true . Otherwise, the result is false .

What is a real life example of XOR? ›

A fun example of an XOR Gate would be a game show buzzer. If two contestants buzz in, only one of them, the first to buzz, will activate the circuit. The other contestant will be “locked out” from buzzing.

How do you write XOR in propositional logic? ›

Exclusive Or is represented by the XOR operator ⊕. The exclusive or (“xor”) of p and q, denoted by p ⊕ q, is True when exactly one of p and q is True, and False otherwise. Here is an example of exclusive or. p: “It is sunny today.” • q: “It is Monday.” • p ⊕ q: “It is sunny today or today is Monday, but not both.”

How to make a XOR logic gate? ›

To create an XOR gate using NAND gates, you can follow this logic: Connect four NAND gates in a specific configuration, where three of them act as inverters (NOT gates), and the fourth performs a logical AND operation. By combining these NAND gates, you can construct an XOR gate.

What is XOR in logic code? ›

Description. C = xor( A , B ) performs a logical exclusive-OR of inputs A and B and returns an array or a table containing elements set to either logical 1 ( true ) or logical 0 ( false ). An element of the output is set to logical 1 ( true ) if A or B , but not both, contains a nonzero element at that same location.

What is XOR logically equivalent to? ›

Exclusive or, exclusive disjunction, exclusive alternation, logical non-equivalence, or logical inequality is a logical operator whose negation is the logical biconditional. With two inputs, XOR is true if and only if the inputs differ (one is true, one is false).

What is the difference between the OR logical operator and the XOR logical operator? ›

Now the OR operator is saying, if the first argument or the second argument are true, then the result is true. Lastly, the XOR (exclusive OR) operator is saying, if either input is true, then the result is true, but if both inputs are true, then the result is false.

What can XOR gates be made from? ›

An XOR Gate is a combination of the following gates: two NOT Gates. two AND Gates. one OR Gate.

Can you design a logic using logic gates? ›

Logic gates are essential for any digital logic. The Boolean operations and other complex processes are quickly completed using logic gates. You can use combinations of logic gates to solve or represent complex functions. Before designing a digital logic, make sure you know the basic types and symbols of logic gates.

Can a logic circuit be implemented using a combination of logic gates? ›

Combinational Logic Circuits are made up from basic logic NAND, NOR or NOT gates that are “combined” or connected together to produce more complicated switching circuits. These logic gates are the building blocks of combinational logic circuits.

References

Top Articles
Spicy Chicken Bulgogi Lettuce Wraps
35 easy dinner recipes when you're stuck for ideas
Tyler Sis 360 Louisiana Mo
Safety Jackpot Login
Kreme Delite Menu
Hotels
Citibank Branch Locations In Orlando Florida
Craigslist Cars And Trucks Buffalo Ny
Nyuonsite
Ogeechee Tech Blackboard
Magic Mike's Last Dance Showtimes Near Marcus Cedar Creek Cinema
Dark Souls 2 Soft Cap
Call Follower Osrs
Cool Math Games Bucketball
Nashville Predators Wiki
Gwdonate Org
All Buttons In Blox Fruits
Jvid Rina Sauce
Five Day National Weather Forecast
Mary Kay Lipstick Conversion Chart PDF Form - FormsPal
Price Of Gas At Sam's
Directions To Advance Auto
NBA 2k23 MyTEAM guide: Every Trophy Case Agenda for all 30 teams
Vintage Stock Edmond Ok
Noaa Ilx
Mikayla Campinos Laek: The Rising Star Of Social Media
CDL Rostermania 2023-2024 | News, Rumors & Every Confirmed Roster
Walmart Car Department Phone Number
Katie Sigmond Hot Pics
Craigslist Lewes Delaware
Criterion Dryer Review
Ullu Coupon Code
Jazz Total Detox Reviews 2022
30+ useful Dutch apps for new expats in the Netherlands
Luciipurrrr_
Bee And Willow Bar Cart
Craigslist In Myrtle Beach
Carespot Ocoee Photos
Bbc Gahuzamiryango Live
Fetus Munchers 1 & 2
Mitchell Kronish Obituary
Ssc South Carolina
Sara Carter Fox News Photos
Pickwick Electric Power Outage
Craigslist Sparta Nj
Hughie Francis Foley – Marinermath
Grand Park Baseball Tournaments
Unpleasant Realities Nyt
Gameplay Clarkston
Loss Payee And Lienholder Addresses And Contact Information Updated Daily Free List Bank Of America
Bloons Tower Defense 1 Unblocked
Haunted Mansion Showtimes Near The Grand 14 - Ambassador
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 6341

Rating: 4.8 / 5 (78 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.