Chapterبەش 6 · Lectureوانە 6.5
XOR, XNOR and All Gates at a Glanceگەیتی XOR، گەیتی XNOR و هەموو گەیتەکان بە یەک سەیرکردن
The exclusive-OR gate gives 1 when its inputs differ, and with more inputs when the number of 1s is odd — the idea behind parity bits. XNOR, its inverse, detects equality. Symbols, expressions, timing diagrams, the many names of these gates, and a summary chart of all seven gates.
1 دەدات کاتێک جیاواز بن و بە زیاتر کاتێک ژمارەی 1ـەکان تاک بێت — ئەمە بیرۆکەی پشت . ، پێچەوانەکەی، یەکسانی دەدۆزێتەوە. ، ، ، ناوە جۆراوجۆرەکانی ئەم و هێڵکارییەکی کۆتایی بۆ هەر حەوت .
What you will learnچی فێر دەبیت
- Describe XOR correctly (1 when the inputs differ) and tell it apart from OR.
- Use the odd-number rule for XOR with many inputs and explain how it makes and checks parity bits.
- Describe XNOR as an equality detector and write it as .
- Draw XOR and XNOR outputs in a timing diagram.
- Recognise all seven gates by symbol, expression and truth table.
- XOR بە دروستی وەسف بکەیت (1 کاتێک جیاواز بن) و لە OR جیای بکەیتەوە.
- یاسای ژمارەی تاک بۆ XORـی چەند بەکار بهێنیت و ڕوونی بکەیتەوە چۆن دروست دەکات و دەیپشکنێت.
- XNOR وەک دۆزەرەوەی یەکسانی وەسف بکەیت و وەک بینووسیت.
- XOR و XNOR لە بکێشیت.
- هەر حەوت لە ، و بناسیتەوە.
The XOR gateگەیتی XOR
The exclusive-OR gate, XOR for short, compares its two inputs. Its output is 1 when the inputs are different — exactly one of them is 1 — and 0 when they are the same (both 0 or both 1). We write it with a circled plus: .
(exclusive-OR، بە کورتی XOR) دوو بەراورد دەکات. 1ـە کاتێک جیاواز بن — ڕێک یەکێکیان 1 بێت — و 0ـە کاتێک وەک یەک بن (هەردووکیان 0 یان هەردووکیان 1). بە نیشانەی کۆی ناو بازنەیەک دەینووسین: .
A gate whose output is 1 when its two inputs are different. With more inputs, the output is 1 when an odd number of inputs are 1; it is written .
کە 1ـە کاتێک دوو جیاواز بن. ئەگەر ژمارەی زیاتر بێت، 1ـە کاتێک ژمارەیەکی تاک لە 1 بن؛ بە دەنووسرێت.
| A | B | |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
The XOR gateگەیتی XOR
XOR versus OR: the 1-1 rowXOR بەرامبەر OR: ڕیزی 1-1
XOR and OR agree in three rows of the table. They differ in one row only: when both inputs are 1, OR says 1 but XOR says 0. Watch the two lamps in the animation; the same switches drive both gates.
XOR و OR لە سێ ڕیزی خشتەکەدا وەک یەکن. تەنها لە یەک ڕیزدا جیاوازن: کاتێک هەردوو 1ـن، OR دەڵێت 1 بەڵام XOR دەڵێت 0. سەیری دوو گڵۆپەکەی ناو ئەنیمەیشنەکە بکە؛ هەمان هەردوو کار پێدەکەن.


