Chapterبەش 6 · Lectureوانە 6.4

NAND, NOR and the Negative Gatesگەیتی NAND، گەیتی NOR و گەیتە نەرێنییەکان

NAND and NOR are AND and OR with a NOT on the output. Their switch models, truth tables, symbols and timing diagrams (including a 3-input NOR); what a bubble means; the negative-OR and negative-AND gates that do the same jobs; the course author's homework circuits that build NOR and NAND from OR and NOT; and why NAND and NOR are universal gates.

و بریتین لە AND و OR بە NOTـێک لەسەر . نموونەی سویچییان، ، و (لەوانە NORـی سێ )؛ واتای ؛ و کە هەمان کار دەکەن؛ سووڕەکانی ئەرکی خاوەنی کۆرسەکە کە NOR و NAND لە OR و NOT دروست دەکەن؛ و بۆچی NAND و NOR .

19 min read20 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain NAND as NOT-AND and NOR as NOT-OR, and write their expressions.
  • Write the truth table of a NAND or NOR gate with any number of inputs.
  • Draw the output of NAND and NOR gates (2 and 3 inputs) in a timing diagram.
  • Read a bubble as inversion and recognise negative-OR = NAND and negative-AND = NOR.
  • Explain why NAND and NOR are called universal gates.
  • NAND وەک ⁦NOT-AND⁩ و NOR وەک ⁦NOT-OR⁩ ڕوون بکەیتەوە و بنووسیت.
  • یان بە هەر ژمارەیەک بنووسیت.
  • و (دوو و سێ ) لە بکێشیت.
  • وەک پێچەوانەکردنەوە بخوێنیتەوە و بزانیت ⁦Negative-OR = NAND⁩ و ⁦Negative-AND = NOR⁩.
  • ڕوونی بکەیتەوە بۆچی NAND و NOR پێیان دەوترێت .

Adding NOT to AND and ORزیادکردنی NOT بۆ AND و OR

You already know the three basic gates. Now connect a to the output of an : every output of the AND is flipped. This pair is used so often that it has its own name and symbol, NAND (NOT-AND). In the same way, an followed by a NOT is a NOR gate (NOT-OR). In the symbol we do not draw the whole NOT triangle, only its small circle, the , on the output.

ئێستا سێ دەناسیت. ئەمجارە بە ببەستە: هەموو AND پێچەوانە دەبنەوە. ئەم جووتە ئەوەندە بەکار دێت کە ناو و تایبەتی خۆی هەیە: NAND (⁦NOT-AND⁩). بە هەمان شێوە کە NOTـێکی بەدوادا بێت دەبێتە NOR (⁦NOT-OR⁩). لە هەموو سێگۆشەی NOT ناکێشین، تەنها بازنە بچووکەکەی، واتە ، لەسەر دادەنێین.

Top row: an AND gate with inputs A and B followed by a NOT gate equals one NAND symbol (an AND shape with a small circle on the output); X equals AB with one long bar over AB. Bottom row: an OR gate followed by a NOT gate equals the NOR symbol; X equals A plus B with one long bar over it. Arrows point to the bubbles.ڕیزی سەرەوە: گەیتێکی AND بە نێوخستەکانی A و B کە گەیتێکی NOT بەدوایدا دێت یەکسانە بە یەک هێمای NAND (شێوەی AND بە بازنەیەکی بچووک لەسەر دەرخستە)؛ X یەکسانە بە AB بە هێڵێکی درێژ لەسەر AB. ڕیزی خوارەوە: گەیتێکی OR کە NOTـی بەدوادا بێت یەکسانە بە هێمای NOR؛ X یەکسانە بە A + B بە هێڵێکی درێژ لەسەری. تیرەکان ئاماژە بە بازنەکانی پێچەوانەکردن دەکەن.
NAND is AND + NOT; NOR is OR + NOT. The bubble stands for the NOT.⁦NAND = AND + NOT⁩؛ ⁦NOR = OR + NOT⁩. جێگەی NOT دەگرێتەوە.CêIT

In an expression the NOT is a bar over the whole AND or OR: NAND is X=AB‾X = \overline{AB} and NOR is X=A+B‾X = \overline{A + B}. The long bar tells you the order: first do the AND (or the OR), then invert the result.

لە NOT هێڵێکە لەسەر هەموو AND یان ⁦OR: NAND⁩ بریتییە لە X=AB‾X = \overline{AB} و NOR بریتییە لە X=A+B‾X = \overline{A + B}. هێڵە درێژەکە ڕیزبەندییەکە پێت دەڵێت: سەرەتا AND (یان OR) بکە، پاشان ئەنجامەکە پێچەوانە بکەرەوە.

Definitionپێناسە

The small circle drawn on an input or output of a gate symbol. It means inversion (NOT); a bubble on an output marks an active-LOW output.

ئەو بازنە بچووکەیە کە لەسەر یان هێمای دەکێشرێت. واتای پێچەوانەکردنە ⁦(NOT)⁩؛ بازنەیەک لەسەر واتە ئەو لە LOWـدا چالاکە.

Quick checkپشکنینی خێراWhat does the small circle on the output of a gate symbol mean?بازنە بچووکەکەی سەر واتای چییە؟

The NAND gateگەیتی NAND

Definitionپێناسە

An AND gate followed by a NOT gate: its output is 0 only when all inputs are 1. NAND is a universal gate.

بریتییە لە کە بەدوایدا دێت: تەنها کاتێک 0ـە کە هەموو 1 بن. NAND .

NAND gives the opposite of AND in every row. AND outputs 1 only when all its inputs are 1, so NAND outputs 0 only when all its inputs are 1. In every other row its output is 1. In the words of the slides: the output is LOW only when all the inputs are HIGH.

NAND لە هەموو ڕیزێکدا پێچەوانەی AND دەدات. AND تەنها کاتێک 1 دەدات کە هەموو 1 بن، بۆیە NAND تەنها کاتێک 0 دەدات کە هەموو 1 بن. لە هەموو ڕیزەکانی تردا 1ـە. بە وتەی سلایدەکان: تەنها کاتێک LOWـە کە هەموو HIGH بن.

