Chapterبەش 7 · Lectureوانە 7.1

Boolean Expressions and Lawsدەربڕینە بوولییەکان و یاساکانی جەبری بوول

The language of Boolean algebra — variables, complements, literals, sum and product terms, and why + means OR — and its first three laws: commutative, associative and distributive (with factoring), each proved by a truth table and drawn as gates. The same laws hold for sets and for propositional logic.

زمانی — ، ، ، و و بۆچی + واتە OR — و سێ یاسای یەکەمی: ، و (لەگەڵ )، هەر یەکەیان بە سەلمێنراوە و وەک کێشراوە. هەمان یاساکان بۆ و بۆ ڕاستن.

12 min read13 خولەک خوێندنەوە · 15 stepsهەنگاو

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

  • Name the parts of a Boolean expression: variables, complements, literals, sum terms and product terms.
  • Read + as OR and · as AND, and evaluate an expression in the right order.
  • State the commutative, associative and distributive laws and draw them as gate circuits.
  • Prove a law (or find a counterexample) with a truth table.
  • Factor an expression to save gates.
  • بەشەکانی ناو ببەیت: ، ، ، و .
  • + وەک OR و · وەک AND بخوێنیتەوە و بە ڕیزبەندیی دروست هەڵبسەنگێنیت.
  • ، و بڵێیت و وەک سووڕی بیانکێشیت.
  • یاسایەک بە بسەلمێنیت (یان نموونەیەکی پێچەوانە بدۆزیتەوە).
  • شیتەڵ بکەیت بۆ کەمکردنەوەی .

An algebra for circuitsجەبرێک بۆ سووڕەکان

In 1847 and 1854 the English mathematician George Boole wrote the rules of logic as algebra, with only two values. In 1937 Claude Shannon showed in his master's thesis that the same algebra describes circuits of switches and relays. Since then engineers write a circuit as an expression, change the expression with a few fixed laws, and get a smaller circuit that behaves exactly the same.

لە ساڵانی ⁦1847⁩ و ⁦1854⁩ـدا بیرکاریزانی ئینگلیز جۆرج بوول یاساکانی لۆجیکی وەک جەبر نووسی، تەنها بە دوو نرخ. لە ساڵی ⁦1937⁩ـدا کلۆد شانۆن لە نامەی ماستەرەکەیدا پیشانی دا کە هەمان جەبر وەسفی سووڕی و ڕیلەکان دەکات. لەو کاتەوە ئەندازیاران سووڕێک وەک دەنووسن، بە چەند یاسایەکی جێگیر دەگۆڕن و سووڕێکی بچووکتر وەردەگرن کە ڕێک هەمان کار دەکات.

Definitionپێناسە

The algebra of the two values 0 and 1 with the operations AND (·), OR (+) and NOT (a bar). George Boole created it in 1854; Claude Shannon used it in 1937 to design switching circuits.

جەبری دوو نرخی 0 و 1ـە لەگەڵ کارەکانی AND (·)، ⁦OR (+)⁩ و NOT (هێڵی سەرەوە). جۆرج بوول لە ساڵی ⁦1854⁩دا دایهێنا و کلۆد شانۆن لە ⁦1937⁩دا بۆ دیزاینی بەکاری هێنا.

This lesson builds the vocabulary of Boolean expressions and the first three laws: commutative, associative and distributive. The next lesson adds twelve shorter rules.

ئەم وانەیە وشەکانی و سێ یاسای یەکەم فێر دەکات: ، و . وانەی داهاتوو دوازدە یاسای کورتتر زیاد دەکات.

Quick checkپشکنینی خێراWhat does Boolean algebra let an engineer do? ڕێگە بە ئەندازیار دەدات چی بکات؟

Variables, complements and literalsگۆڕاوە بوولییەکان، تەواوکەرەکان و لیتەراڵەکان

Definitionپێناسە

A letter, such as A, B or X, that stands for a logic value that can only be 0 or 1. It often names an input or output of a circuit.

پیتێکە، وەک A، B یان X، کە جێگەی نرخێکی لۆجیکی دەگرێتەوە کە تەنها دەتوانێت 0 یان 1 بێت. زۆرجار ناوی یان سووڕێکە.

A is a letter such as A, B or X that can only be 0 or 1. It usually names a wire: an input or the output of a circuit. The of a variable is its opposite value, written with a bar, A‾\overline{A} (“A bar”), or with a prime, A′A'. A is a variable or its complement.

