Chapterبەش 3 · Lectureوانە 3.2
Binary Multiplication and Divisionلێکدانی دووانی و دابەشکردنی دووانی
Multiply binary numbers by shifting and adding, and divide them by long division where every step is a simple yes-or-no comparison. Includes the midterm division worked bit by bit.
لێکدانی ژمارە بە جووڵاندن و کۆکردنەوە و دابەشکردنیان بە دابەشکردنی درێژ کە هەموو هەنگاوێکی بەراوردێکی سادەی بەڵێ یان نەخێرە. دابەشکردنەکەی تاقیکردنەوەی نیوەی وەرز بە چارەسەر کراوە.
What you will learnچی فێر دەبیت
- State the four binary multiplication rules.
- Multiply binary numbers with the shift-and-add layout.
- Divide binary numbers by long division and give quotient and remainder.
- Check a multiplication or division in decimal and with quotient × divisor + remainder.
- چوار یاساکەی بڵێیت.
- ژمارەی بە شێوەی جووڵاندن و کۆکردنەوە لێک بدەیت.
- ژمارەی بە دابەشکردنی درێژ دابەش بکەیت و ئەنجامی دابەشکردن و پاشماوە بدۆزیتەوە.
- لێکدان یان دابەشکردنێک بە و بە ئەنجامی دابەشکردن × دابەشکەر + پاشماوە بپشکنیت.
Just like decimal, only easierڕێک وەک دەیی، بەڵام ئاسانتر
Binary multiplication and division follow the same procedures you learned for decimal numbers at school: long multiplication and long division. They are even simpler, because only 0s and 1s are involved: the whole multiplication table has four lines.
و هەمان ئەو ڕێگایانە پەیڕەو دەکەن کە لە قوتابخانە بۆ ژمارە فێری بوویت: لێکدانی درێژ و دابەشکردنی درێژ. تەنانەت سادەترن، چونکە تەنها 0 و 1 بەکاردێن: هەموو خشتەی لێکدان چوار دێڕە.
You need binary addition and subtraction here: multiplication is a series of additions, and division is a series of subtractions.
لێرەدا کۆکردنەوەی دووانی و لێدەرکردنی دووانیـت پێویستە: لێکدان زنجیرەیەک کۆکردنەوەیە و دابەشکردن زنجیرەیەک لێدەرکردن.
The four multiplication rulesچوار یاساکەی لێکدان
There are only four rules of binary multiplication. The product is 1 only when both bits are 1.
تەنها چوار یاسای هەیە. ئەنجام تەنها کاتێک 1ـە کە هەردوو 1 بن.
| Caseحاڵەت | Productئەنجام | |
|---|---|---|
| 1 | 0 | |
| 2 | 0 | |
| 3 | 0 | |
| 4 | 1 |
Shifting left doubles a numberجووڵاندن بۆ چەپ ژمارە دوو هێندە دەکات
In decimal, writing a 0 on the right multiplies a number by 10 (). In binary, writing a 0 on the right — moving every bit one place to the left — multiplies the number by 2, because every place is worth twice the place to its right.
لە نووسینی 0ـێک لە لای ڕاست ژمارەکە 10 هێندە دەکات (). لە نووسینی 0ـێک لە لای ڕاست، واتە جووڵاندنی هەموو یەک خانە بەرەو چەپ، ژمارەکە 2 هێندە دەکات، چونکە هەر خانەیەک دوو هێندەی خانەی لای ڕاستی بەهای هەیە.
This is the secret of binary multiplication: multiplying by 1101 means adding the number shifted by 0, 2 and 3 places (). Shifting the other way, to the right, halves a number and drops the last bit, which is the remainder: becomes , remainder 1. In hardware, a shift register does both.
ئەمە نهێنیی : لێکدان لە 1101 واتە کۆکردنەوەی ژمارەکە کە 0، 2 و 3 خانە جووڵێنراوە (). جووڵاندن بە ئاڕاستەی پێچەوانە، بەرەو ڕاست، ژمارەکە دەکاتە نیوە و دوایین لادەبات، کە پاشماوەکەیە: دەبێتە و پاشماوەکەی 1ـە. لە تۆمارگەی جووڵاندن هەردووکیان دەکات.
Long multiplication: shift and addلێکدانی درێژ: جووڵاندن و کۆکردنەوە
Write the two numbers under each other. Then take the bits of the bottom number from the right, one at a time:
دوو ژمارەکە لە ژێر یەکتر بنووسە. پاشان ژمارەی خوارەوە لە لای ڕاستەوە یەک بە یەک وەربگرە:
- If the bit is 1, write a copy of the top number.
- If the bit is 0, write a row of 0s (or skip the row).
- Each new row starts one place further left than the row above it.
- Finally add all the rows.
- ئەگەر 1 بوو، کۆپییەکی ژمارەی سەرەوە بنووسە.
- ئەگەر 0 بوو، ڕیزێک سفر بنووسە (یان ڕیزەکە بپەڕێنە).
- هەر ڕیزێکی نوێ یەک خانە زیاتر بەرەو چەپ لە ڕیزی سەرەوەی دەست پێدەکات.
- لە کۆتاییدا هەموو ڕیزەکان کۆ بکەرەوە.
. In decimal: , and .
. بە : و .
The rows are the top number, shifted: 1011 (), nothing (), 101100 () and 1011000 (). So the product is .
ڕیزەکان ژمارەی سەرەوەن کە جووڵێنراون: 1011 ()، هیچ ()، 101100 () و 1011000 (). کەواتە ئەنجامەکە ـە.
Long multiplication in binary: shifted copies of the top number, then adding the rows, including columns with three or four 1s.
لێکدانی درێژ بە : کۆپیی جووڵێنراوی ژمارەی سەرەوە، پاشان کۆکردنەوەی دێڕەکان، تەنانەت ئەو ستوونانەی سێ یان چوار 1ـیان تێدایە.
Add the rows two at a timeڕیزەکان دوو دوو کۆ بکەرەوە
When many rows are added at once, a column can hold three or four 1s: , a carry that jumps two columns. That is easy to get wrong. The safe way is a running total: add the first two rows, then add the next row to that result, and so on.
کاتێک چەندین ڕیز پێکەوە کۆ دەکرێنەوە، ستوونێک دەتوانێت سێ یان چوار 1ـی تێدا بێت: ، کە دوو ستوون باز دەدات. ئەمە ئاسان هەڵەی تێدا دەکرێت. ڕێگای سەلامەت کۆی بەردەوامە: دوو ڕیزی یەکەم کۆ بکەرەوە، پاشان ڕیزی دواتر بخەرە سەر ئەو ئەنجامە و بەم شێوەیە.
First row + third row (the second row is 0):
ڕیزی یەکەم + ڕیزی سێیەم (ڕیزی دووەم 0ـە):
Running total + fourth row:
کۆی بەردەوام + ڕیزی چوارەم:
The answer has 8 bits. In general, an n-bit number times an m-bit number needs at most bits, which is why processors keep a double-width result for multiplication.
وەڵامەکە 8 هەیە. بە گشتی، ژمارەیەکی n لێکدراو لە ژمارەیەکی m زۆرترین پێویستە، بۆیە بۆ ئەنجامی لێکدان شوێنی دوو هێندە ئامادە دەکات.
Long division: compare, write, subtract, bring downدابەشکردنی درێژ: بەراورد بکە، بنووسە، لێ دەربکە، دابەزێنە
Binary division follows the same procedure as decimal long division. It is easier in one important way: in decimal you must guess how many times the divisor fits (0 to 9). In binary the answer is only 0 or 1, so you just compare: does the divisor fit, yes or no?
هەمان ڕێگای دابەشکردنی درێژی پەیڕەو دەکات. لە یەک ڕووی گرنگەوە ئاسانترە: لە دەبێت مەزەندە بکەیت دابەشکەر چەند جار جێی دەبێتەوە (0 تا 9). لە وەڵامەکە تەنها 0 یان 1ـە، بۆیە تەنها بەراورد دەکەیت: دابەشکەر جێی دەبێتەوە، بەڵێ یان نەخێر؟
- Bring downدابەزاندن
Take the next bit of the dividend and add it to the right of the current remainder (start with the first bit).
دواتری دابەشکراو وەربگرە و بیخەرە لای ڕاستی پاشماوەی ئێستا (بە یەکەم دەست پێبکە).
- Compareبەراورد
Is this number at least as big as the divisor?
ئایا ئەم ژمارەیە لانیکەم هێندەی دابەشکەر گەورەیە؟
- Writeنووسین
Yes: write 1 in the quotient. No: write 0 in the quotient.
بەڵێ: لە ئەنجامی دابەشکردندا 1 بنووسە. نەخێر: 0 بنووسە.
- Subtractلێدەرکردن
If you wrote 1, subtract the divisor; the result is the new remainder. Repeat until every bit has been brought down.
ئەگەر 1ـت نووسی، دابەشکەر لێ دەربکە؛ ئەنجامەکە پاشماوەی نوێیە. دووبارەی بکەرەوە تا هەموو دادەبەزێنرێن.
Example: (). Decimal values are in brackets, so you can compare quickly:
نموونە: (). بەها لە ناو کەوانەدان، تا بە خێرایی بەراورد بکەیت:
| Stepهەنگاو | Bit brought down دابەزێنراو | Compareبەراورد | Quotient bit ئەنجام | Subtractلێدەرکردن |
|---|---|---|---|---|
| 1 | — | |||
| 2 | — | |||
| 3 | ||||
| 4 | ||||
| 5 |
The quotient bits read and the remainder is 1. Check: .
ئەنجام دەخوێنرێنەوە و پاشماوەکە 1ـە. پشکنین: .
One complete binary long division worked step by step: compare, write 1 or 0, subtract, bring down.
نموونەیەکی تەواوی دابەشکردنی درێژی ، هەنگاو بە هەنگاو: بەراورد بکە، 1 یان 0 بنووسە، لێ دەربکە، دابەزێنە.
Exam question: a long binary divisionپرسیاری تاقیکردنەوە: دابەشکردنێکی درێژی دووانی
This question comes from the course's theory midterm. It is a good test because the divisor fits only three times, so most steps write a 0.
ئەم پرسیارە لە تاقیکردنەوەی تیۆریی نیوەی وەرزی کۆرسەکەوە هاتووە. تاقیکردنەوەیەکی باشە چونکە دابەشکەر تەنها سێ جار جێی دەبێتەوە، بۆیە زۆربەی هەنگاوەکان 0 دەنووسن.
Divide the binary numbers . Give the quotient and the remainder, then check your answer in decimal.
ژمارە دابەش بکە: . ئەنجامی دابەشکردن و پاشماوەکە بنووسە، پاشان وەڵامەکەت بە بپشکنە.
Hintئاماژە
Bring down one bit at a time. Writing the decimal value beside each partial number (, ) makes every comparison easy.
هەر جارەی یەک دابەزێنە. نووسینی بەهای لە تەنیشت هەر ژمارەیەکی بەشەکی (، ) هەموو بەراوردێک ئاسان دەکات.
Show answerوەڵامەکە پیشان بدە
Watch the long division bit by bit. Each new bit is brought down; when the number reaches 1011 or more, a 1 is written and 1011 is subtracted.
دابەشکردنە درێژەکە بە ببینە. هەر نوێ دادەبەزێنرێت؛ کاتێک ژمارەکە دەگاتە 1011 یان زیاتر، 1 دەنووسرێت و 1011 لێ دەردەکرێت.