Truth table of a 2-input NAND gate (the AND column is shown for comparison) دوو (ستوونی AND بۆ بەراورد دانراوە)
ABABABX=AB‾X = \overline{AB}
0001
0101
1001
1110

Two symbols mean NAND: the distinctive shape (the AND shape with a bubble on the output) and the rectangular IEC shape (a box marked & with a bubble, or a small triangle called a polarity indicator, on the output). See the two symbol styles.

دوو واتای NAND دەدەن: شێوە تایبەتەکە (شێوەی AND بە بازنەیەک لەسەر ) و شێوە لاکێشەییەکەی IEC (سندووقێک بە نیشانەی & و بازنەیەک، یان سێگۆشەیەکی بچووک بە ناوی نیشانەی جەمسەر، لەسەر ). بڕوانە دوو شێوازەکەی هێما.

Quick checkپشکنینی خێراA NAND gate has A=1A = 1 and B=1B = 1. What is the output? A=1A = 1 و B=1B = 1ـی هەیە. چییە؟

The NAND gateگەیتی NAND

A switch model of NANDنموونەی سویچیی NAND

We can build NAND with two switches and a lamp. A battery feeds the lamp through a R. The two switches A and B are joined in series (one after the other), and this pair is connected across the lamp, side by side with it. A closed switch means 1, an open switch 0; a lit lamp means 1.

دەتوانین NAND بە دوو و گڵۆپێک دروست بکەین. پاترییەک لە ڕێگەی ⁦(R)⁩ کارەبا دەداتە گڵۆپەکە. دوو A و B بە دوای یەکدا (زنجیرەیی) بەستراون و ئەم جووتە بە دەوری گڵۆپەکەدا بەستراوە، واتە لە تەنیشتیەوە. داخراو واتە 1 و کراوە 0؛ گڵۆپی هەڵکراو واتە 1.

A battery and a resistor R feed a lamp. Switches A and B in series form a second path beside the lamp. Both switches are closed (A = 1, B = 1), so the current flows through the switches and the lamp is off. Beside it, a NAND symbol with inputs 1 and 1 gives 0, and the truth-table row 1 1 → 0 is highlighted.پاترییەک و بەرگرێک (R) کارەبا دەدەنە گڵۆپێک. سویچەکانی A و B بە دوای یەکدا ڕێگایەکی دووەم لە تەنیشت گڵۆپەکەوە دروست دەکەن. هەردوو سویچ داخراون (A = 1 و B = 1)، بۆیە تەزووەکە بە ناو سویچەکاندا دەڕوات و گڵۆپەکە کوژاوەیە. لە تەنیشتیەوە هێمای NAND بە نێوخستەکانی 1 و 1، 0 دەدات و ڕیزی 1 1 ← 0ی خشتەی ڕاستییەکە ڕەنگ کراوە.
The only way to switch the lamp off: close both A and B.تاکە ڕێگا بۆ کوژاندنەوەی گڵۆپەکە: داخستنی هەردوو A و B.CêIT

When both switches are closed they make an easy path around the lamp, so the current goes through the switches and the lamp goes dark (the resistor stops the battery from being shorted). If A or B is open, that path is broken and the current must pass through the lamp. So the lamp lights when both switches are open or when one of them is open, and it is off only when both are closed — exactly the NAND table.

کاتێک هەردوو داخراون، ڕێگایەکی ئاسان بە دەوری گڵۆپەکەدا دروست دەکەن، بۆیە تەزووەکە بە ناو دەڕوات و گڵۆپەکە دەکوژێتەوە ( ڕێگە نادات پاترییەکە ڕاستەوخۆ ببەسترێتەوە). ئەگەر A یان B کراوە بێت، ئەو ڕێگایە دەپچڕێت و تەزووەکە ناچار بە ناو گڵۆپەکەدا دەڕوات. کەواتە گڵۆپەکە هەڵدەکات کاتێک هەردوو کراوەن یان یەکێکیان کراوەیە. تەنها کاتێک دەکوژێتەوە کە هەردووکیان داخراون — ڕێک وەک NAND.

Quick checkپشکنینی خێراIn the NAND switch circuit, when is the lamp OFF?لە سووڕە سویچییەکەی NANDـدا گڵۆپەکە کەی کوژاوەیە؟

The NAND gateگەیتی NAND

NAND in a timing diagramNAND لە هێڵکاریی کاتبەندیدا

In a the inputs change over time and we draw the output under them. Work one interval at a time: write A and B, then the NAND of the two. The output X is LOW only in the intervals where A and B are both HIGH; at all other times it is HIGH.

لە بە درێژایی کات دەگۆڕێن و لە ژێریاندا دەکێشین. ماوە بە ماوە کار بکە: A و B بنووسە، پاشان NANDـی هەردووکیان. X تەنها لەو ماوانەدا LOWـە کە A و B هەردووکیان HIGH بن؛ لە هەموو کاتەکانی تردا HIGHـە.

Timing diagram over eight intervals t1 to t8. A is 0 1 1 0 1 1 1 0, B is 1 1 0 0 1 1 0 1, and the NAND output X is 1 0 1 1 0 0 1 1: X is low only in t2, t5 and t6, where both inputs are high.هێڵکاریی کاتبەندی لە هەشت ماوەدا (t1 تا t8). A بریتییە لە 0 1 1 0 1 1 1 0، B لە 1 1 0 0 1 1 0 1 و دەرخستەی NAND، واتە X، لە 1 0 1 1 0 0 1 1: X تەنها لە t2، t5 و t6دا LOWـە کە هەردوو نێوخستە تێیاندا HIGHـن.
NAND: X drops to LOW only while A and B are both HIGH.⁦NAND: X⁩ تەنها کاتێک دەبێتە LOW کە A و B هەردووکیان HIGH بن.CêIT