پیتێکە وەک A، B یان X کە تەنها دەتوانێت 0 یان 1 بێت. بە زۆری ناوی وایەرێکە: یان سووڕێک. نرخە پێچەوانەکەیەتی و بە هێڵێک لەسەریەوە دەنووسرێت، A‾\overline{A} («A بار»)، یان بە پرایم، A′A'. بریتییە لە یان .

Example: X=A‾B+ACX = \overline{A}B + AC has three input variables (A, B and C) and four literals (A‾\overline{A}, B, A and C). A and A‾\overline{A} count as two different literals.

نموونە: X=A‾B+ACX = \overline{A}B + AC سێ هەیە (A، B و C کە ) و چوار (A‾\overline{A}، B، A و ⁦C). A⁩ و A‾\overline{A} وەک دوو جیاواز دەژمێردرێن.

Quick checkپشکنینی خێراHow many literals does AB‾ C‾+A‾BA\overline{B}\,\overline{C} + \overline{A}B have?AB‾ C‾+A‾BA\overline{B}\,\overline{C} + \overline{A}B چەند هەیە؟

Variables, complements and literalsگۆڕاوە بوولییەکان، تەواوکەرەکان و لیتەراڵەکان

+ means OR, · means AND+ واتە OR، · واتە AND

Boolean algebra borrows two signs from arithmetic but gives them logic meanings. Boolean addition (++) is the OR operation, and Boolean multiplication (⋅\cdot, or nothing at all: ABAB) is the AND operation. In Boolean algebra applied to circuits, “addition” and “OR” are the same thing.

دوو نیشانە لە ژمێریاری وەردەگرێت بەڵام واتای لۆجیکییان پێدەدات. کۆکردنەوەی بوولی (++) هەمان ORـە و لێکدانی بوولی (⋅\cdot، یان هیچ نیشانەیەک: ABAB) هەمان ANDـە. لە کاتێک بۆ سووڕەکان بەکار دێت، «کۆکردنەوە» و «OR» یەک شتن.

Boolean addition is OR; Boolean multiplication is ANDکۆکردنەوەی بوولی ORـە؛ لێکدانی بوولی ANDـە
ABA+BA + BA⋅BA \cdot B
0000
0110
1010
1111

When an expression mixes the operations, the order is: first the bars (NOT), then AND, then OR — just as multiplication comes before addition. So A+BCA + BC means A+(BC)A + (BC). Use brackets to change the order: (A+B)C(A + B)C.

کاتێک لە NOT، AND و OR تێکەڵ دەبن، ڕیزبەندییەکە () بەم شێوەیەیە: سەرەتا هێڵەکان ⁦(NOT)⁩، پاشان AND، پاشان OR — هەروەک لێکدان پێش کۆکردنەوە دێت. بۆیە A+BCA + BC واتە A+(BC)A + (BC). بۆ گۆڕینی ڕیزبەندییەکە کەوانە بەکار بهێنە: (A+B)C(A + B)C.

Quick checkپشکنینی خێراA=1A = 1, B=0B = 0, C=0C = 0. What is A+BCA + BC?A=1A = 1، B=0B = 0، C=0C = 0. A+BCA + BC چەندە؟

Variables, complements and literalsگۆڕاوە بوولییەکان، تەواوکەرەکان و لیتەراڵەکان

Sum terms and product termsبڕەکانی کۆ و بڕەکانی لێکدان

A is literals joined by OR, such as A+B‾+CA + \overline{B} + C. It is 0 in one case only: when every literal in it is 0 — here A=0A = 0, B=1B = 1, C=0C = 0. A is literals joined by AND, such as AB‾CA\overline{B}C. It is 1 in one case only: when every literal is 1 — here A=1A = 1, B=0B = 0, C=1C = 1.

بریتییە لە چەند کە بە OR بەیەکەوە بەستراون، وەک A+B‾+CA + \overline{B} + C. تەنها لە یەک حاڵەتدا 0ـە: کاتێک هەموو 0 بن — لێرەدا A=0A = 0، B=1B = 1، C=0C = 0. بریتییە لە چەند کە بە AND بەیەکەوە بەستراون، وەک AB‾CA\overline{B}C. تەنها لە یەک حاڵەتدا 1ـە: کاتێک هەموو 1 بن — لێرەدا A=1A = 1، B=0B = 0، C=1C = 1.