In many Kurdish houses the stairwell light has one switch downstairs and one upstairs. Flip either switch and the light changes. The light is on when the two switches are in different positions and off when they are in the same position — that is XOR. Electricians call it a two-way switch circuit.
لە زۆر ماڵی کوردیدا گڵۆپی پەیژە لە خوارەوە و لە سەرەوە هەیە. هەر کام لە بگۆڕیت، گڵۆپەکە دەگۆڕێت. گڵۆپەکە هەڵکراوە کاتێک دوو لە دوو دۆخی جیاوازدا بن و کوژاوەیە کاتێک لە هەمان دۆخدا بن — ئەمە XORـە. کارەباچییەکان پێی دەڵێن سووڕی دوو ڕێگا.
Where the analogy stops workingسنووری ئەم نموونەیە
Depending on how it was wired, the light may be on when the switches are the same (that is XNOR). Either way, one flip always changes the light.
بەپێی شێوەی بەستنەکەی، لەوانەیە گڵۆپەکە کاتێک هەڵکراو بێت کە وەک یەک بن (ئەوە XNORـە). بە هەر حاڵ، یەک گۆڕین هەمیشە گڵۆپەکە دەگۆڕێت.
The XOR gateگەیتی XOR
XOR from AND, OR and NOTXOR لە AND، OR و NOT
XOR is not a basic gate; we can build it from the three basic ones. Look at the two rows where XOR is 1: , and , . The product term is 1 only in the first, and only in the second. OR them together:
XOR بنەڕەتی نییە؛ دەتوانین لە سێ دروستی بکەین. سەیری ئەو دوو ڕیزە بکە کە XOR تێیاندا 1ـە: ، و ، . تەنها لە یەکەمیاندا 1ـە و تەنها لە دووەمیاندا. بە OR کۆیان بکەرەوە:
Two NOT gates, two AND gates and one OR gate: five basic gates for one XOR.
دوو ، دوو و یەک : پێنج بنەڕەتی بۆ یەک XOR.
Another way to read the name exclusive OR: it is OR but not AND. In symbols — “at least one is 1, and not both”.
ڕێگایەکی تر بۆ تێگەیشتن لە ناوی exclusive OR: واتە «OR، بەڵام نەک AND». بە : — «لانیکەم یەکێکیان 1ـە، بەڵام نەک هەردووکیان».
How transistors make NOT and AND gates: an inverter flips its input; two transistors in series give 1 only when both inputs are 1.
دروستکردنی NOT و AND لە : پێچەوانەکەر پێچەوانە دەکاتەوە؛ دوو بە تەنها کاتێک 1 دەدەن کە هەردوو 1 بن.
Chapter 'Exclusive or and abstraction' (7:19-8:49): XOR and OR tables differ only in the 1-1 row; XOR built as (A OR B) AND NOT (A AND B).
بەشی Exclusive or and abstraction (7:19 تا 8:49): XOR و OR تەنها لە دێڕی 1-1دا جیاوازن؛ XOR وەک (A OR B) AND NOT (A AND B) دروست دەکرێت.
XOR with more inputs: an odd number of 1sXOR بە نێوخستەی زیاتر: ژمارەیەکی تاکی 1
A 3-input XOR is built as a chain of 2-input XORs: . The grouping does not matter, so we just write . Follow one row: each XOR flips the result whenever a new 1 arrives. So the output is 1 exactly when the number of 1s is odd.
سێ وەک زنجیرەیەک لە XORـی دوو دروست دەکرێت: . کۆمەڵکردنەکە گرنگ نییە، بۆیە تەنها دەنووسین . یەک ڕیز پەیڕەو بکە: هەر XORـێک ئەنجامەکە پێچەوانە دەکاتەوە هەر کاتێک 1ـێکی نوێ بگات. کەواتە ڕێک کاتێک 1ـە کە ژمارەی 1ـەکان تاک بێت.
| A | B | C | Number of 1sژمارەی 1ـەکان | ||
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 2 | 0 | 1 |
| 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 2 | 0 | 1 |
| 1 | 1 | 0 | 2 | 0 | 1 |
| 1 | 1 | 1 | 3 | 1 | 0 |
XOR with more inputs: an odd number of 1sXOR بە نێوخستەی زیاتر: ژمارەیەکی تاکی 1
XOR finds errors: parityXOR هەڵە دەدۆزێتەوە: پاریتی
The odd-number rule is exactly what a parity bit needs. The sender XORs all the data bits. The result is 1 when the data has an odd number of 1s, so sending it as the even-parity bit makes the total number of 1s even. The receiver XORs every bit it gets, the parity bit included. A 0 means “the count is even, no error seen”; a 1 means at least one bit changed on the way.
یاسای ژمارەی تاک ڕێک ئەوەیە کە بیتی پاریتی پێویستیەتی. نێرەر هەموو XOR دەکات. ئەنجامەکە 1ـە کاتێک ژمارەیەکی تاکی 1ـی تێدا بێت، بۆیە ناردنی وەک جووت، کۆی ژمارەی 1ـەکان دەکاتە جووت. وەرگر هەموو ئەو وەریدەگرێت، ، XOR دەکات. 0 واتە «ژمارەکە جووتە، هیچ هەڵەیەک نەبینرا»؛ 1 واتە لانیکەم لە ڕێگادا گۆڕاوە.
Try it with ASCII: the letter C is 1000011, which has three 1s. Its XOR is 1, so with even parity the byte sent is 11000011. If noise flips one bit, the receiver's XOR becomes 1 and the error is caught; if two bits flip, the XOR is 0 again and the error slips through.
بە ASCII تاقی بکەرەوە: پیتی C بریتییە لە 1000011 کە سێ دانە 1ـی تێدایە. XORـەکەی 1ـە، بۆیە بە جووت ئەو دەنێردرێت 11000011ـە. ئەگەر یەک بگۆڕێت، XORـی وەرگر دەبێتە 1 و هەڵەکە دەگیرێت؛ ئەگەر دوو بگۆڕێن، XOR دیسان دەبێتە 0 و هەڵەکە تێدەپەڕێت.
How one parity bit catches a bit flipped on a wire, and how XOR gates compute parity, using ASCII text such as "hello world".
یەک چۆن دەدۆزێتەوە کە لەسەر وایەرێک پێچەوانە بووەتەوە، هەروەها چۆن هەژمار دەکەن، بە نموونەی دەقی وەک «hello world».
5:03-14:05: the XOR parity idea (odd number of 1s), building the circuit and testing that it catches an error.
لە 5:03 تا 14:05: بیرۆکەی بە XOR (ژمارەی تاکی 1ـەکان)، دروستکردنی و تاقیکردنەوەی ئەوەی کە هەڵەیەک دەدۆزێتەوە.
XOR with more inputs: an odd number of 1sXOR بە نێوخستەی زیاتر: ژمارەیەکی تاکی 1
Other jobs for XORکارەکانی تری XOR
- A controlled inverter. and . One input decides whether the other passes through unchanged or is inverted — useful for making 1's complements on demand.
- The sum bit of binary addition. In binary addition : the sum bit is 0 and the carry is 1. The sum bit of two bits is always , and the carry is . This pair is called a half adder.
- Gray code. Converting between binary and the Gray code uses XOR on neighbouring bits.
- پێچەوانەکەرێکی کۆنترۆڵکراو. و . یەکێک لە بڕیار دەدات کە ئەوی تر وەک خۆی تێبپەڕێت یان پێچەوانە بکرێتەوە — بەسوودە بۆ دروستکردنی هەر کاتێک پێویست بێت.
- کۆی . لە کۆکردنەوەی دووانیـدا : کۆ 0ـە و 1ـە. کۆی دوو هەمیشە ـە و ـە. ئەم جووتە پێی دەوترێت نیوەکۆکەرەوە.
- . گۆڕین لە نێوان و کۆدی گرەی XOR لەسەر دراوسێ بەکار دەهێنێت.
The XNOR gateگەیتی XNOR
The exclusive-NOR gate, XNOR, is an XOR followed by a NOT; its symbol is the XOR symbol with a bubble on the output. Its output is the opposite of XOR in every row: 1 when the inputs are the same (both LOW or both HIGH) and 0 when they are different. That is why it is also called an equality or equivalence gate.
(exclusive-NOR) بریتییە لە XOR و پاشان NOT؛ XORـە بە بازنەیەک لەسەر . لە هەموو ڕیزێکدا پێچەوانەی XORـە: 1ـە کاتێک وەک یەک بن (هەردووکیان LOW یان هەردووکیان HIGH) و 0ـە کاتێک جیاواز بن. بۆیە پێشی دەوترێت یەکسانی.
An XOR gate followed by a NOT gate: its output is 1 when the inputs are equal. It is written .
بریتییە لە کە بەدوایدا دێت: 1ـە کاتێک یەکسان بن. بە دەنووسرێت.
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
The two product terms pick the two “same” rows: AB for 11 and for 00.
هەردوو دوو ڕیزە «وەک یەک»ـەکە هەڵدەبژێرن: AB بۆ 11 و بۆ 00.
The XNOR gateگەیتی XNOR
One gate, three namesیەک گەیت، سێ ناو
The slides use three spellings for each gate, and you will meet all of them in books and data sheets: XOR = EXOR = EOR (exclusive-OR) and XNOR = EXNOR = ENOR (exclusive-NOR). The IEC rectangular symbol of XOR carries the mark =1; XNOR adds a bubble. A common chip is the 74HC86 with four 2-input XOR gates.
سلایدەکان سێ شێوەی نووسین بۆ هەر بەکار دەهێنن و هەموویان لە کتێب و پەڕەی زانیاریی دەبینیت: XOR = EXOR = EOR (exclusive-OR) و XNOR = EXNOR = ENOR (exclusive-NOR). لاکێشەییەکەی IECـی XOR نیشانەی =1ـی هەیە؛ XNOR بازنەیەکی بۆ زیاد دەکات. باو 74HC86ـە کە چوار دوو تێدایە.
The XNOR gateگەیتی XNOR
XNOR as an equality detectorXNOR وەک دۆزەرەوەی یەکسانی
Because XNOR says 1 for equal bits, it can compare numbers. Put one XNOR on each pair of matching bits and send all their outputs into an AND gate. The AND output is 1 only if every pair matches, that is, only if the two numbers are equal. This is the heart of a Comparator.
چونکە XNOR بۆ یەکسان 1 دەڵێت، دەتوانێت ژمارە بەراورد بکات. بۆ هەر جووتێک لە هاوشوێن XNORـێک دابنێ و هەموو بنێرە بۆ ناو . AND تەنها کاتێک 1ـە کە هەموو جووتەکان وەک یەک بن، واتە تەنها کاتێک دوو ژمارەکە یەکسان بن. ئەمە دڵی بەراوردکەرێکە.
XOR and XNOR in a timing diagramXOR و XNOR لە هێڵکاریی کاتبەندیدا
Feed the same two waveforms to an XOR gate and to an XNOR gate. The XOR output is HIGH in every interval where A and B differ. The XNOR output is HIGH where they are equal. So the XNOR waveform is the XOR waveform turned upside down.
هەمان دوو بدە بە و بە . XOR لە هەموو ئەو ماوانەدا HIGHـە کە A و B جیاوازن. XNOR لەو شوێنانەدا HIGHـە کە وەک یەکن. کەواتە XNOR هەمان XORـە بە سەرەوژێری.
All gates at a glanceهەموو گەیتەکان بە یەک سەیرکردن
You now know all seven gates of this chapter. The chart puts each one's symbol, expression and outputs side by side. NOT has one input; the others are shown with two inputs A and B.
ئێستا هەر حەوت ئەم بەشە دەناسیت. ئەم هێڵکارییە ، و هەر یەکێکیان لە تەنیشت یەکەوە دادەنێت. NOT یەک هەیە؛ ئەوانی تر بە دوو A و B پیشان دراون.
| A | B | AND | NAND | OR | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 0 | 1 | 0 | 0 | 1 |
| A | |
|---|---|
| 0 | 1 |
| 1 | 0 |
Read the summary table in pairs: NAND is the column of AND inverted, NOR is OR inverted and XNOR is XOR inverted. Notice also which gates give 1 for exactly one row (AND, NOR) and which give 0 for exactly one row (NAND, OR).
خشتە کۆتاییەکە دوو بە دوو بخوێنەوە: NAND ستوونی ANDـە بە پێچەوانەکراوی، NOR ستوونی ORـە بە پێچەوانەکراوی و XNOR ستوونی XORـە بە پێچەوانەکراوی. هەروەها سەرنج بدە کام تەنها بۆ یەک ڕیز 1 دەدەن (AND، NOR) و کامیان تەنها بۆ یەک ڕیز 0 دەدەن (NAND، OR).
All gates at a glanceهەموو گەیتەکان بە یەک سەیرکردن
Why only these gates?بۆچی تەنها ئەم گەیتانە؟
A gate is fully described by the output column of its truth table. With 2 inputs the table has 4 rows, so the column has 4 cells, each 0 or 1. That gives exactly different 2-input gates. With 3 inputs the table has 8 rows and there are gates; with n inputs, .
بە تەواوی بە ستوونی دیاری دەکرێت. بە دوو ، خشتەکە چوار ڕیزی هەیە، کەواتە ستوونەکە چوار خانەی هەیە و هەر خانەیەک 0 یان 1ـە. ئەمە ڕێک جۆری جیاوازی بە دوو دەدات. بە سێ ، خشتەکە هەشت ڕیزی هەیە و جۆر هەیە؛ بە n ، جۆر.
Most of the 16 are not interesting. Two always give the same value (always 0, always 1). Four only pass or invert one input (A, B, , ). Four more are an AND or an OR with one input inverted (, , , ). The six that remain — AND, NAND, OR, NOR, XOR and XNOR — are the useful ones that got their own names and chips.
زۆربەی ئەم 16 جۆرە سەرنجڕاکێش نین. دووانیان هەمیشە هەمان نرخ دەدەن (هەمیشە 0، هەمیشە 1). چواریان تەنها وەک خۆی یان پێچەوانەکراو تێدەپەڕێنن (A، B، ، ). چواری تر AND یان ORـن کە یەکێک لە پێچەوانە کراوەتەوە (، ، ، ). ئەو شەشەی دەمێننەوە — AND، NAND، OR، NOR، XOR و XNOR — بەسوودەکانن و ناو و تایبەتی خۆیان هەیە.
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What is rightڕاستەکەی |
|---|---|
| Treating XOR like OR: “1 if either input is 1”.مامەڵەکردن لەگەڵ XOR وەک OR: «1ـە ئەگەر هەر 1 بێت». | XOR is 1 only when the inputs differ; .XOR تەنها کاتێک 1ـە کە جیاواز بن؛ . |
| Writing XNOR as .نووسینی XNOR وەک . | XNOR is (or ).XNOR بریتییە لە (یان ). |
| Thinking a 3-input XOR means “exactly one input is 1”.بیرکردنەوە لەوەی XORـی سێ واتە «ڕێک یەک 1ـە». | A chain of XORs gives 1 for an odd number of 1s, so 111 gives 1.زنجیرەیەک XOR بۆ ژمارەیەکی تاکی 1، 1 دەدات، بۆیە 111 دەبێتە 1. |
| Confusing XOR with binary addition.تێکەڵکردنی XOR لەگەڵ . | XOR gives only the sum bit; binary addition also produces a carry: .XOR تەنها کۆ دەدات؛ دروست دەکات: . |
| Forgetting the extra curved line when drawing XOR.لەبیرکردنی هێڵە کەوانەییە زیادەکە لە کاتی کێشانی XOR. | Without it the symbol is an ordinary OR gate.بەبێ ئەو هێڵە ئاساییە. |
Exercisesڕاهێنانەکان
Find for , 0110 and 1111.
بۆ ، 0110 و 1111 بدۆزەرەوە.
Hintئاماژە
Count the 1s; XOR of many bits is 1 for an odd count.
1ـەکان بژمێرە؛ XORـی چەند بۆ ژمارەیەکی تاک 1ـە.
Show answerوەڵامەکە پیشان بدە
- 1101 has three 1s (odd) → .
- 0110 has two 1s (even) → .
- 1111 has four 1s (even) → .
- 1101 سێ دانە 1ـی هەیە (تاک) ← .
- 0110 دوو دانە 1ـی هەیە (جووت) ← .
- 1111 چوار دانە 1ـی هەیە (جووت) ← .
The 7-bit ASCII code of the letter S is 1010011. Find its even-parity bit with XOR and write the 8-bit byte that is sent (parity bit first).
کۆدی ASCIIـی پیتی S بە 7 بریتییە لە 1010011. جووتەکەی بە XOR بدۆزەرەوە و ئەو 8 بنووسە کە دەنێردرێن ( لە پێشەوە).
Show answerوەڵامەکە پیشان بدە
The code has four 1s, so the XOR of its bits is 0 and the parity bit is 0. The byte sent is 01010011, which still has four 1s (even).
کۆدەکە چوار دانە 1ـی هەیە، بۆیە XORـی 0ـە و 0ـە. ئەو دەنێردرێت 01010011ـە کە هێشتا چوار دانە 1ـی هەیە (جووت).
Three data bits A, B and C are sent with an even-parity bit P. (a) Write the truth table of P and show that . How many 2-input XOR gates does the generator need? (b) The receiver gets A, B, C and P. Design the checker E, where means “error”. (c) The data 101 is sent and noise flips B on the way. What does the checker show?
سێ A، B و C لەگەڵ جووتی P دەنێردرێن. (أ) P بنووسە و پیشانی بدە کە . دروستکەرەکە پێویستی بە چەند دوو هەیە؟ (ب) وەرگر A، B، C و P وەردەگرێت. پشکنەری E دیزاین بکە کە واتە «هەڵە». (ج) 101 دەنێردرێت و لە ڕێگادا B دەگۆڕێت. پشکنەرەکە چی پیشان دەدات؟
Hintئاماژە
Use the generator and checker of the parity screen, with three data bits instead of four.
دروستکەر و پشکنەرەکەی پەڕەی بەکار بهێنە، بەڵام بە سێ لە جیاتی چوار.
Show answerوەڵامەکە پیشان بدە
| A | B | C | Number of 1sژمارەی 1ـەکان | |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 2 | 0 |
| 1 | 0 | 0 | 1 | 1 |
| 1 | 0 | 1 | 2 | 0 |
| 1 | 1 | 0 | 2 | 0 |
| 1 | 1 | 1 | 3 | 1 |
(a) P is 1 exactly when the data has an odd number of 1s, so the four bits together always have an even number of 1s. That is the odd-number rule of XOR: , two 2-input XOR gates in a chain (, then ).
(أ) P ڕێک کاتێک 1ـە کە ژمارەیەکی تاکی 1ـی تێدا بێت، بۆیە هەر چوار پێکەوە هەمیشە ژمارەیەکی جووتی 1ـیان هەیە. ئەمە یاسای ژمارەی تاکی XORـە: ، دوو دوو بە زنجیرە (سەرەتا ، پاشان ).
(b) The checker XORs all four received bits: , three 2-input XOR gates. Without an error the four bits have an even number of 1s, so .
(ب) پشکنەرەکە هەموو ئەو چوار XOR دەکات کە وەریگرتوون: ، سێ دوو . ئەگەر هەڵە نەبێت، چوار ژمارەیەکی جووتی 1ـیان هەیە، بۆیە .
(c) For 101 the generator sends . The receiver gets 1 1 1 with : , so the error is caught.
(ج) بۆ 101، دروستکەرەکە دەنێرێت. وەرگر 1 1 1 لەگەڵ وەردەگرێت: ، بۆیە هەڵەکە دەدۆزرێتەوە.
Over six intervals and . Write the XOR and the XNOR output for each interval.
لە شەش ماوەدا و ـە. XOR و XNOR بۆ هەر ماوەیەک بنووسە.
Show answerوەڵامەکە پیشان بدە
| Intervalماوە | t1 | t2 | t3 | t4 | t5 | t6 |
|---|---|---|---|---|---|---|
| A | 0 | 1 | 1 | 0 | 0 | 1 |
| B | 1 | 1 | 0 | 0 | 1 | 1 |
| XOR | 1 | 0 | 1 | 0 | 1 | 0 |
| XNOR | 0 | 1 | 0 | 1 | 0 | 1 |
Exercisesڕاهێنانەکان
More exercisesڕاهێنانی زیاتر
Name the gate: (a) the output is 1 only when both inputs are equal; (b) the output is 0 only when all inputs are 1; (c) the output is 1 when an odd number of inputs are 1; (d) the output is 1 when at least one input is 1.
ناوی بنێ: (أ) تەنها کاتێک 1ـە کە هەردوو یەکسان بن؛ (ب) تەنها کاتێک 0ـە کە هەموو 1 بن؛ (ج) 1ـە کاتێک ژمارەیەکی تاک لە 1 بن؛ (د) 1ـە کاتێک لانیکەم یەک 1 بێت.
Show answerوەڵامەکە پیشان بدە
- (a) XNOR — equality
- (b) NAND — 0 only when all are 1
- (c) XOR — odd number of 1s
- (d) OR — at least one 1
- (أ) — یەکسانی
- (ب) — 0 تەنها کاتێک هەموو 1 بن
- (ج) — ژمارەی تاکی 1
- (د) — لانیکەم یەک 1
Show with a truth table that and both equal .
بە پیشانی بدە کە و هەردووکیان یەکسانن بە .
Show answerوەڵامەکە پیشان بدە
| A | B | |||||||
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
| 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
All three last columns are 0 1 1 0, so the expressions are equal.
هەر سێ ستوونی کۆتایی 0 1 1 0ـن، بۆیە یەکسانن.
With four XNOR gates and an AND gate, compare and . Give each XNOR output and the final result.
بە چوار و ، و بەراورد بکە. هەر XNORـێک و ئەنجامی کۆتایی بنووسە.
Show answerوەڵامەکە پیشان بدە
Bit 3: 0, 0 → 1. Bit 2: 1, 1 → 1. Bit 1: 1, 1 → 1. Bit 0: 0, 1 → 0. The AND of 1, 1, 1, 0 is 0, so the numbers are not equal.
3: 0، 0 ← 1. 2: 1، 1 ← 1. 1: 1، 1 ← 1. 0: 0، 1 ← 0. ANDـی 1، 1، 1، 0 دەبێتە 0، بۆیە ژمارەکان یەکسان نین.
Summaryپوختە
- XOR, : 1 when the inputs differ; .
- OR and XOR differ only in the row .
- Many-input XOR = 1 for an odd number of 1s, which makes and checks parity bits.
- XNOR, : 1 when the inputs are equal (an equality detector).
- Names: XOR = EXOR = EOR; XNOR = EXNOR = ENOR.
- Pairs: NAND = NOT AND, NOR = NOT OR, XNOR = NOT XOR.
- XOR، : 1ـە کاتێک جیاواز بن؛ .
- OR و XOR تەنها لە ڕیزی دا جیاوازن.
- XORـی چەند بۆ ژمارەیەکی تاکی 1، 1 دەدات؛ بەمەش دروست دەکات و دەیپشکنێت.
- XNOR، : 1ـە کاتێک یەکسان بن (دۆزەرەوەی یەکسانی).
- ناوەکان: XOR = EXOR = EOR؛ XNOR = EXNOR = ENOR.
- جووتەکان: NAND = NOT AND، NOR = NOT OR، XNOR = NOT XOR.
When is the output of an XOR gate 1?دەرخستەی گەیتی XOR کەی 1ـە؟
When its two inputs are different (for many inputs: an odd number of 1s).
کاتێک دوو جیاواز بن (بۆ چەند : ژمارەیەکی تاکی 1).
How is XNOR written?XNOR چۆن دەنووسرێت؟
, which equals .
کە یەکسانە بە .
Which gate tells whether a byte has an odd number of 1s?کام گەیت دەڵێت ئایا بایتێک ژمارەیەکی تاکی 1ـی تێدایە؟
A tree of XOR gates (a parity generator/checker).
دارێک لە (دروستکەر/پشکنەری ).
Which three gates are “NOT” versions of AND, OR and XOR?کام سێ گەیت وەشانی «NOT»ـی AND، OR و XORـن؟
NAND, NOR and XNOR.
NAND، NOR و XNOR.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
From transistors to the seven logic gates: NOT, AND, OR, NAND, NOR, XOR and XNOR, with their symbols and truth tables.
لە بۆ حەوت : NOT، AND، OR، NAND، NOR، XOR و XNOR، لەگەڵ و .
Chapter 'XOR and XNOR' (5:17-end): XOR truth table 0 1 1 0 and XNOR as its inverse.
بەشی XOR and XNOR (لە 5:17ـەوە تا کۆتایی): XOR (0 1 1 0) و XNOR وەک پێچەوانەکەی.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Building Gates from Transistorsدروستکردنی گەیتەکان لە ترانزیستۆرەکانەوە
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- Wikipedia: XOR gate (definition, odd parity for many inputs, symbols, uses, construction from other gates)
- Wikipedia: Parity bit (even/odd parity, XOR of the data bits, what it can and cannot detect)
- Wikipedia: NAND logic (XOR from four NAND gates)
- T. L. Floyd, Digital Fundamentals, 11th ed. (the course reference book): section 3-6, used for topic order only
- Wikipedia: Boolean function (there are 2^(2^n) Boolean functions of n inputs: 16 for two inputs)
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.