The bubble on a NAND output marks an active-LOW output. The gate “announces” its special case — all inputs are HIGH — by pulling the output LOW, while HIGH means “nothing special”. Many chip pins work this way: a reset or enable pin with a bubble (or a bar over its name, like EN‾\overline{EN}) is switched on by a 0.

لەسەر NAND نیشانەی ئەوەیە کە ئەو لە LOWـدا چالاکە. دۆخە تایبەتەکەی — هەموو HIGHـن — بە LOW کردنی ڕادەگەیەنێت، بەڵام HIGH واتە «هیچ شتێکی تایبەت نییە». زۆر قاچی بەم شێوەیە کار دەکەن: قاچی reset یان enable کە بازنەی هەبێت (یان هێڵێک لەسەر ناوەکەی، وەک EN‾\overline{EN}) بە 0 کارا دەبێت.

Quick checkپشکنینی خێراA is HIGH from t1 to t4. B is HIGH from t3 to t6. Both are LOW otherwise. Where is the NAND output LOW?A لە ⁦t1⁩ تا ⁦t4 HIGH⁩ـە. B لە ⁦t3⁩ تا ⁦t6 HIGH⁩ـە. لە کاتەکانی تردا هەردووکیان LOWـن. NAND لە کوێدا LOWـە؟

The NOR gateگەیتی NOR

Definitionپێناسە

An OR gate followed by a NOT gate: its output is 1 only when all inputs are 0. NOR is a universal gate.

بریتییە لە کە بەدوایدا دێت: تەنها کاتێک 1ـە کە هەموو 0 بن. NOR .

NOR gives the opposite of OR in every row. OR outputs 0 only when all its inputs are 0, so NOR outputs 1 only when all its inputs are 0. As soon as any input is HIGH, the output is LOW.

NOR لە هەموو ڕیزێکدا پێچەوانەی OR دەدات. OR تەنها کاتێک 0 دەدات کە هەموو 0 بن، بۆیە NOR تەنها کاتێک 1 دەدات کە هەموو 0 بن. هەر کە یەکێک لە HIGH بوو، LOW دەبێت.

Truth table of a 2-input NOR gate (the OR column is shown for comparison) دوو (ستوونی OR بۆ بەراورد دانراوە)
ABA+BA + BX=A+B‾X = \overline{A + B}
0001
0110
1010
1110

Its distinctive symbol is the OR shape with a bubble on the output; the rectangular IEC symbol is a box marked ≥1\geq 1 with a bubble (polarity indicator) on the output.

تایبەتەکەی شێوەی ORـە بە بازنەیەک لەسەر ؛ لاکێشەییەکەی IEC سندووقێکە بە نیشانەی ≥1\geq 1 و بازنەیەک (نیشانەی جەمسەر) لەسەر .

Quick checkپشکنینی خێراA NOR gate has A=0A = 0 and B=1B = 1. What is the output? A=0A = 0 و B=1B = 1ـی هەیە. چییە؟

The NOR gateگەیتی NOR

A switch model of NORنموونەی سویچیی NOR

For NOR the two switches are joined in parallel (side by side), and again the pair is connected across the lamp. Now one closed switch is enough to make the easy path around the lamp. The lamp lights only when A and B are both open, that is, when both are 0.

بۆ NOR دوو بە تەریبی (لە تەنیشت یەکەوە) بەستراون و دیسان ئەم جووتە بە دەوری گڵۆپەکەدا بەستراوە. ئەمجارە یەک داخراو بەسە بۆ دروستکردنی ڕێگا ئاسانەکەی دەوری گڵۆپەکە. گڵۆپەکە تەنها کاتێک هەڵدەکات کە A و B هەردووکیان کراوە بن، واتە هەردووکیان 0 بن.

A battery and a resistor R feed a lamp. Switches A and B in parallel form another path beside the lamp. Both switches are open (A = 0, B = 0), so the current flows through the lamp and it is lit. Beside it, a NOR symbol with inputs 0 and 0 gives 1, and the truth-table row 0 0 → 1 is highlighted.پاترییەک و بەرگرێک (R) کارەبا دەدەنە گڵۆپێک. سویچەکانی A و B بە تەریبی ڕێگایەکی تر لە تەنیشت گڵۆپەکەوە دروست دەکەن. هەردوو سویچ کراوەن (A = 0 و B = 0)، بۆیە تەزووەکە بە ناو گڵۆپەکەدا دەڕوات و هەڵدەکات. لە تەنیشتیەوە هێمای NOR بە نێوخستەکانی 0 و 0، 1 دەدات و ڕیزی 0 0 ← 1ی خشتەی ڕاستییەکە ڕەنگ کراوە.
NOR: the lamp is ON only when both switches are open.NOR: گڵۆپەکە تەنها کاتێک هەڵدەکات کە هەردوو کراوە بن.CêIT
The bus driver's “ready” lampگڵۆپی «ئامادە»ی شۆفێری پاس

A city bus has a front door and a back door. A lamp in front of the driver says “ready to move” only when neither door is open. If the front door or the back door is open, the lamp is off. Call an open door 1: the lamp is the NOR of the two doors — 1 only when both inputs are 0.

پاسێکی ناو شار دەرگایەکی پێشەوە و دەرگایەکی دواوەی هەیە. گڵۆپێک لەبەردەم شۆفێرەکە تەنها کاتێک دەڵێت «ئامادەیە بۆ ڕۆیشتن» کە هیچ کام لە دەرگاکان کراوە نەبێت. ئەگەر دەرگای پێشەوە یان دەرگای دواوە کراوە بێت، گڵۆپەکە کوژاوەیە. دەرگای کراوە بە 1 دابنێ: گڵۆپەکە NORـی هەردوو دەرگاکەیە — تەنها کاتێک 1ـە کە هەردوو 0 بن.

Where the analogy stops workingسنووری ئەم نموونەیە

A real bus checks more things (brakes, speed) and the driver can override it; a NOR gate looks only at its inputs and answers in a few nanoseconds.