An OR gate makes a sum term and an AND gate makes a product term. Later in the course, whole circuits are written as sums of product terms and products of sum terms.

دروست دەکات و . دواتر لە کۆرسەکەدا سووڕە تەواوەکان وەک کۆی و لێکدانی دەنووسرێن.

Quick checkپشکنینی خێراFor which inputs is the sum term A‾+B\overline{A} + B equal to 0? A‾+B\overline{A} + B بۆ کام یەکسانە بە 0؟

How to prove a law: try every rowچۆن یاسایەک دەسەلمێنیت: هەموو ڕیزەکان تاقی بکەرەوە

In school algebra a variable can take endless values, so we cannot test them all. A Boolean variable has only two values. An equation with n variables therefore has only 2n2^n cases, and we can check every one of them in a truth table. This is called perfect induction.

لە جەبری قوتابخانەدا دەتوانێت بێکۆتا نرخ وەربگرێت، بۆیە ناتوانین هەموویان تاقی بکەینەوە. تەنها دوو نرخی هەیە. کەواتە یەکسانییەک بە n تەنها 2n2^n حاڵەتی هەیە و دەتوانین هەموویان لە بپشکنین. ئەمە پێی دەوترێت تەواو.

  1. Write all 2n2^n input rows, counting in binary.

    هەموو 2n2^n ڕیزی بنووسە، بە ژماردن بە .

  2. Work out the left side in one column (use helper columns for its parts).

    لای چەپ لە ستوونێکدا بدۆزەرەوە (بۆ بەشەکانی ستوونی یارمەتیدەر بەکار بهێنە).

  3. Work out the right side in another column.

    لای ڕاست لە ستوونێکی تردا بدۆزەرەوە.

  4. If the two columns agree in every row, the law is true. One row that disagrees (a counterexample) proves it false.

    ئەگەر دوو ستوونەکە لە هەموو ڕیزێکدا وەک یەک بن، یاساکە ڕاستە. یەک ڕیز کە جیاواز بێت (نموونەیەکی پێچەوانە) پیشان دەدات کە هەڵەیە.

Quick checkپشکنینی خێراIs A+BC=(A+B)CA + BC = (A + B)C a law? Try A=1A = 1, B=0B = 0, C=0C = 0.ئایا A+BC=(A+B)CA + BC = (A + B)C یاسایە؟ A=1A = 1، B=0B = 0، C=0C = 0 تاقی بکەرەوە.

Commutative lawsیاساکانی ئاڵوگۆڕ

A+B=B+AA⋅B=B⋅AA + B = B + A \qquad\qquad A \cdot B = B \cdot A

The order in which variables are ORed or ANDed makes no difference. For a gate, this means you may swap its input wires and the output stays the same.

ئەو ڕیزبەندییەی کە پێی OR یان AND دەکرێن هیچ جیاوازییەک دروست ناکات. بۆ ئەمە واتای ئەوەیە کە دەتوانیت وایەرەکانی بگۆڕیتەوە و وەک خۆی دەمێنێتەوە.

Top: an OR gate with inputs A, B giving A + B is equivalent to an OR gate with inputs B, A giving B + A. Bottom: an AND gate with inputs A, B giving A·B is equivalent to one with inputs B, A giving B·A.سەرەوە: گەیتێکی OR بە نێوخستەکانی A و B کە A + B دەدات هاوتایە لەگەڵ گەیتێکی OR بە نێوخستەکانی B و A کە B + A دەدات. خوارەوە: گەیتێکی AND بە A و B کە A·B دەدات هاوتایە لەگەڵ یەکێک بە B و A کە B·A دەدات.
Swapping the inputs does not change the output.گۆڕینەوەی ناگۆڕێت.CêIT
Truth-table proof of the commutative laws بە
ABA+BA + BB+AB + AABABBABA
000000
011100
101100
111111
Quick checkپشکنینی خێراWhich expression is equal to CA‾C\overline{A} by the commutative law?بەپێی کام یەکسانە بە CA‾C\overline{A}؟

Associative lawsیاساکانی یەکتربەستن

A+(B+C)=(A+B)+CA(BC)=(AB)CA + (B + C) = (A + B) + C \qquad\qquad A(BC) = (AB)C

When you OR (or AND) three or more variables, the grouping does not matter: the result is the same whichever pair you combine first. This is why we can simply write A+B+CA + B + C and ABCABC, and why a 3-input gate can be built from two 2-input gates.