| Stepهەنگاو | Bit brought down دابەزێنراو | Compareبەراورد | Quotient bit ئەنجام | Subtractلێدەرکردن |
|---|---|---|---|---|
| 1 | — | |||
| 2 | — | |||
| 3 | — | |||
| 4 | ||||
| 5 | — | |||
| 6 | — | |||
| 7 | — | |||
| 8 | ||||
| 9 |
The quotient bits 000100011 lose their leading zeros: quotient 100011, remainder 10.
سفرەکانی پێشەوەی ئەنجامی 000100011 لادەبرێن: ئەنجامی دابەشکردن 100011 و پاشماوە 10.
Decimal check. A calculator gives : the whole part 35 is the quotient.
پشکنین بە . دەدات: بەشی تەواوی 35 ئەنجامی دابەشکردنەکەیە.
Checking a divisionپشکنینی دابەشکردن
Every division can be checked with multiplication: quotient × divisor + remainder = dividend. The remainder must also be smaller than the divisor.
هەموو دابەشکردنێک بە لێکدان دەپشکنرێت: ئەنجامی دابەشکردن × دابەشکەر + پاشماوە = دابەشکراو. هەروەها دەبێت پاشماوەکە لە دابەشکەر بچووکتر بێت.
For the exam question: .
بۆ پرسیارەکەی تاقیکردنەوە: .
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What goes wrongچی تێکدەچێت | Fixچارەسەر |
|---|---|---|
| Forgetting to shift a rowلەبیرکردنی جووڵاندنی ڕیزێک | Bits of different weights are added کێشی جیاواز کۆ دەکرێنەوە | Each row starts one place further leftهەر ڕیزێک یەک خانە زیاتر بەرەو چەپ دەست پێدەکات |
| Skipping a 0 row and its shiftپەڕاندنی ڕیزی 0 و جووڵاندنەکەی | The next rows sit one place too far rightڕیزەکانی دواتر یەک خانە زیاتر بەرەو ڕاست دادەنرێن | Skip the row, never the shiftڕیزەکە بپەڕێنە، هەرگیز جووڵاندنەکە نا |
| Adding four rows at onceکۆکردنەوەی چوار ڕیز پێکەوە | Lost carries () ون دەبن () | Use a running totalکۆی بەردەوام بەکاربهێنە |
| Not writing the 0s in a divisionنەنووسینی سفرەکان لە دابەشکردندا | The quotient loses placesئەنجامی دابەشکردن خانەی لێ ون دەبێت | One quotient bit for every bit brought downبۆ هەر کە دادەبەزێنرێت یەک ئەنجام |
| A remainder ≥ the divisorپاشماوەیەک ≥ دابەشکەر | The divisor still fitsدابەشکەر هێشتا جێی دەبێتەوە | Check: remainder < divisorپشکنین: پاشماوە < دابەشکەر |
Exercisesڕاهێنانەکان
The lecture's exercises. Work on paper first; the answers show every row and every step.
ڕاهێنانەکانی وانەکە. سەرەتا لەسەر کاغەز کار بکە؛ وەڵامەکان هەموو ڕیز و هەنگاوێک پیشان دەدەن.
Multiply: (a) (b) (c) (d) (e)
لێکی بدە: (أ) (ب) (ج) (د) (هـ)
Hintئاماژە
A 1 in the bottom number copies the top number, a 0 gives zeros; shift each row one place left.
1 لە ژمارەی خوارەوەدا ژمارەی سەرەوە کۆپی دەکات و 0 سفر دەدات؛ هەر ڕیزێک یەک خانە بەرەو چەپ بجووڵێنە.
Show answerوەڵامەکە پیشان بدە
In (e) the zeros on the left of 001100 change nothing (it is ), and its two right-hand 0s give two rows of zeros.
لە (هـ)دا سفرەکانی لای چەپی 001100 هیچ ناگۆڕن (ـە) و دوو سفرەکەی لای ڕاستی دوو ڕیز سفر دەدەن.
Divide: (a) (b) (c)
دابەش بکە: (أ) (ب) (ج)
Show answerوەڵامەکە پیشان بدە
| Stepهەنگاو | Bit brought down دابەزێنراو | Compareبەراورد | Quotient bit ئەنجام | Subtractلێدەرکردن |
|---|---|---|---|---|
| 1 | — | |||
| 2 | ||||
| 3 | — |
Quotient , remainder ().
ئەنجامی دابەشکردن ، پاشماوە ().
| Stepهەنگاو | Bit brought down دابەزێنراو | Compareبەراورد | Quotient bit ئەنجام | Subtractلێدەرکردن |
|---|---|---|---|---|
| 1 | — | |||
| 2 | ||||
| 3 |
Quotient , remainder ().
ئەنجامی دابەشکردن ، پاشماوە ().
| Stepهەنگاو | Bit brought down دابەزێنراو | Compareبەراورد | Quotient bit ئەنجام | Subtractلێدەرکردن |
|---|---|---|---|---|
| 1 | — | |||
| 2 | — | |||
| 3 | ||||
| 4 |
Quotient , remainder ().
ئەنجامی دابەشکردن ، پاشماوە ().
All three divide exactly (remainder 0). (c) is also a shift: dividing by moves the bits two places right.
هەر سێکیان بە تەواوی دابەش دەبن (پاشماوە 0). (ج) هەروەها جووڵاندنیشە: دابەشکردن بەسەر دا دوو خانە بەرەو ڕاست دەجووڵێنێت.
Summaryپوختە
- Multiplication rules: and (the AND table).
- Long multiplication = shift and add: a copy of the top number for every 1, each row one place further left.
- Shifting left doubles a number; shifting right halves it.
- Long division: bring down, compare, write 0 or 1, subtract when it fits.
- Check: quotient × divisor + remainder = dividend, and remainder < divisor.
- یاساکانی لێکدان: و (خشتەی AND).
- لێکدانی درێژ = جووڵاندن و کۆکردنەوە: کۆپییەکی ژمارەی سەرەوە بۆ هەر 1ـێک، هەر ڕیزێک یەک خانە زیاتر بەرەو چەپ.
- جووڵاندن بەرەو چەپ ژمارە دوو هێندە دەکات؛ بەرەو ڕاست دەیکاتە نیوە.
- دابەشکردنی درێژ: دابەزێنە، بەراورد بکە، 0 یان 1 بنووسە، کاتێک جێی بوویەوە لێی دەربکە.
- پشکنین: ئەنجامی دابەشکردن × دابەشکەر + پاشماوە = دابەشکراو و پاشماوە < دابەشکەر.
Why does binary long division never need guessing?بۆچی دابەشکردنی درێژی دووانی هەرگیز مەزەندەی ناوێت؟
Because each quotient digit can only be 0 or 1: you only check whether the divisor fits.
چونکە هەر ئەنجام تەنها دەتوانێت 0 یان 1 بێت: تەنها دەپشکنیت دابەشکەر جێی دەبێتەوە یان نا.
What is ? چەندە؟
100011 remainder 10 ( remainder 2).
100011 و پاشماوە 10 ( و پاشماوە 2).
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
Kurdish lecture: binary addition with carries, subtraction with borrows, then multiplication and long division.
وانەیەکی کوردی: لەگەڵ ، لەگەڵ ، پاشان لێکدان و دابەشکردنی درێژ.
Kurdish. From about 7:55: multiplication rules, 1011 × 1101 = 10001111 and long division 101010 ÷ 110 = 111 (checked frames).
بە کوردی. لە نزیکەی 7:55ـەوە: یاساکانی لێکدان، و دابەشکردنی درێژی (لە وێنەکانی ڤیدیۆکەوە پشکنراوە).
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
1's and 2's Complementsتەواوکەری یەک و تەواوکەری دوو
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.