پاسی ڕاستەقینە شتی زیاتر دەپشکنێت (بریک، خێرایی) و شۆفێرەکە دەتوانێت ڕێگای لێ بگرێت؛ تەنها سەیری دەکات و لە چەند نانۆچرکەیەکدا وەڵام دەداتەوە.

Quick checkپشکنینی خێراIn the NOR switch circuit, A is closed and B is open. Is the lamp on?لە سووڕە سویچییەکەی NORـدا، A داخراوە و B کراوەیە. گڵۆپەکە هەڵکراوە؟

The NOR gateگەیتی NOR

NOR in a timing diagramNOR لە هێڵکاریی کاتبەندیدا

For a NOR gate, every HIGH on A and every HIGH on B pulls the output LOW. X is HIGH only while A and B are both LOW.

بۆ ، هەر HIGHـێک لەسەر A و هەر HIGHـێک لەسەر B دەکاتە ⁦LOW. X⁩ تەنها ئەو کاتە HIGHـە کە A و B هەردووکیان LOW بن.

Timing diagram over eight intervals. A is 0 1 1 0 0 0 1 0, B is 0 0 1 1 0 0 0 1, and the NOR output X is 1 0 0 0 1 1 0 0: X is high only in t1, t5 and t6, where both inputs are low.هێڵکاریی کاتبەندی لە هەشت ماوەدا. A بریتییە لە 0 1 1 0 0 0 1 0، B لە 0 0 1 1 0 0 0 1 و دەرخستەی NOR، واتە X، لە 1 0 0 0 1 1 0 0: X تەنها لە t1، t5 و t6دا HIGHـە کە هەردوو نێوخستە تێیاندا LOWـن.
NOR: any HIGH input pulls X LOW.NOR: هەر HIGH، X دەکاتە LOW.CêIT
Quick checkپشکنینی خێراIn which intervals of the diagram above is X HIGH?لە کام ماوەکانی ئەو سەرەوەدا ⁦X HIGH⁩ـە؟

The NOR gateگەیتی NOR

A 3-input NOR in a timing diagramNORـی سێ نێوخستە لە هێڵکاریی کاتبەندیدا

The slides ask for the output of a 3-input NOR gate with the right timing. Read it like a relay race: the output falls when the first input goes HIGH, and it can only come back when the last HIGH input has gone LOW. In between, at least one input is always HIGH, so X stays LOW the whole time.

سلایدەکان داوای سێ دەکەن بە کاتبەندیی دروست. وەک پێشبڕکێی ڕاکردنی گواستنەوە بیخوێنەوە: کاتێک دادەبەزێت کە یەکەم HIGH دەبێت و تەنها کاتێک دەگەڕێتەوە کە دوایین HIGH بووبێتە LOW. لە نێوانیاندا هەمیشە لانیکەم یەک HIGHـە، بۆیە X بە درێژایی ئەو ماوەیە LOW دەمێنێتەوە.

Timing diagram over nine intervals for a 3-input NOR. A is high in t2 to t4, B in t3 to t6 and C in t5 to t8, overlapping. X is high in t1, low from t2 to t8, and high again in t9.هێڵکاریی کاتبەندی لە نۆ ماوەدا بۆ NORـی سێ نێوخستە. A لە t2 تا t4، B لە t3 تا t6 و C لە t5 تا t8 HIGHـن و یەکتر دەگرنەوە. X لە t1دا HIGHـە، لە t2 تا t8 LOWـە و لە t9دا دیسان HIGH دەبێتەوە.
A, then B, then C: X stays LOW from the first rise to the last fall.A، پاشان B، پاشان ⁦C: X⁩ لە یەکەم بەرزبوونەوە تا دوایین نزمبوونەوە بە LOW دەمێنێتەوە.CêIT
Quick checkپشکنینی خێراA 3-input NOR has A=0A = 0, B=0B = 0 and C=1C = 1. What is X? سێ A=0A = 0، B=0B = 0 و C=1C = 1ـی هەیە. X چییە؟

NAND and NOR with more inputsNAND و NOR بە نێوخستەی زیاتر

Like AND and OR, NAND and NOR gates can have three, four or more inputs: X=ABC‾X = \overline{ABC}, X=ABCD‾X = \overline{ABCD}, X=A+B+C‾X = \overline{A+B+C} and so on. The rules do not change. A NAND output is 0 in one row only (all inputs 1); a NOR output is 1 in one row only (all inputs 0). With n inputs the table has 2n2^n rows.

وەک AND و OR، و دەتوانن سێ، چوار یان زیاتر هەبێت: X=ABC‾X = \overline{ABC}، X=ABCD‾X = \overline{ABCD}، X=A+B+C‾X = \overline{A+B+C} و هتد. یاساکان ناگۆڕێن. NAND تەنها لە یەک ڕیزدا 0ـە (هەموو ⁦1⁩)؛ NOR تەنها لە یەک ڕیزدا 1ـە (هەموو ⁦0⁩). بە n ، خشتەکە 2n2^n ڕیزی هەیە.

3-input NAND and NOR side by sideNAND و NORـی سێ لە تەنیشت یەکەوە
ABCABC‾\overline{ABC}A+B+C‾\overline{A+B+C}
00011
00110
01010
01110
10010
10110
11010
11100
Quick checkپشکنینی خێراHow many of the 16 rows of a 4-input NAND truth table have the output 0?لە ⁦16⁩ ڕیزی چوار ، لە چەند ڕیزدا 0ـە؟

Negative-OR and negative-ANDگەیتی Negative-OR و گەیتی Negative-AND

A bubble can also sit on an input. Then that input is inverted before the gate sees it. An OR gate with bubbles on all its inputs is called a ; an AND gate with bubbles on all its inputs is a . The same circuits can be drawn with separate NOT gates: two inverters feeding an OR, or two inverters feeding an AND.

دەتوانێت لەسەر دابنرێت. ئەو کاتە ئەو پێش ئەوەی بگاتە پێچەوانە دەکرێتەوە. کە لەسەر هەموو بازنەی هەبێت پێی دەوترێت ؛ کە لەسەر هەموو بازنەی هەبێت ـە. هەمان سووڕەکان دەتوانرێت بە جیا بکێشرێن: دوو کە دەچنە ناو OR، یان دوو کە دەچنە ناو AND.