کاتێک سێ یان زیاتر بە OR (یان بە AND) پێکەوە دەبەستیت، کۆمەڵکردنەکە گرنگ نییە: ئەنجامەکە هەمان شتە هەر جووتێک سەرەتا تێکەڵ بکەیت. بۆیە دەتوانین بە سادەیی بنووسین A+B+CA + B + C و ABCABC. هەر بۆیەشە سێ دەتوانرێت لە دوو دوو دروست بکرێت.

Top: two OR gates computing A + (B + C) (B and C first) are equivalent to two OR gates computing (A + B) + C (A and B first). Bottom: the same for AND gates, A·(B·C) and (A·B)·C.سەرەوە: دوو گەیتی OR کە A + (B + C) دەدۆزنەوە (سەرەتا B و C) هاوتان لەگەڵ دوو گەیتی OR کە (A + B) + C دەدۆزنەوە (سەرەتا A و B). خوارەوە: هەمان شت بۆ گەیتەکانی AND، A·(B·C) و (A·B)·C.
Either grouping gives the same output.هەر دوو کۆمەڵکردنەکە هەمان دەدەن.CêIT
Truth-table proof of the associative laws بە
ABCA+(B+C)A + (B + C)(A+B)+C(A + B) + CA(BC)A(BC)(AB)C(AB)C
0000000
0011100
0101100
0111100
1001100
1011100
1101100
1111111
Quick checkپشکنینی خێراA 4-input AND gate is needed, but only 2-input AND gates are in the box. Is ((AB)C)D((AB)C)D correct? چوار پێویستە، بەڵام تەنها دوو لە سندووقەکەدان. ئایا ((AB)C)D((AB)C)D ڕاستە؟

The distributive lawیاسای بەشینەوە

A(B+C)=AB+ACA(B + C) = AB + AC

ORing two variables and then ANDing the result with A gives the same as ANDing A with each variable and then ORing the two products. As circuits: “one OR, then one AND” equals “two ANDs, then one OR”.

OR کردنی دوو و پاشان AND کردنی ئەنجامەکە لەگەڵ A هەمان شتە وەک AND کردنی A لەگەڵ هەر و پاشان OR کردنی هەردوو لێکدراوەکە. وەک سووڕ: «یەک OR، پاشان یەک AND» یەکسانە بە «دوو AND، پاشان یەک OR».

Top: B and C enter an OR gate whose output enters an AND gate with A, giving A(B + C) — two gates. Bottom: A and B enter one AND gate, A and C another, and their outputs enter an OR gate, giving AB + AC — three gates.سەرەوە: B و C دەچنە ناو گەیتێکی OR و دەرخستەکەی لەگەڵ A دەچێتە ناو گەیتێکی AND و A(B + C) دەدات — دوو گەیت. خوارەوە: A و B دەچنە ناو یەک گەیتی AND، A و C ناو یەکێکی تر و دەرخستەکانیان دەچنە ناو گەیتێکی OR و AB + AC دەدەن — سێ گەیت.
Two circuits with the same truth table.دوو سووڕ بە هەمان .CêIT
Quick checkپشکنینی خێراWhich expression equals A‾(B+C‾)\overline{A}(B + \overline{C})?کام یەکسانە بە A‾(B+C‾)\overline{A}(B + \overline{C})؟

The distributive lawیاسای بەشینەوە

Proving it row by rowسەلماندن ڕیز بە ڕیز

Three variables give 23=82^3 = 8 rows. The animation feeds every row into both circuits; the table below holds the same check with all the helper columns.

سێ 23=82^3 = 8 ڕیز دەدەن. ئەنیمەیشنەکە هەموو ڕیزێک دەداتە هەردوو سووڕەکە؛ خشتەکەی خوارەوە هەمان پشکنین بە هەموو ستوونە یارمەتیدەرەکانەوە پیشان دەدات.

Animation. The circuits for A(B + C) and AB + AC are shown one above the other. The inputs A, B, C step through all eight rows from 000 to 111, the values appear on every wire, and both outputs fill a truth table row by row. They agree in every row; the last frame says the law is proved.
Animation. The circuits for A(B + C) and AB + AC are shown one above the other. The inputs A, B, C step through all eight rows from 000 to 111, the values appear on every wire, and both outputs fill a truth table row by row. They agree in every row; the last frame says the law is proved.
Checking all 8 rows proves the distributive law.پشکنینی هەر 8 ڕیزەکە دەسەلمێنێت.CêIT
Truth-table proof of the distributive law بە
ABCB+CB + CA(B+C)A(B + C)ABABACACAB+ACAB + AC
00000000
00110000
01010000
01110000
10000000
10111011
11011101
11111111
Quick checkپشکنینی خێراIn the row A=1A = 1, B=0B = 0, C=1C = 1, what are A(B+C)A(B + C) and AB+ACAB + AC?لە ڕیزی A=1A = 1، B=0B = 0، C=1C = 1دا، A(B+C)A(B + C) و AB+ACAB + AC چەندن؟

The distributive lawیاسای بەشینەوە

Factoring: the law read backwardsشیتەڵکردن: یاساکە بە پێچەوانەوە

Read from right to left, the distributive law is : a variable common to several product terms is taken outside a bracket. AB+AC=A(B+C)AB + AC = A(B + C) replaces two ANDs and one OR with one OR and one AND, so the circuit saves a gate and does the same job.

ئەگەر لە ڕاستەوە بۆ چەپ بخوێندرێتەوە، : کە لە چەند هاوبەشە دەبرێتە دەرەوەی کەوانە. AB+AC=A(B+C)AB + AC = A(B + C) لە جیاتی دوو AND و یەک OR، یەک OR و یەک AND دادەنێت، بۆیە سووڕەکە کەم دەکاتەوە و هەمان کار دەکات.

  • XY+XZ+XW=X(Y+Z+W)XY + XZ + XW = X(Y + Z + W): three ANDs and an OR become one OR and one AND.
  • AB‾+AC=A(B‾+C)A\overline{B} + AC = A(\overline{B} + C): complements factor the same way.
  • (A+B)(C+D)=AC+AD+BC+BD(A + B)(C + D) = AC + AD + BC + BD: the law used twice to expand, the opposite direction.
  • XY+XZ+XW=X(Y+Z+W)XY + XZ + XW = X(Y + Z + W): سێ AND و OR دەبنە یەک OR و یەک AND.
  • AB‾+AC=A(B‾+C)A\overline{B} + AC = A(\overline{B} + C): بە هەمان شێوە شیتەڵ دەکرێن.
  • (A+B)(C+D)=AC+AD+BC+BD(A + B)(C + D) = AC + AD + BC + BD: یاساکە دوو جار بۆ کردنەوە بەکار هاتووە، ئاڕاستە پێچەوانەکە.
Quick checkپشکنینی خێراFactor PQ+PR‾PQ + P\overline{R}.PQ+PR‾PQ + P\overline{R} شیتەڵ بکە.

The same laws in sets and in logicهەمان یاساکان لە کۆمەڵەکاندا و لە لۆجیکدا

You may have met these laws before. In set operations union and intersection obey them, and in propositional logic “or” and “and” do too. They are one algebra in three costumes:

لەوانەیە پێشتر ئەم یاسایانەت بینیبێت. لە کۆمەڵەکاندا، و پەیڕەویان دەکەن. لە لۆجیکی گوزارەیی هەمان شت بۆ «یان» و «و» ڕاستە. یەک جەبرن بە سێ جل:

One algebra, three notationsیەک جەبر، سێ شێوەی نووسین
Boolean algebraSetsPropositional logic
A+BA + B (OR)A∪BA \cup BP∨QP \lor Q
A⋅BA \cdot B (AND)A∩BA \cap BP∧QP \land Q
A‾\overline{A} (NOT)AcA^{c}¬P\lnot P
0, 1∅\varnothing, Ufalse, trueهەڵە، ڕاست
A+B=B+AA + B = B + AA∪B=B∪AA \cup B = B \cup AP∨Q≡Q∨PP \lor Q \equiv Q \lor P
A(B+C)=AB+ACA(B + C) = AB + ACA∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)P∧(Q∨R)≡(P∧Q)∨(P∧R)P \land (Q \lor R) \equiv (P \land Q) \lor (P \land R)

There is a bonus rule, the . Take any true law, swap every + with · and every 0 with 1, and you get another true law. The dual of A(B+C)=AB+ACA(B + C) = AB + AC is A+BC=(A+B)(A+C)A + BC = (A + B)(A + C) — the second distributive law above. For sets the swap is ∪ with ∩ and ∅\varnothing with U.