The negative gates and their twins: compare the columns in pairs و جووتەکانیان: ستوونەکان دوو بە دوو بەراورد بکە
ABA‾\overline{A}B‾\overline{B}Negative-AND A‾ B‾\overline{A}\,\overline{B}NOR A+B‾\overline{A+B}Negative-OR A‾+B‾\overline{A}+\overline{B}NAND AB‾\overline{AB}
00111111
01100011
10010011
11000000

Compare the columns: the negative-AND column equals the NOR column, and the negative-OR column equals the NAND column, in every row. So they are the same gates drawn two ways: NAND ≡ negative-OR and NOR ≡ negative-AND.

ستوونەکان بەراورد بکە: ستوونی ⁦Negative-AND⁩ لە هەموو ڕیزێکدا یەکسانە بە ستوونی NOR و ستوونی ⁦Negative-OR⁩ یەکسانە بە ستوونی NAND. کەواتە ئەمانە هەمان کە بە دوو شێوە کێشراون: NAND ≡ ⁦Negative-OR⁩ و NOR ≡ ⁦Negative-AND⁩.

Quick checkپشکنینی خێراAn AND gate has a bubble on each of its two inputs. Which gate is it the same as? لەسەر هەردوو بازنەی هەیە. وەک کام وایە؟

Negative-OR and negative-ANDگەیتی Negative-OR و گەیتی Negative-AND

Why two symbols for one gate?بۆچی دوو هێما بۆ یەک گەیت؟

Two rows. Top: a NAND symbol is equivalent to an OR symbol with bubbles on both inputs (negative-OR); X equals the complement of AB, which equals A-bar plus B-bar; the output is 0 only when A = B = 1. Bottom: a NOR symbol is equivalent to an AND symbol with bubbles on both inputs (negative-AND); X equals the complement of A plus B, which equals A-bar times B-bar; the output is 1 only when A = B = 0.دوو ڕیز. سەرەوە: هێمای NAND هاوتایە لەگەڵ هێمای OR بە بازنە لەسەر هەردوو نێوخستە (Negative-OR)؛ X یەکسانە بە تەواوکەری AB کە یەکسانە بە Ā + B̄؛ دەرخستە تەنها کاتێک 0ـە کە A = B = 1. خوارەوە: هێمای NOR هاوتایە لەگەڵ هێمای AND بە بازنە لەسەر هەردوو نێوخستە (Negative-AND)؛ X یەکسانە بە تەواوکەری A + B کە یەکسانە بە Ā·B̄؛ دەرخستە تەنها کاتێک 1ـە کە A = B = 0.
Two symbols for each gate: NAND ≡ negative-OR, NOR ≡ negative-AND.دوو بۆ هەر : NAND ≡ ⁦Negative-OR⁩ و NOR ≡ ⁦Negative-AND⁩.CêIT

Why keep two symbols for one gate? Each one tells the reader what the designer has in mind. The NAND symbol says “output goes LOW when all inputs are HIGH”. The negative-OR symbol says “output goes HIGH when any input is LOW”. These two equalities are , which a later lesson proves: AB‾=A‾+B‾\overline{AB} = \overline{A} + \overline{B} and A+B‾=A‾ B‾\overline{A+B} = \overline{A}\,\overline{B}.

بۆچی دوو بۆ یەک دەهێڵینەوە؟ هەر یەکێکیان بە خوێنەر دەڵێت دیزاینەرەکە بیر لە چی دەکاتەوە. NAND دەڵێت « LOW دەبێت کاتێک هەموو HIGH بن». ⁦Negative-OR⁩ دەڵێت « HIGH دەبێت کاتێک هەر LOW بێت». ئەم دوو یەکسانییە بە ناسراون و وانەیەکی داهاتوو دەیانسەلمێنێت: AB‾=A‾+B‾\overline{AB} = \overline{A} + \overline{B} و A+B‾=A‾ B‾\overline{A+B} = \overline{A}\,\overline{B}.

Quick checkپشکنینی خێراWhich symbol best says “the output goes HIGH when any input is LOW”?کام باشتر دەڵێت « HIGH دەبێت کاتێک هەر LOW بێت»؟

Lab: NOR and NAND from OR and NOTتاقیگە: NOR و NAND لە OR و NOT

The course author tested these ideas in a logic . His homework asks: what happens to a 3-input OR gate when we add NOT gates? The circuits use switches A, B and C (a closed switch = 1) and an LED as the output lamp. The two screens that follow show both examples with their truth tables.

خاوەنی کۆرسەکە ئەم بیرۆکانەی لە لۆجیکیدا تاقی کردەوە. ئەرکەکەی دەپرسێت: کاتێک بۆ سێ زیاد دەکەین چی ڕوو دەدات؟ سووڕەکان A، B و C ( داخراو = ⁦1⁩) و وەک گڵۆپی بەکار دەهێنن. دوو پەڕەکەی داهاتوو هەردوو نموونەکە لەگەڵ پیشان دەدەن.

Lab: NOR and NAND from OR and NOTتاقیگە: NOR و NAND لە OR و NOT

Example 1: a NOT on the output of ORنموونەی یەکەم: NOT لەسەر دەرخستەی OR

The three switches feed a 3-input OR gate. Its output X goes into a NOT gate, and the NOT output, X′X', drives the LED.

سێ دەچنە ناو سێ . ، X، دەچێتە ناو و NOT، واتە X′X'، هەڵدەکات.

The course author's homework circuit: OR + NOT. Inputs 1 1 1 → X=1X = 1 → X′=0X' = 0, so the LED is off. (Simulator labels are in English.)سووڕی ئەرکی خاوەنی کۆرسەکە: ⁦OR + NOT⁩. ⁦1 1 1⁩ ← X=1X = 1 ← X′=0X' = 0، بۆیە کوژاوەیە. (ناونیشانەکانی ناو بە ئینگلیزین.)Course material
OR followed by NOT: the table from the homeworkOR و پاشان NOT: خشتەکەی ناو ئەرکەکە
ABCX=A+B+CX = A+B+CX′=X‾X' = \overline{X}
00001
00110
01010
01110
10010
10110
11010
11110