یاسایەکی زیادەش هەیە: . هەر یاسایەکی ڕاست وەربگرە، هەموو + بکە بە · و هەموو 0 بکە بە 1 (و بە پێچەوانەوە)، یاسایەکی ڕاستی تر وەردەگریت. دووانەی A(B+C)=AB+ACA(B + C) = AB + AC بریتییە لە A+BC=(A+B)(A+C)A + BC = (A + B)(A + C) — دووەمی سەرەوە. بۆ ئاڵوگۆڕەکە ∪ لەگەڵ ∩ و ∅\varnothing لەگەڵ Uـە.

Quick checkپشکنینی خێراWhat is the dual of A+0=AA + 0 = A?دووانەی A+0=AA + 0 = A چییە؟

Boolean Algebra 1 – The Laws of Boolean AlgebraComputer Science Lessons · Englishئینگلیزی · 604K viewsبینین · 9.1K likesلایک · Partبەشی 7:59–12:40 (ofلە 14:54)

The commutative, associative and distributive laws compared with ordinary number arithmetic, with circuits and truth tables.

، و بەراورد بە ژمێرکاریی ژمارە ئاساییەکان، لەگەڵ و .

Chapter 'Properties of base 10 numbers' (7:59-12:40): commutative, associative and both distributive laws in ∧/∨ notation, compared with ordinary numbers.

بەشی Properties of base 10 numbers (⁦7:59⁩ تا ⁦12:40⁩): ، و هەردوو بە ∧\land و ∨\lor، بەراورد بە ژمارە ئاساییەکان.

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

MistakeهەڵەWhat is rightڕاستەکەی
Treating + as arithmetic: 1+1=21 + 1 = 2 or 1010.مامەڵەکردن لەگەڵ + وەک ژمێریاری: 1+1=21 + 1 = 2 یان 1010.In Boolean algebra + is OR, so 1+1=11 + 1 = 1.لە + بریتییە لە OR، بۆیە 1+1=11 + 1 = 1.
Dropping brackets: writing A(B+C)A(B + C) as AB+CAB + C.لابردنی کەوانە: نووسینی A(B+C)A(B + C) وەک AB+CAB + C.A multiplies every term inside: AB+ACAB + AC. For A=0A = 0, C=1C = 1 the wrong form gives 1 instead of 0.A لە هەموو بڕێکی ناوەوە لێک دەدرێت: AB+ACAB + AC. بۆ A=0A = 0 و C=1C = 1 شێوە هەڵەکە لە جیاتی 0، 1 دەدات.
Ignoring the order of operations: reading A+BCA + BC as (A+B)C(A + B)C.پشتگوێخستنی : خوێندنەوەی A+BCA + BC وەک (A+B)C(A + B)C.AND before OR: A+BC=A+(BC)A + BC = A + (BC).AND پێش OR: A+BC=A+(BC)A + BC = A + (BC).
“Cancelling” as in school algebra: from A+B=A+CA + B = A + C concluding B=CB = C.«لابردن» وەک جەبری قوتابخانە: گەیشتن بە B=CB = C لە یەکسانیی A+B=A+CA + B = A + C.Not allowed: with A=1A = 1 both sides are 1 whatever B and C are.ڕێگەپێدراو نییە: بە A=1A = 1 هەردوو لا 1ـن، B و C هەرچییەک بن.
Counting A and A‾\overline{A} as one literal.ژماردنی A و A‾\overline{A} وەک یەک .They are two different literals of the same variable.دوو جیاوازن لە هەمان .

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

ExerciseڕاهێنانName the partsبەشەکان ناو بنێ

For each expression, say whether it is a sum term or a product term and list its literals: (a) A‾BC‾\overline{A}B\overline{C} (b) A+B‾+DA + \overline{B} + D (c) X‾Y\overline{X}Y.

بۆ هەر ، بڵێ یان و بنووسە: (أ) A‾BC‾\overline{A}B\overline{C} (ب) A+B‾+DA + \overline{B} + D (ج) X‾Y\overline{X}Y.