X′X' is 1 in one row only, the first, where all three inputs are 0. That is the NOR table. So OR followed by NOT is a NOR gate, and the author's caption names it correctly: this gate is Negative-AND, which means NOR — the same gate as on the previous screen.

X′X' تەنها لە یەک ڕیزدا 1ـە، ڕیزی یەکەم، کە هەر سێ تێیدا 0ـن. ئەمە NORـە. کەواتە OR و پاشان NOT دەبێتە و ڕوونکردنەوەی وێنەکەی خاوەنی کۆرسەکە ڕاستە: ئەم ⁦Negative-AND⁩ـە، واتە NORـە — هەمان کە لە پەڕەی پێشوودا بینیمان.

Quick checkپشکنینی خێراIn Example 1, the switches are A=0A = 0, B=0B = 0, C=1C = 1. What does the LED show?لە نموونەی یەکەمدا A=0A = 0، B=0B = 0 و C=1C = 1ن. چی پیشان دەدات؟

Lab: NOR and NAND from OR and NOTتاقیگە: NOR و NAND لە OR و NOT

Example 2: a NOT on every input of ORنموونەی دووەم: NOT لەسەر هەموو نێوخستەیەکی OR

Now each switch goes through its own NOT gate before it reaches the OR gate. The OR gate therefore receives A‾\overline{A}, B‾\overline{B} and C‾\overline{C}.

ئێستا هەر پێش ئەوەی بگاتە بە تایبەتی خۆیدا تێدەپەڕێت. بۆیە A‾\overline{A}، B‾\overline{B} و C‾\overline{C} وەردەگرێت.

The course author's homework circuit: three NOTs + OR. Inputs 0 0 0 → 1 1 1 → OR = 1, so the LED is lit. (Simulator labels are in English.)سووڕی ئەرکی خاوەنی کۆرسەکە: سێ ⁦NOT + OR⁩. ⁦0 0 0⁩ ← ⁦1 1 1⁩ ← ⁦OR = 1⁩، بۆیە هەڵکراوە. (ناونیشانەکانی ناو بە ئینگلیزین.)Course material
NOT on every input, then OR: the table from the homeworkNOT لەسەر هەموو ، پاشان OR: خشتەکەی ناو ئەرکەکە
ABCA‾\overline{A}B‾\overline{B}C‾\overline{C}A‾+B‾+C‾\overline{A}+\overline{B}+\overline{C}
0001111
0011101
0101011
0111001
1000111
1010101
1100011
1110000

The output is 0 in one row only, the last, where A, B and C are all 1; every other row gives 1. That is the NAND table: A‾+B‾+C‾=ABC‾\overline{A}+\overline{B}+\overline{C} = \overline{ABC}. The author called this circuit Negative-OR, which means NAND — correct. In his rule “when any input equals 0, the output is 1”, input means a switch A, B or C of the circuit; the OR gate itself receives the inverted values.

تەنها لە یەک ڕیزدا 0ـە، ڕیزی کۆتایی، کە A، B و C هەموویان 1ـن؛ هەموو ڕیزەکانی تر 1 دەدەن. ئەمە NANDـە: A‾+B‾+C‾=ABC‾\overline{A}+\overline{B}+\overline{C} = \overline{ABC}. خاوەنی کۆرسەکە ئەم سووڕەی ناو نا ⁦Negative-OR⁩، واتە NAND — ڕاستە. لە یاساکەیدا «کاتێک هەر یەکسان بێت بە 0، دەبێتە 1»، مەبەست لە A، B یان Cـی سووڕەکەیە؛ خۆی نرخە پێچەوانەکراوەکان وەردەگرێت.

Quick checkپشکنینی خێراWhich single gate can replace “a NOT on each input, then OR”?کام یەک دەتوانێت جێگەی «NOT لەسەر هەر ، پاشان OR» بگرێتەوە؟

NAND and NOR are universal gatesNAND و NOR گەیتی گشتگیرن

The first gates lesson called NAND and NOR . Universal means that one kind of gate is enough to build any logic circuit. The idea in one line: every circuit can be written with NOT, AND and OR, and NAND gates alone can make all three. The smallest example: join the two inputs of a NAND and feed A into both. It becomes a NOT gate: A⋅A‾=A‾\overline{A \cdot A} = \overline{A}. (A NOR with joined inputs is a NOT too: A+A‾=A‾\overline{A + A} = \overline{A}.)

یەکەم وانەی گەیتەکان NAND و NORـی بە ناو برد. گشتگیر واتە یەک جۆر بەسە بۆ دروستکردنی هەر . بیرۆکەکە بە کورتی: هەموو سووڕێک دەتوانرێت بە NOT، AND و OR بنووسرێت و بە تەنها دەتوانن هەر سێکیان دروست بکەن. بچووکترین نموونە: هەردوو پێکەوە ببەستە و A بدە بە هەردووکیان. دەبێتە : A⋅A‾=A‾\overline{A \cdot A} = \overline{A}. ( بە بەستراو بە یەکەوەش NOTـە: A+A‾=A‾\overline{A + A} = \overline{A}.)

Put two of these NOTs in front of a third NAND, and the three gates work as one OR gate. The animation steps through all four input pairs: the last NAND gives 0 only when A=B=0A = B = 0.

دوو لەم NOTـانە بخە پێش NANDـێکی سێیەم، ئەوا هەر سێ وەک یەک کار دەکەن. ئەنیمەیشنەکە بە هەر چوار جووتە نرخەکەی دەڕوات: NANDـی کۆتایی تەنها کاتێک 0 دەدات کە A=B=0A = B = 0.

Animation of an OR gate made of three NAND gates. Inputs A and B step through 00, 01, 10 and 11. The first two NANDs show A-bar and B-bar, the last NAND gives X, and a lamp lights for 01, 10 and 11 but stays off for 00. A truth table on the right highlights the current row, and the last frame says X = A + B in every row.
Animation of an OR gate made of three NAND gates. Inputs A and B step through 00, 01, 10 and 11. The first two NANDs show A-bar and B-bar, the last NAND gives X, and a lamp lights for 01, 10 and 11 but stays off for 00. A truth table on the right highlights the current row, and the last frame says X = A + B in every row.
Three NAND gates working as one OR gate.سێ وەک یەک کار دەکەن.CêIT

The full method — AND and OR from NAND gates, the same with NOR gates, and whole circuits built as NAND–NAND — is taught in NAND and NOR: the universal gates and Everything from NOR gates.

ڕێگا تەواوەکە — دروستکردنی AND و OR لە ، هەمان کار بە و دروستکردنی سووڕی تەواو بە شێوەی ⁦NAND–NAND⁩ — لە NAND و NOR: گەیتە گشتگیرەکان و هەموو شتێک لە گەیتەکانی NOR فێر دەکرێت.

Quick checkپشکنینی خێراYou join the two inputs of a NAND gate and feed A into both. What does the gate do?هەردوو پێکەوە دەبەستیت و A دەدەیت بە هەردووکیان. چی دەکات؟

implementation function with NAND Gates in logic designhiwa school · Kurdish (Sorani)کوردی (سۆرانی) · 2.6K viewsبینین · 98 likesلایک · Partبەشی 4:26–10:00 (ofلە 35:02)

Kurdish (Sorani): NAND as a universal gate (NOT, AND, OR from NANDs, the two NAND symbols) and turning an SOP into a NAND-NAND circuit.

بە کوردیی سۆرانی: NAND وەک (NOT، AND و OR لە NAND، هەروەها دوو NAND) و گۆڕینی SOP بۆ ⁦NAND-NAND⁩.

4:26-10:00: NAND and NOR are universal; NOT, AND and OR from NAND gates; the two NAND symbols (AND-invert, invert-OR).

لە ⁦4:26⁩ تا ⁦10:00: NAND⁩ و NOR ؛ NOT، AND و OR لە ؛ دوو ⁦NAND (AND⁩ و پاشان پێچەوانەکردنەوە؛ پێچەوانەکردنەوە و پاشان OR).

Common mistakesهەڵە باوەکان