Show answerوەڵامەکە پیشان بدە
  • (a) product term; literals A‾\overline{A}, B, C‾\overline{C}. It is 1 only for A=0A = 0, B=1B = 1, C=0C = 0.
  • (b) sum term; literals A, B‾\overline{B}, D. It is 0 only for A=0A = 0, B=1B = 1, D=0D = 0.
  • (c) product term; literals X‾\overline{X} and Y. It is 1 only for X=0X = 0, Y=1Y = 1.
  • (أ) ؛ : A‾\overline{A}، B، C‾\overline{C}. تەنها بۆ A=0A = 0، B=1B = 1، C=0C = 0 دەبێتە 1.
  • (ب) ؛ : A، B‾\overline{B}، D. تەنها بۆ A=0A = 0، B=1B = 1، D=0D = 0 دەبێتە 0.
  • (ج) ؛ : X‾\overline{X} و Y. تەنها بۆ X=0X = 0، Y=1Y = 1 دەبێتە 1.
ExerciseڕاهێنانEvaluateنرخ بدۆزەرەوە

Find X=A‾B+CX = \overline{A}B + C for (a) A=1A = 1, B=1B = 1, C=0C = 0 and (b) A=0A = 0, B=1B = 1, C=0C = 0.

X=A‾B+CX = \overline{A}B + C بدۆزەرەوە بۆ (أ) A=1A = 1، B=1B = 1، C=0C = 0 و (ب) A=0A = 0، B=1B = 1، C=0C = 0.

Hintئاماژە

Bars first, then AND, then OR.

سەرەتا هێڵەکان، پاشان AND، پاشان OR.

Show answerوەڵامەکە پیشان بدە
(a)  X=1‾⋅1+0=0⋅1+0=0(b)  X=0‾⋅1+0=1⋅1+0=1\begin{aligned} (a)\; X &= \overline{1}\cdot 1 + 0 = 0 \cdot 1 + 0 = 0 \\ (b)\; X &= \overline{0}\cdot 1 + 0 = 1 \cdot 1 + 0 = 1 \end{aligned}
ExerciseڕاهێنانProve itبیسەلمێنە

Prove the associative law for AND, A(BC)=(AB)CA(BC) = (AB)C, with a truth table.

بۆ AND، A(BC)=(AB)CA(BC) = (AB)C، بە بسەلمێنە.

Show answerوەڵامەکە پیشان بدە
ABCBCBCA(BC)A(BC)ABAB(AB)C(AB)C
0000000
0010000
0100000
0111000
1000000
1010000
1100010
1111111

The columns A(BC)A(BC) and (AB)C(AB)C are equal in all 8 rows (1 only in row 111), so the law holds.

ستوونەکانی A(BC)A(BC) و (AB)C(AB)C لە هەر 8 ڕیزەکەدا یەکسانن (تەنها لە ڕیزی ⁦111⁩ـدا 1ـن)، بۆیە یاساکە ڕاستە.

ExerciseڕاهێنانFactor and count gatesشیتەڵکردن و ژماردنی گەیتەکان

Factor (a) AB+AC+ADAB + AC + AD and (b) XYZ‾+XYWXY\overline{Z} + XYW. How many 2-input gates does (a) need before and after?

(أ) AB+AC+ADAB + AC + AD و (ب) XYZ‾+XYWXY\overline{Z} + XYW شیتەڵ بکە. (أ) پێش و دوای ئەوە چەند دوو پێویستە؟

Show answerوەڵامەکە پیشان بدە
  • (a) A(B+C+D)A(B + C + D). Before: three ANDs and two ORs (five gates). After: two ORs and one AND (three gates).
  • (b) XY(Z‾+W)XY(\overline{Z} + W): XY is common to both product terms.
  • (أ) A(B+C+D)A(B + C + D). پێش: سێ AND و دوو OR (پێنج ). دوای: دوو OR و یەک AND (سێ ).
  • (ب) XY(Z‾+W)XY(\overline{Z} + W): XY لە هەردوو هاوبەشە.
ExerciseڕاهێنانExpandبیکەرەوە

Use the distributive law to expand (A+B)(C+D)(A + B)(C + D), then check your answer for A=1A = 1, B=0B = 0, C=0C = 0, D=1D = 1.

بەکار بهێنە بۆ کردنەوەی (A+B)(C+D)(A + B)(C + D)، پاشان وەڵامەکەت بۆ A=1A = 1، B=0B = 0، C=0C = 0، D=1D = 1 بپشکنە.

Show answerوەڵامەکە پیشان بدە
(A+B)(C+D)=A(C+D)+B(C+D)=AC+AD+BC+BD(A + B)(C + D) = A(C + D) + B(C + D) = AC + AD + BC + BD