MistakeهەڵەWhat is rightڕاستەکەی
Reading AB‾\overline{AB} (one long bar) as A‾ B‾\overline{A}\,\overline{B} (two short bars).خوێندنەوەی AB‾\overline{AB} (یەک هێڵی درێژ) وەک A‾ B‾\overline{A}\,\overline{B} (دوو هێڵی کورت).They differ. For A=1A = 1, B=0B = 0: AB‾=1\overline{AB} = 1 but A‾ B‾=0\overline{A}\,\overline{B} = 0. The long bar is NAND; two short bars are negative-AND, which is NOR.جیاوازن. بۆ A=1A = 1 و B=0B = 0: AB‾=1\overline{AB} = 1 بەڵام A‾ B‾=0\overline{A}\,\overline{B} = 0. هێڵی درێژ NANDـە؛ دوو هێڵی کورت ⁦Negative-AND⁩ـە کە NORـە.
“NAND is 0 when any input is 0.”«NAND کاتێک 0ـە کە هەر 0 بێت.»That describes AND. NAND is 0 only when all inputs are 1.ئەوە وەسفی ANDـە. NAND تەنها کاتێک 0ـە کە هەموو 1 بن.
“A NOR output is 1 when all inputs are 1.” (the homework's English sentence)« NOR کاتێک 1ـە کە هەموو 1 بن.» (ڕستە ئینگلیزییەکەی ئەرکەکە)A NOR output is 1 only when all inputs are 0. NOR تەنها کاتێک 1ـە کە هەموو 0 بن.
Dropping the bubble when copying a symbol.لەبیرچوونی بازنەکە لە کاتی کێشانەوەی .Without its bubble a NAND becomes an AND. Check every output and input for bubbles.بەبێ بازنەکەی NAND دەبێتە AND. هەموو و بۆ بازنە بپشکنە.
Thinking negative-OR is a new function.بیرکردنەوە لەوەی ⁦Negative-OR⁩ کارێکی نوێیە.Negative-OR has the same truth table as NAND; it is the same gate drawn another way.⁦Negative-OR⁩ هەمان NANDـی هەیە؛ هەمان بە شێوەیەکی تر کێشراوە.

Exercisesڕاهێنانەکان

Exerciseڕاهێنان3-input NOR tableخشتەی ڕاستیی NORـی سێ نێوخستە

Write the truth table of a 3-input NOR gate, X=A+B+C‾X = \overline{A+B+C}. In how many rows is X=1X = 1?

سێ ، X=A+B+C‾X = \overline{A+B+C}، بنووسە. X لە چەند ڕیزدا 1ـە؟

Hintئاماژە

Count from 000 to 111 and remember: one HIGH input is enough to make NOR LOW.

لە ⁦000⁩ تا ⁦111⁩ بژمێرە و لەبیرت بێت: یەک HIGH بەسە بۆ ئەوەی ⁦NOR LOW⁩ بێت.

Show answerوەڵامەکە پیشان بدە
ABCX
0001
0010
0100
0110
1000
1010
1100
1110

X=1X = 1 in one row only: A=B=C=0A = B = C = 0. Any 1 on an input makes X=0X = 0.

X تەنها لە یەک ڕیزدا 1ـە: A=B=C=0A = B = C = 0. هەر 1ـێک لەسەر X دەکاتە 0.

ExerciseڕاهێنانTiming by handکاتبەندی بە دەست

Over six intervals A=1 1 0 0 1 0A = 1\ 1\ 0\ 0\ 1\ 0 and B=0 1 1 0 1 1B = 0\ 1\ 1\ 0\ 1\ 1. Write the output X of a NAND gate and of a NOR gate for each interval.

لە شەش ماوەدا A=1 1 0 0 1 0A = 1\ 1\ 0\ 0\ 1\ 0 و B=0 1 1 0 1 1B = 0\ 1\ 1\ 0\ 1\ 1ـە. X بۆ و بۆ لە هەر ماوەیەکدا بنووسە.

Hintئاماژە

Look for the intervals where both inputs are 1 (NAND) and where both are 0 (NOR).

بۆ ئەو ماوانە بگەڕێ کە هەردوو 1ـن ⁦(NAND)⁩ و ئەوانەی هەردووکیان 0ـن ⁦(NOR)⁩.

Show answerوەڵامەکە پیشان بدە
Intervalماوەt1t2t3t4t5t6
A110010
B011011
NAND101101
NOR000100

NAND is 0 only in t2 and t5 (both inputs 1). NOR is 1 only in t4 (both inputs 0).

NAND تەنها لە ⁦t2⁩ و ⁦t5⁩ـدا 0ـە (هەردوو 1ـن). NOR تەنها لە ⁦t4⁩ـدا 1ـە (هەردوو 0ـن).

ExerciseڕاهێنانName the gateناوی گەیتەکە بنێ

A circuit sends A and B through two NOT gates and then into an AND gate. Write its expression, fill in its truth table and name the single gate that could replace it.

سووڕێک A و B بە دوو دەنێرێت و پاشان بۆ ناو . بنووسە، پڕ بکەرەوە و ناوی ئەو تاکە بنێ کە دەتوانێت جێگەی بگرێتەوە.

Show answerوەڵامەکە پیشان بدە

X=A‾ B‾X = \overline{A}\,\overline{B}. Rows 00, 01, 10, 11 give 1, 0, 0, 0. This is the negative-AND gate, which has the NOR table, so one NOR gate replaces the three gates.

X=A‾ B‾X = \overline{A}\,\overline{B}. ڕیزەکانی ⁦00⁩، ⁦01⁩، ⁦10⁩ و ⁦11⁩ بەم شێوەیە دەبن: 1، 0، 0، 0. ئەمە کە NORـی هەیە، بۆیە یەک جێگەی هەر سێ دەگرێتەوە.

ExerciseڕاهێنانWrite the rule correctlyیاساکە بە دروستی بنووسە

In your own words, write the rule of Example 1 (a NOT on the output of a 3-input OR) so that it matches its truth table.

بە وشەی خۆت یاسای نموونەی یەکەم (NOT لەسەر ORـی سێ ) بنووسە بە شێوەیەک کە لەگەڵ بگونجێت.

Show answerوەڵامەکە پیشان بدە

“If any input is 1, the output is 0. Only when all the inputs are 0 is the output 1.” This is the NOR rule.

«ئەگەر هەر 1 بێت، 0ـە. تەنها کاتێک هەموو 0 بن 1ـە.» ئەمە یاسای NORـە.

Summaryپوختە

  • NAND = NOT-AND, X=AB‾X = \overline{AB}: the output is 0 only when all inputs are 1.
  • NOR = NOT-OR, X=A+B‾X = \overline{A+B}: the output is 1 only when all inputs are 0.
  • A bubble means inversion. On an output it marks an active-LOW output.
  • NAND ≡ negative-OR and NOR ≡ negative-AND (De Morgan's theorems).
  • OR + NOT = NOR and NOTs + OR = NAND, as the homework circuits showed.
  • NAND and NOR are universal: one kind of gate is enough for any circuit (a NAND with joined inputs is already a NOT). The full method: the universal gates.
  • ⁦NAND = NOT-AND⁩، X=AB‾X = \overline{AB}: تەنها کاتێک 0ـە کە هەموو 1 بن.
  • ⁦NOR = NOT-OR⁩، X=A+B‾X = \overline{A+B}: تەنها کاتێک 1ـە کە هەموو 0 بن.
  • واتە پێچەوانەکردنەوە. لەسەر نیشانەی چالاک لە LOWـدایە.
  • NAND ≡ ⁦Negative-OR⁩ و NOR ≡ ⁦Negative-AND⁩ ().
  • ⁦OR + NOT = NOR⁩ و NOTـەکان + ⁦OR = NAND⁩، وەک سووڕەکانی ئەرکەکە پیشانیان دا.
  • NAND و NOR گشتگیرن: یەک جۆر بەسە بۆ هەر سووڕێک (NANDـێک بە بەستراو بە یەکەوە خۆی NOTـە). ڕێگا تەواوەکە: گەیتە گشتگیرەکان.
Review questionsپرسیارەکانی پێداچوونەوە
When is the output of a NAND gate LOW?دەرخستەی گەیتی NAND کەی LOWـە؟

Only when all of its inputs are HIGH.

تەنها کاتێک هەموو HIGH بن.

What single gate is an AND gate with a bubble on each input?گەیتی AND بە بازنەیەک لەسەر هەر نێوخستەیەک کام تاکە گەیتە؟

A NOR gate (the negative-AND form).

(شێوەی ⁦Negative-AND⁩).

Why are NAND and NOR called universal?بۆچی NAND و NOR پێیان دەوترێت گشتگیر؟

Because one kind of gate — NAND alone, or NOR alone — can make NOT, AND and OR, and so every circuit.

چونکە یەک جۆر — تەنها NAND، یان تەنها NOR — دەتوانێت NOT، AND و OR دروست بکات و بەمەش هەموو سووڕێک.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

Understanding Logic GatesSpanning Tree · Englishئینگلیزی · 1.5M viewsبینین · 34K likesلایک · Partبەشی 3:28–5:17 (ofلە 7:27)

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 'NAND and NOR' (3:28-5:17): AND/OR followed by NOT, truth tables.

بەشی NAND and NOR (⁦3:28⁩ تا ⁦5:17): AND⁩ و OR کە NOTـێکیان بە دوادا دێت، لەگەڵ .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

XOR, XNOR and All Gates at a Glanceگەیتی XOR، گەیتی XNOR و هەموو گەیتەکان بە یەک سەیرکردن

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.