Check: left (1+0)(0+1)=1(1 + 0)(0 + 1) = 1; right 0+1+0+0=10 + 1 + 0 + 0 = 1. ✓

پشکنین: لای چەپ (1+0)(0+1)=1(1 + 0)(0 + 1) = 1؛ لای ڕاست 0+1+0+0=10 + 1 + 0 + 0 = 1. ✓

ExerciseڕاهێنانLaw or not?یاسایە یان نا؟

Decide whether each is a law. If not, give a counterexample. (a) A+BC=(A+B)(A+C)A + BC = (A + B)(A + C) (b) A(B+C)=AB+CA(B + C) = AB + C.

بڕیار بدە ئایا هەر یەکێکیان یاسایە. ئەگەر نا، نموونەیەکی پێچەوانە بدە. (أ) A+BC=(A+B)(A+C)A + BC = (A + B)(A + C) (ب) A(B+C)=AB+CA(B + C) = AB + C.

Show answerوەڵامەکە پیشان بدە
  • (a) A law: the second distributive law (rule 12). It holds in all 8 rows.
  • (b) Not a law: A=0A = 0, B=0B = 0, C=1C = 1 gives 0 on the left and 1 on the right.
  • (أ) یاسایە: دووەم (یاسای ⁦12⁩). لە هەر 8 ڕیزەکەدا ڕاستە.
  • (ب) یاسا نییە: A=0A = 0، B=0B = 0، C=1C = 1 لای چەپ 0 و لای ڕاست 1 دەدات.

Summaryپوختە

  • A literal is a variable or its complement; a sum term ORs literals, a product term ANDs them.
  • + is OR and · is AND, so 1+1=11 + 1 = 1. Order: NOT, then AND, then OR.
  • Commutative: A+B=B+AA + B = B + A, AB=BAAB = BA.
  • Associative: A+(B+C)=(A+B)+CA + (B + C) = (A + B) + C, A(BC)=(AB)CA(BC) = (AB)C.
  • Distributive: A(B+C)=AB+ACA(B + C) = AB + AC; read backwards it is factoring.
  • Any law can be proved by checking all 2n2^n rows of a truth table.
  • یان ؛ OR دەکات و ANDـیان دەکات.
  • + بریتییە لە OR و · لە AND، بۆیە 1+1=11 + 1 = 1. ڕیزبەندی: NOT، پاشان AND، پاشان OR.
  • : A+B=B+AA + B = B + A، AB=BAAB = BA.
  • : A+(B+C)=(A+B)+CA + (B + C) = (A + B) + C، A(BC)=(AB)CA(BC) = (AB)C.
  • : A(B+C)=AB+ACA(B + C) = AB + AC؛ بە پێچەوانەوە خوێندنەوەی .
  • هەر یاسایەک دەتوانرێت بە پشکنینی هەموو 2n2^n ڕیزی بسەلمێنرێت.
Review questionsپرسیارەکانی پێداچوونەوە
What is 1+11 + 1 in Boolean algebra?لە جەبری بوولدا 1+11 + 1 چەندە؟

1, because + means OR.

1، چونکە + واتە OR.

Which law lets you build a 3-input OR from two 2-input ORs?کام یاسا ڕێگە دەدات ORـی سێ نێوخستە لە دوو ORـی دوو نێوخستە دروست بکەیت؟

The associative law.

.

What do you get when you factor AB+ACAB + AC?کاتێک AB+ACAB + AC شیتەڵ دەکەیت چی وەردەگریت؟

A(B+C)A(B + C), which needs one gate fewer.

A(B+C)A(B + C) کە کەمتری پێویستە.

Videoڤیدیۆ

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

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

boolean algebra بوولیان ئەلجێبرا بەشی یەکەمAram Rafeq · Kurdish (Sorani)کوردی (سۆرانی) · 6.4K viewsبینین · 180 likesلایک · Partبەشی 0:00–3:30 (ofلە 16:59)

Kurdish (Sorani): commutative, associative and distributive laws with gate drawings, the 12 rules in the lesson's order, then De Morgan's theorems.

بە کوردیی سۆرانی: ، و بە وێنەی ، دوازدە یاساکە بە ڕیزبەندیی وانەکە، پاشان .

0:00-3:30: commutative, associative and distributive laws with gates.

لە ⁦0:00⁩ تا ⁦3:30⁩: ، و بە .

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

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

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

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

The 12 Rules of Boolean Algebraدوازدە یاساکەی جەبری بوول

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

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