Chapterبەش 2 · Lectureوانە 2.6

How a Computer Runs a Programکۆمپیوتەر چۆن بەرنامەیەک جێبەجێ دەکات

Follow the owner's 5+2=75 + 2 = 7 program through a tiny computer: instructions and data in RAM, the registers PC, MAR, MDR, IR and R1–R3, the ALU and the three buses. Then name the steps — the fetch–decode–execute cycle — and see how a line of code becomes machine instructions.

5+2=75 + 2 = 7 بە ناو بچووکدا بگرەوە: و لە ، PC، MAR، MDR، IR و ⁦R1⁩ تا ⁦R3⁩، و سێ . پاشان ناوی هەنگاوەکان — — دەناسیت و دەبینیت چۆن دێڕێک کۆد دەبێت بە ئامێر.

22 min read22 خولەک خوێندنەوە · 21 stepsهەنگاو

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

  • Explain that a program is a list of instructions held in RAM, and how it gets there.
  • Name the parts that run a program: control unit, ALU, registers, RAM and buses.
  • Trace LOAD, add and STORE instructions step by step and write a trace table.
  • Describe the fetch–decode–execute (–store) cycle and the jobs of the PC and the IR.
  • Correct two common myths: «STORE runs the program» and «users type instructions into RAM».
  • ڕوونی بکەیتەوە کە لیستێکی لە و چۆن دەگاتە ئەوێ.
  • ئەو بەشانە ناو ببەیت کە جێبەجێ دەکەن: ، ، ، و .
  • LOAD، کۆکردنەوە و STORE هەنگاو بە هەنگاو بگریتەوە و بنووسیت.
  • (هێنان، شیکردنەوە، جێبەجێکردن، هەڵگرتن) و کاری PC و IR وەسف بکەیت.
  • دوو بیروڕای هەڵەی باو ڕاست بکەیتەوە: «STORE کارا دەکات» و « دەنووسێتە ناو ».

A program is a list of instructionsبەرنامە تەنها لیستێکی ڕێکارنامەیە

Every app you use — a calculator, a game, a chat app — is a program. A program is only a list of instructions: small, exact steps that the computer carries out one after another. People write programs in a programming language, and a programming language is itself built from a set of instructions.

هەر کە بەکاری دەهێنیت — ، یاری یان چات — . تەنها لیستێکی ، واتە هەنگاوی بچووک و ورد کە یەک لە دوای یەک جێبەجێیان دەکات. مرۆڤ بە دەنووسێت؛ خۆیشی لە کۆمەڵێک پێکهاتووە.

This lesson opens the box and follows one tiny program, step by step, as it runs inside the CPU and RAM. The idea is the same in every computer and every programming language.

ئەم وانەیە سندووقەکە دەکاتەوە و زۆر بچووک هەنگاو بە هەنگاو دەگرێتەوە، لە کاتێکدا لەناو و جێبەجێ دەبێت. ئەم بیرۆکەیە لە هەموو و هەموو هەمان شتە.

A recipe in the kitchenڕێچکەی چێشت لە چێشتخانەدا

A recipe for dolma is a list of steps: wash the vine leaves, fill them, roll them, cook them. You follow the lines in order, one at a time. A computer follows a program in the same way.

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

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

A cook understands the recipe and can fix a mistake in it. The CPU understands nothing: it carries out each instruction exactly as written, even a wrong one, and it does billions of them every second.

چێشتلێنەر لە ڕێچکەکە تێدەگات و دەتوانێت هەڵەیەکی تێدا چاک بکاتەوە. لە هیچ تێناگات: هەر وەک خۆی جێبەجێ دەکات، تەنانەت ئەگەر هەڵەش بێت. هەروەها لە هەر چرکەیەکدا ملیارەها جێبەجێ دەکات.

Quick checkپشکنینی خێراAt its simplest, what is a program?بە سادەترین شێوە، چییە؟

A program is a list of instructionsبەرنامە تەنها لیستێکی ڕێکارنامەیە

Example: which number is larger?نموونە: کام ژمارە گەورەترە؟

Here is a small program written as plain steps (pseudocode). It reads two numbers and shows the larger one.

ئەمە بچووکە کە بە هەنگاوی سادە نووسراوە (). دوو ژمارە وەردەگرێت و گەورەترەکەیان پیشان دەدات.

Find the larger of two numbersدۆزینەوەی ژمارە گەورەترەکەTEXT
1. Input number1
2. Input number2
3. Compare the two numbers
4. If number1 > number2, output number1
5. Otherwise, output number2
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1-2

Two input steps: the user types two numbers.

دوو هەنگاوی : دوو ژمارە دەنووسێت.

Lineدێڕی 3-5

One comparison and two possible outputs.

یەک بەراوردکردن و دوو گونجاو.

The course slide also shows the same steps in the C language. Here they are with the slide's mistakes fixed. You do not need to learn C here: notice only that every line is still one small instruction.

سلایدی وانەکە هەمان هەنگاوەکانی بە زمانی C نووسیوە. لێرەدا هەڵەکانی سلایدەکە چاک کراون. پێویست ناکات لێرەدا C فێر ببیت: تەنها تێبینی بکە کە هەر دێڕێک هێشتا بچووکە.

The same steps in C (only to look at)هەمان هەنگاوەکان بە C (تەنها بۆ سەیرکردن)TEXT
#include <stdio.h>

int main(void) {
    int number1, number2;
    scanf("%d", &number1);
    scanf("%d", &number2);
    if (number1 > number2)
        printf("%d is greater\n", number1);
    else
        printf("%d is greater\n", number2);
    return 0;
}
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 4

The two numbers must be declared before they are used.

دەبێت دوو ژمارەکە پێش بەکارهێنان ڕابگەیەنرێن.

Lineدێڕی 5-6

Input: read two whole numbers.

: دوو وەردەگرێت.

Lineدێڕی 7-10

Compare, then output the larger one.

بەراورد دەکات، پاشان گەورەترەکە دەردەخات.

Quick checkپشکنینی خێراThe fixed program gets 5 and then 5. What does it print? 5 و پاشان 5 وەردەگرێت. چی دەنووسێت؟

A tiny computer to watchکۆمپیوتەرێکی بچووک بۆ سەیرکردن

To watch a program run, we use a tiny model computer. It comes from an instructional video (eChalk, «How does a computer run a program?») that the course paper on this topic explains; here it is redrawn. It has only the parts that matter:

بۆ ئەوەی ببینین چۆن جێبەجێ دەبێت، نموونەیی بچووک بەکار دەهێنین. ئەم نموونەیە لە ڤیدیۆیەکی فێرکارییەوە هاتووە (eChalk، «⁦How does a computer run a program?⁩») کە نووسراوی وانەکە لەسەر ئەم بابەتە ڕوونی دەکاتەوە؛ لێرەدا دووبارە کێشراوەتەوە. تەنها ئەو بەشانەی تێدایە کە گرنگن:

Left: the CPU with the control unit, the ALU and seven registers: PC, MAR, MDR and IR (special registers) and R1, R2 and R3 (general-purpose registers). Middle: three buses, the address bus, the data bus and the control bus. Right: RAM in two parts: Instructions at addresses 0 to 3 (LOAD A1 → R1, LOAD A2 → R2, R1 + R2 → R3, STORE R3 → A3) and Data at A1 to A5, where A1 holds 5 and A2 holds 2.لای چەپ: CPU لەگەڵ یەکەی جڵەوکردن، یەکەی ژیربێژیی بیرکارییانە و حەوت تۆمارگە: PC، MAR، MDR و IR (تۆمارگەکانی تایبەت) و R1، R2 و R3 (تۆمارگە گشتییەکان). ناوەڕاست: سێ تێپەڕگە: تێپەڕگەی ناونیشان، تێپەڕگەی دراوە و تێپەڕگەی جڵەوکردن. لای ڕاست: RAM بە دوو بەشەوە: ڕێکارنامەکان لە ناونیشانی 0 تا 3 و دراوە لە A1 تا A5، کە A1 ژمارە 5 و A2 ژمارە 2 هەڵدەگرن.
The model computer: CPU, buses and RAM. Redrawn for CêIT from the idea of the eChalk video and the course slide «CPU & memory». نموونەیی: ، و . بۆ CêIT لە بیرۆکەی ڤیدیۆی eChalk و سلایدی «⁦CPU & Memory⁩»ـی وانەکەوە دووبارە کێشراوەتەوە.CêIT
  • CPU — the control unit reads each instruction and directs the other parts; the ALU does the calculations; the registers hold the numbers it is working on right now.
  • RAM — holds the program's instructions and its data (RAM: the working memory).
  • Buses — the wires between them: the address bus says where, the data bus carries what, the control bus says read or write.
  • — یەکەی جڵەوکردن هەر دەخوێنێتەوە و بەشەکانی تر ئاراستە دەکات؛ یەکەی ژیربێژیی بیرکارییانە حیسابەکان دەکات؛ ئەو ژمارانە هەڵدەگرن کە ئێستا کاریان لەسەر دەکرێت.
  • — و هەڵدەگرێت (RAM: بیرگەی کار).
  • — ئەو تەلانەی نێوانیان: دەڵێت لە کوێ، چی دەگوازێتەوە، دەڵێت بخوێنەوە یان بنووسە.
The shopkeeper and his ledgerدووکاندار و دەفتەرەکەی

Picture a shopkeeper in the bazaar doing the day's accounts. His big ledger, with numbered lines, is RAM. The two or three numbers he writes on a small card on the counter are the registers. His calculator is the ALU. He himself, reading the job list line by line and deciding what to do, is the control unit.

دووکاندارێک لە بازاڕدا بهێنە بەرچاوت کە حیسابی ڕۆژەکە دەکات. دەفتەرە گەورەکەی، کە دێڕەکانی ژمارەیان هەیە، . ئەو دوو سێ ژمارەیەی لەسەر کارتێکی بچووک لەسەر مێزەکە دەینووسێت . . خۆی، کە لیستی کارەکان دێڕ بە دێڕ دەخوێنێتەوە و بڕیار دەدات چی بکات، .

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

The shopkeeper thinks; the CPU only follows instructions, billions of times a second. And unlike a paper ledger, ordinary RAM forgets everything when the power goes off.

دووکاندار بیر دەکاتەوە؛ تەنها جێبەجێ دەکات، ملیارەها جار لە چرکەیەکدا. هەروەها بە پێچەوانەی دەفتەری کاغەز، ئاسایی کاتێک کارەبا دەبڕێت هەموو شتێک لەبیر دەکات.

Quick checkپشکنینی خێراIn the model, which part actually adds the numbers?لە نموونەکەدا، کام بەش بەڕاستی ژمارەکان کۆ دەکاتەوە؟

A tiny computer to watchکۆمپیوتەرێکی بچووک بۆ سەیرکردن

RAM: numbered places for instructions and dataRAM: شوێنی ژمارەدار بۆ ڕێکارنامەکان و دراوە

RAM is a long row of storage places. Each place has a number, its memory address, just as each house in a street has a house number. The CPU finds a value by its address.

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

In our model RAM has two parts. The Data part has places named A1, A2, A3, A4, A5 … for storing data. The Instructions part holds the orders that tell the computer what to do with that data.

لە نموونەکەماندا دوو بەشی هەیە. بەشی شوێنی بە ناوی ⁦A1⁩، ⁦A2⁩، ⁦A3⁩، ⁦A4⁩، ⁦A5⁩ … ی هەیە بۆ هەڵگرتنی . بەشی هەڵدەگرێت کە بە دەڵێن چی لەو بکات.

Quick checkپشکنینی خێراIn the model, what is A1?لە نموونەکەدا ⁦A1⁩ چییە؟

A tiny computer to watchکۆمپیوتەرێکی بچووک بۆ سەیرکردن

Who puts the instructions into RAM?کێ ڕێکارنامەکان دەخاتە ناو RAM؟

Quick checkپشکنینی خێراYou open a calculator app. How do its instructions get into RAM? دەکەیتەوە. چۆن دەچنە ناو ؟

A tiny computer to watchکۆمپیوتەرێکی بچووک بۆ سەیرکردن

Registers and the ALUتۆمارگەکان و یەکەی ژیربێژیی بیرکارییانە

Registers are a few tiny, very fast cells inside the CPU. They hold the data the CPU is working on at this moment. Our model has three general-purpose registers, R1, R2 and R3, plus four special registers (PC, MAR, MDR and IR) that you will meet in a moment.

چەند خانەیەکی زۆر بچووک و زۆر خێران لەناو . ئەو هەڵدەگرن کە لەم ساتەدا کاری لەسەر دەکات. نموونەکەمان سێ هەیە، ⁦R1⁩، ⁦R2⁩ و ⁦R3⁩، لەگەڵ چوار تایبەت (PC، MAR، MDR و IR) کە کەمێکی تر دەیانناسیت.

The ALU (arithmetic logic unit), also inside the CPU, does the work on that data: arithmetic operations such as adding and subtracting, and logical operations such as comparing two numbers. It takes its numbers from registers and puts its answer in a register — never straight from RAM.

⁦(ALU)⁩، کە ئەویش لەناو ، کار لەسەر ئەو دەکات: وەک کۆکردنەوە و لێدەرکردن، هەروەها وەک بەراوردکردنی دوو ژمارە. ژمارەکانی لە وەردەگرێت و وەڵامەکەی دەخاتە — هەرگیز ڕاستەوخۆ لە نا.

So RAM is outside the CPU and the registers are inside it. The full list of registers and what each one does is in Registers and buses.

کەواتە لە دەرەوەی و لە ناوەوەیدان. لیستی تەواوی و کاری هەریەکەیان لە تۆمارگەکان و تێپەڕگەکان دایە.

Quick checkپشکنینی خێراWhere does the ALU take the numbers it adds? ئەو ژمارانەی کۆیان دەکاتەوە لە کوێوە وەردەگرێت؟

The instruction set: the CPU's vocabularyکۆمەڵە ڕێکارنامە: وشەکانی CPU

A CPU understands only a fixed list of instructions, called its instruction set. Our model knows four. LOAD and STORE move numbers between RAM and the registers; the other two use the ALU.

تەنها لە لیستێکی دیاریکراوی تێدەگات کە پێی دەوترێت . نموونەکەمان چوار دەزانێت. LOAD و STORE ژمارە لە نێوان و دەگوازنەوە؛ دووەکەی تر بەکار دەهێنن.

The four instructions of the modelچوار نموونەکە
InstructionWhat it doesچی دەکاتExampleنموونە
LOAD address → registerCopies a value from a RAM address into a register.بەهایەک لە ناونیشانێکی کۆپی دەکات بۆ ناو .LOAD A1 → R1
STORE register → addressCopies a value from a register into a RAM address.بەهایەک لە کۆپی دەکات بۆ ناو ناونیشانێکی .STORE R3 → A3
R1 + R2 → R3The ALU adds R1 and R2 and puts the result in R3. ⁦R1⁩ و ⁦R2⁩ کۆ دەکاتەوە و ئەنجامەکە دەخاتە ناو ⁦R3⁩.5 + 2 → 7
R1 − R2 → R3The ALU subtracts R2 from R1 and puts the result in R3. ⁦R2⁩ لە ⁦R1⁩ کەم دەکاتەوە و ئەنجامەکە دەخاتە ناو ⁦R3⁩.5 − 2 → 3
Quick checkپشکنینی خێراWhich instruction copies a value from a register back into RAM?کام بەهایەک لە دەگەڕێنێتەوە بۆ ناو ؟

The instruction set: the CPU's vocabularyکۆمەڵە ڕێکارنامە: وشەکانی CPU

Real instruction setsکۆمەڵە ڕێکارنامەی ڕاستەقینە

Real instruction sets are much bigger: hundreds of instructions for adding, comparing, jumping to another instruction and more. The big families today are x86-64 (Intel and AMD) and Arm (phones, Apple's Macs and many new laptops) — see Who makes processors in 2026. A program built for one family does not run directly on the other (x86 or Arm).

لە ڕاستەقینەدا زۆر گەورەترە: سەدان بۆ کۆکردنەوە، بەراوردکردن، بازدان بۆ تر و زیاتر. ئەمڕۆ دوو خێزانی گەورە هەن: ⁦x86-64⁩ (Intel و AMD) و Arm (مۆبایل، Macـەکانی Apple و زۆرێک لە لاپتۆپە نوێیەکان). بڕوانە کێ لە ⁦2026⁩ـدا پرۆسێسەر دروست دەکات. کە بۆ خێزانێک دروست کرابێت ڕاستەوخۆ لەسەر خێزانەکەی تر کار ناکات (⁦x86⁩ یان Arm).

Quick checkپشکنینی خێراA program was built for an x86-64 Windows PC. Can an Arm chip run it directly? بۆ کۆمپیوتەرێکی Windowsـی ⁦x86-64⁩ دروست کراوە. ئایا Arm دەتوانێت ڕاستەوخۆ جێبەجێی بکات؟

Planning 5+2=75 + 2 = 7پلاندانان بۆ 5+2=75 + 2 = 7

Our job: add the number in A1 (5) to the number in A2 (2) and keep the answer in A3. First write the plan. The course paper calls this plan sheet the «Target RAM»: what each address should hold when we finish.

ئەرکەکەمان: ژمارەی ناو ⁦A1 (5)⁩ و ژمارەی ناو ⁦A2 (2)⁩ کۆ بکەینەوە و وەڵامەکە لە ⁦A3⁩ـدا هەڵبگرین. سەرەتا پلانەکە دەنووسین. نووسراوی وانەکە بەم پەڕەی پلانە دەڵێت «⁦Target RAM⁩»: واتە کاتێک تەواو دەبین هەر ناونیشانێک دەبێت چی هەڵبگرێت.

The plan («Target RAM»)پلانەکە («⁦Target RAM⁩»)
AddressناونیشانNowئێستاWhen finishedدوای تەواوبوون
A155
A222
A3emptyبەتاڵ7
  1. Load the first numberژمارەی یەکەم بهێنە

    Choose the RAM address that is our starting point, A1, and one of the three registers, R1: LOAD A1 → R1. When this instruction runs, the 5 in A1 goes straight into R1 in the CPU.

    ناونیشانێکی هەڵبژێرە کە خاڵی دەستپێکمانە ⁦(A1)⁩، لەگەڵ یەکێک لە سێ ، واتە ⁦R1⁩: LOAD A1 → R1. کاتێک ئەم جێبەجێ دەبێت، ژمارە 5ـی ناو ⁦A1⁩ ڕاستەوخۆ دەچێتە ناو ⁦R1⁩ لە .

  2. Load the second numberژمارەی دووەم بهێنە

    Do the same for A2 and R2: LOAD A2 → R2. Now R2 holds 2.

    هەمان کار بۆ ⁦A2⁩ و ⁦R2⁩ بکە: LOAD A2 → R2. ئێستا ⁦R2⁩ ژمارە 2 هەڵدەگرێت.

  3. Addکۆی بکەرەوە

    R1 + R2 → R3 makes the ALU add what is in R1 and R2 and put the result, 7, in R3.

    R1 + R2 → R3 وا دەکات ناوەڕۆکی ⁦R1⁩ و ⁦R2⁩ کۆ بکاتەوە و ئەنجامەکە، واتە 7، بخاتە ناو ⁦R3⁩.

  4. Store the answerوەڵامەکە هەڵبگرە

    STORE R3 → A3 keeps the contents of R3 in a data cell of RAM. We choose A3 because A1 and A2 already hold 5 and 2, which we may still need.

    STORE R3 → A3 ناوەڕۆکی ⁦R3⁩ لە خانەیەکی هەڵدەگرێت. ⁦A3⁩ هەڵدەبژێرین چونکە ⁦A1⁩ و ⁦A2⁩ خۆیان 5 و 2 هەڵدەگرن و لەوانەیە هێشتا پێویستمان پێیان بێت.

Quick checkپشکنینی خێراWhy does the program store the answer in A3 and not in A1?بۆچی وەڵامەکە لە ⁦A3⁩ـدا هەڵدەگرێت نەک لە ⁦A1⁩ـدا؟

Planning 5+2=75 + 2 = 7پلاندانان بۆ 5+2=75 + 2 = 7

The whole program in RAMهەموو بەرنامەکە لە RAMـدا

Put together, the four steps are four instructions, stored one after another in the Instructions part of RAM, at addresses 0 to 3:

کاتێک پێکەوە دادەنرێن، چوار هەنگاوەکە دەبنە چوار کە یەک لە دوای یەک لە بەشی هەڵگیراون، لە ناونیشانی 0 تا 3:

The whole program, as it sits in the Instructions part of RAMهەموو بەرنامەکە، وەک لە بەشی ڕێکارنامەکانی RAMـدا دانراوەTEXT
0: LOAD  A1 → R1
1: LOAD  A2 → R2
2: R1 + R2 → R3
3: STORE R3 → A3
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1-2

Copy the two numbers from RAM into registers.

دوو ژمارەکە لە کۆپی دەکات بۆ ناو .

Lineدێڕی 3

The ALU adds them inside the CPU.

لەناو کۆیان دەکاتەوە.

Lineدێڕی 4

Copy the answer back into RAM.

وەڵامەکە دەگەڕێنێتەوە بۆ ناو .

Quick checkپشکنینی خێراAt which address does the STORE instruction sit? STORE لە کام ناونیشاندایە؟

Watch the program runسەیری جێبەجێبوونی بەرنامەکە بکە

Now press play. For every instruction the CPU does the same two things: first it fetches the instruction from RAM into the CPU, then it decodes and executes it. Watch the PC: it always holds the address of the next instruction.

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

An animation in ten frames on the model computer. Frame 1: PC is 0; RAM holds the four instructions and A1 = 5, A2 = 2. Then, for each instruction, a fetch frame and an execute frame. Fetch: PC sends its address on the address bus with READ on the control bus; the instruction comes back on the data bus into MDR and IR; PC adds 1. Instruction 1 executes: A1 is read and 5 goes into R1. Instruction 2: 2 goes into R2. Instruction 3: the ALU adds 5 + 2 = 7 into R3, with no bus used. Instruction 4: STORE sends A3 and 7 with WRITE, and RAM saves 7 in A3. Last frame: A3 = 7 and PC = 4.
An animation in ten frames on the model computer. Frame 1: PC is 0; RAM holds the four instructions and A1 = 5, A2 = 2. Then, for each instruction, a fetch frame and an execute frame. Fetch: PC sends its address on the address bus with READ on the control bus; the instruction comes back on the data bus into MDR and IR; PC adds 1. Instruction 1 executes: A1 is read and 5 goes into R1. Instruction 2: 2 goes into R2. Instruction 3: the ALU adds 5 + 2 = 7 into R3, with no bus used. Instruction 4: STORE sends A3 and 7 with WRITE, and RAM saves 7 in A3. Last frame: A3 = 7 and PC = 4.
The 5+25 + 2 program running: PC, MAR, MDR, IR and R1–R3 change, the ALU adds, and the result is stored in A3. Press Pause to read a frame. 5+25 + 2 لە کاتی جێبەجێبووندا: PC، MAR، MDR، IR و ⁦R1⁩ تا ⁦R3⁩ دەگۆڕێن، کۆ دەکاتەوە و ئەنجامەکە لە ⁦A3⁩ـدا هەڵدەگیرێت. بۆ خوێندنەوەی وێنەیەک Pause دابگرە.CêIT
  • LOAD A1 → R1 — fetched from address 0; executing it reads A1 and puts 5 in R1.
  • LOAD A2 → R2 — fetched from address 1; puts 2 in R2.
  • R1 + R2 → R3 — fetched from address 2; the ALU adds, R3 = 7. No bus is needed: everything is inside the CPU.
  • STORE R3 → A3 — fetched from address 3; writes 7 into A3.
  • LOAD A1 → R1 — لە ناونیشانی 0ـەوە دەهێنرێت؛ جێبەجێکردنی ئەم ⁦A1⁩ دەخوێنێتەوە و 5 دەخاتە ⁦R1⁩.
  • LOAD A2 → R2 — لە ناونیشانی 1ـەوە دەهێنرێت؛ 2 دەخاتە ⁦R2⁩.
  • R1 + R2 → R3 — لە ناونیشانی 2ـەوە دەهێنرێت؛ کۆ دەکاتەوە و ⁦R3⁩ دەبێتە 7. هیچ پێویست نییە: هەموو شتێک لەناو .
  • STORE R3 → A3 — لە ناونیشانی 3ـەوە دەهێنرێت؛ 7 لە ⁦A3⁩ـدا دەنووسێت.
Quick checkپشکنینی خێراWhile the CPU runs R1 + R2 → R3, which part is busy?کاتێک R1 + R2 → R3 جێبەجێ دەکات، کام بەش سەرقاڵە؟

Watch the program runسەیری جێبەجێبوونی بەرنامەکە بکە

The run as a tableجێبەجێبوونەکە وەک خشتە

Programmers check a program with a trace table: after every instruction they write down what each register and memory place holds (trace tables in Fundamentals of Programming). Here is the trace table of our run.

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

Trace table of the 5+25 + 2 program بۆ 5+25 + 2
After instructionدوای PCIRR1R2R3A3
(start)(سەرەتا)0—————
01LOAD A1 → R15———
12LOAD A2 → R252——
23R1 + R2 → R3527—
34STORE R3 → A35277
Quick checkپشکنینی خێراWhat does STORE R3 → A3 do?STORE R3 → A3 چی دەکات؟

The fetch–decode–execute cycleسووڕی ڕێکارنامە: هێنان، شیکردنەوە و جێبەجێکردن

Definitionپێناسە

The steps the repeats for every : fetch it from memory (from the address in the ), decode it, execute it and store the result. Billions of these cycles happen every second.

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

The steps you watched have names. For every instruction, the processor repeats the same basic operations, called the machine cycle or instruction cycle:

ئەو هەنگاوانەی بینیت ناویان هەیە. پرۆسێسەر بۆ هەر هەمان هەنگاوە بنەڕەتییەکان دووبارە دەکاتەوە کە پێیان دەوترێت :

  1. Fetch — the control unit gets the next instruction (and the data it needs) from memory.
  2. Decode — the control unit works out what the instruction means and sets up the parts that will do it (with decoders).
  3. Execute — the ALU (or another part) carries it out.
  4. Store — the result is written into a register or into memory.
  1. هێنان — دواتر (و ئەو پێویستیەتی) لە دەهێنێت.
  2. شیکردنەوە — تێدەگات واتای چییە و ئەو بەشانە ئامادە دەکات کە جێبەجێی دەکەن (بە کۆدهەڵوەشێنەرەکان).
  3. جێبەجێکردن — (یان بەشێکی تر) ئەنجامی دەدات.
  4. هەڵگرتن — ئەنجامەکە لە یان لە دەنووسرێت.
An animation in six frames. A wheel with four steps, Fetch, Decode, Execute and Store, lights up one step at a time. Beside it: memory, the CPU with its control unit and ALU, and a screen. Aram's shop app works out the price of 3 notebooks at 750 dinars each. Fetch: the control unit takes the multiply instruction and the numbers 3 and 750 from memory. Decode: it sends them to the ALU. Execute: the ALU works out 3 × 750 = 2250. Store: 2250 is written into memory. Last frame: 2250 appears on the screen, and the cycle starts again for the next instruction.
An animation in six frames. A wheel with four steps, Fetch, Decode, Execute and Store, lights up one step at a time. Beside it: memory, the CPU with its control unit and ALU, and a screen. Aram's shop app works out the price of 3 notebooks at 750 dinars each. Fetch: the control unit takes the multiply instruction and the numbers 3 and 750 from memory. Decode: it sends them to the ALU. Execute: the ALU works out 3 × 750 = 2250. Store: 2250 is written into memory. Last frame: 2250 appears on the screen, and the cycle starts again for the next instruction.
The machine cycle for one calculation, 3×750=22503 \times 750 = 2250. بۆ یەک حیساب: 3×750=22503 \times 750 = 2250.CêIT

A real processor repeats this cycle billions of times every second. A 3 GHz processor's clock ticks 3 billion times a second, and a modern core overlaps the steps of several instructions so that it can finish more than one per tick. How this speed is measured is in Processor speed, cache, GPUs and cooling.

پرۆسێسەرێکی ڕاستەقینە لە هەر چرکەیەکدا ملیارەها جار دووبارە دەکاتەوە. کاتژمێری پرۆسێسەرێکی ⁦3 GHz⁩ لە چرکەیەکدا 3 ملیار جار لێ دەدات. هەروەها نوێ هەنگاوەکانی چەند تێکەڵ بە یەکتر دەکات بۆ ئەوەی لە هەر لێدانێکدا زیاتر لە یەک تەواو بکات. چۆنیەتیی پێوانی ئەم خێراییە لە خێرایی پرۆسێسەر، کاش، GPU و ساردکردنەوە دایە.

Quick checkپشکنینی خێراWhich order is right for one instruction?بۆ یەک کام ڕیزبەندی ڕاستە؟

The Fetch-Execute Cycle: What's Your Computer Actually Doing?Tom Scott · Englishئینگلیزی · 2.2M viewsبینین · 88K likesلایک · Partبەشی 0:00–6:55 (ofلە 9:04)

Fetch, decode, execute: the CPU uses a program counter, an instruction register and an accumulator to run instructions one by one.

، شیکردنەوە، جێبەجێکردن: بە ، و یەک لە دوای یەک جێبەجێ دەکات.

Watch 0:00-6:55. Stop before the sponsor message at 6:55.

لە ⁦0:00⁩ تا ⁦6:55⁩ سەیر بکە و پێش پەیامی سپۆنسەر لە ⁦6:55⁩ ڕابوەستە.

How the CPU knows what comes nextCPU چۆن دەزانێت دواتر چی دێت؟

The course paper never says how the CPU moves from one instruction to the next. Two special registers do it: the program counter (PC) holds the address of the next instruction, and the instruction register (IR) holds the instruction being carried out now. MAR and MDR are the CPU's «doorway» to RAM: MAR holds the address being used, MDR the value travelling in or out.

نووسراوی وانەکە هەرگیز نالێت چۆن لە دەچێتە سەر دواتر. دوو تایبەت ئەم کارە دەکەن: ⁦(PC)⁩ ناونیشانی دواتر هەڵدەگرێت. ⁦(IR)⁩ ئەو هەڵدەگرێت کە ئێستا جێبەجێ دەکرێت. MAR و MDR «دەرگای» بۆ : MAR ئەو ناونیشانە هەڵدەگرێت کە بەکار دێت؛ MDR ئەو بەهایەی کە دێتە ژوورەوە یان دەچێتە دەرەوە.

One instruction, register by registerیەک ڕێکارنامە، تۆمارگە بە تۆمارگە
  1. Fetchهێنان

    The address in the PC is copied into the MAR and sent on the address bus, with READ on the control bus.

    ناونیشانی ناو PC کۆپی دەکرێت بۆ MAR و بە دەنێردرێت، لەگەڵ READ بە .

  2. Fetchهێنان

    RAM sends the instruction back on the data bus into the MDR, and it is copied into the IR.

    بە دەنێرێتەوە بۆ MDR. لەوێوە کۆپی دەکرێت بۆ IR.

  3. Fetchهێنان

    The PC adds 1, so it already points to the next instruction.

    PC یەک زیاد دەکات، بۆیە هەر ئێستا ئاماژە بە دواتر دەکات.

  4. Decodeشیکردنەوە

    The control unit reads the IR and works out what to do.

    IR دەخوێنێتەوە و دیاری دەکات چی بکرێت.

  5. Executeجێبەجێکردن

    The parts named by the instruction do the work (a memory read or write, or an ALU operation). Then the cycle starts again with the new PC.

    ئەو بەشانەی ناویان دەبات کارەکە دەکەن (خوێندنەوە یان نووسین لە ، یان حیسابێک لە ). پاشان بە PCـی نوێوە دەست پێ دەکاتەوە.

Quick checkپشکنینی خێراWhat does the program counter (PC) hold? ⁦(PC)⁩ چی هەڵدەگرێت؟

How the CPU knows what comes nextCPU چۆن دەزانێت دواتر چی دێت؟

Jumps: how ifs and loops workبازدان: ڕستەکانی if و خولەکان چۆن کار دەکەن

Quick checkپشکنینی خێراA jump instruction runs: «if R3 is 0, go to address 7», and R3 is 0. What changes? بازدان جێبەجێ دەبێت: «ئەگەر ⁦R3⁩ سفر بوو، بڕۆ بۆ ناونیشانی 7». ⁦R3⁩ سفرە. چی دەگۆڕێت؟

Instructions & Programs: Crash Course Computer Science #8CrashCourse · Englishئینگلیزی · 1.1M viewsبینین · 19K likesلایک · Partبەشی 2:25–7:41 (ofلە 10:36)

How JUMP and conditional jump instructions change the next address, so a list of instructions can make decisions and loops.

JUMP و بازدانی بە چۆن ناونیشانی داهاتوو دەگۆڕن، تا لیستێک لە بتوانێت بڕیار بدات و دروست بکات.

Watch 2:25-7:41: JUMP, JUMP_NEG, HALT and a loop.

لە ⁦2:25⁩ تا ⁦7:41⁩ سەیر بکە: JUMP، ⁦JUMP_NEG⁩، HALT و .

Another design: one accumulatorدیزاینێکی تر: یەک تۆمارگەی کۆکەرەوە

The course slides draw a slightly different CPU. Memory is a numbered list of places, 00 to 99, each holding a number. Instead of R1, R2 and R3 the CPU has one main register, the accumulator (ACC), which collects the results. So each instruction names only a memory address.

سلایدەکانی وانەکە کەمێک جیاواز دەکێشن. لیستێکی ژمارەدارە لە شوێنەکان، لە ⁦00⁩ تا ⁦99⁩، کە هەر شوێنێکیان ژمارەیەک هەڵدەگرێت. لە جیاتی ⁦R1⁩، ⁦R2⁩ و ⁦R3⁩، یەک سەرەکیی هەیە، ⁦(ACC)⁩، کە ئەنجامەکان کۆ دەکاتەوە. بۆیە هەر تەنها ناونیشانێکی ناو دەبات.

The program in the slide's RAM لە سلایدەکەدا
AddressناونیشانContentsناوەڕۆک
0LOAD 4
1ADD 5
2STORE 6
3—
43
56
6(empty)(بەتاڵ)
Trace: address 6 ends up holding 9: لە کۆتاییدا ناونیشانی 6 ژمارە 9 هەڵدەگرێت
StepهەنگاوInstructionWhat happensچی ڕوو دەداتACC
1LOAD 4Copy the value at address 4 into ACC.بەهای ناونیشانی 4 کۆپی دەکرێت بۆ ناو ACC.3
2ADD 5Add the value at address 5 to ACC: 3+63 + 6.بەهای ناونیشانی 5 بۆ ACC زیاد دەکرێت: 3+63 + 6.9
3STORE 6Copy ACC into address 6.ACC کۆپی دەکرێت بۆ ناونیشانی 6.9

It is the same idea as our R1–R3 model: bring numbers in from memory, let the ALU work, write the result back. Only the way registers are named differs. Real CPUs have many general-purpose registers.

ئەمە هەمان بیرۆکەی نموونەی ⁦R1⁩ تا ⁦R3⁩ـە: ژمارەکان لە بهێنە ژوورەوە، با کار بکات، ئەنجامەکە بنووسەرەوە. تەنها شێوەی ناونانی جیاوازە. ڕاستەقینە چەندین هەیە.

Quick checkپشکنینی خێراIn the slide's program, what is in address 6 at the end?لە سلایدەکەدا، لە کۆتاییدا چی لە ناونیشانی 6ـدایە؟

From your code to machine instructionsلە کۆدەکەتەوە بۆ ڕێکارنامەکانی ئامێر

Nobody writes LOAD and STORE by hand for an app. A programmer writes one line such as total = a + b in a high-level language. A translator program — a compiler or an interpreter — turns it into machine instructions very much like our four:

کەس بۆ بە دەست LOAD و STORE نانووسێت. یەک دێڕی وەک total = a + b بە دەنووسێت. وەرگێڕ — یان — دەیکات بە ئامێر کە زۆر لە چوار ئێمە دەچن:

One line of code becomes four machine instructionsیەک دێڕی کۆد دەبێت بە چوار ڕێکارنامەی ئامێرTEXT
total = a + b

   ↓  compiler or interpreter

LOAD  a → R1
LOAD  b → R2
R1 + R2 → R3
STORE R3 → total
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 1

Source code: easy for people to read.

: بۆ مرۆڤ ئاسانە بۆ خوێندنەوە.

Lineدێڕی 5-8

Machine instructions (shown with words; in memory they are stored as bits, 0s and 1s).

ئامێر (بە وشە نیشان دراون؛ لە وەک ، واتە 0 و 1، هەڵدەگیرێن).

In memory each machine instruction is a pattern of bits — this is machine code. Why bits can stand for numbers and instructions is explained in Number systems and place value. How the translation itself works is taught in What is programming? and Compilers and interpreters.

لە هەر ئامێر نەخشێکە لە — ئەمە پێی دەوترێت . بۆچی دەتوانن ژمارە و نیشان بدەن لە سیستەمە ژمارەییەکان و بەهای خانەیی ڕوون کراوەتەوە. چۆنیەتیی وەرگێڕانەکە خۆی لە بەرنامەسازی چییە؟ و کۆمپایلەرەکان و ئینتەرپرێتەرەکان دەخوێندرێت.

Quick checkپشکنینی خێراWho turns total = a + b into LOAD, add and STORE instructions?کێ total = a + b دەکات بە LOAD، کۆکردنەوە و STORE؟

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

MistakeهەڵەWhat is trueڕاستییەکە
«The STORE command runs the program.»« STORE کارا دەکات.»STORE only copies a register into memory. The program runs because every instruction goes through fetch, decode and execute, one after another.STORE تەنها کۆپی دەکات بۆ . جێبەجێ دەبێت چونکە هەموو ، یەک لە دوای یەک، بە هێنان، شیکردنەوە و جێبەجێکردندا تێدەپەڕێت.
«The user types the instructions into RAM with the keyboard.»« بە دەنووسێتە ناو .»The operating system copies a program from storage into RAM when you open it. The keyboard gives the program data. کاتێک دەکەیتەوە لە کۆپیی دەکات بۆ . دەداتە .
«Main memory (RAM) is part of the CPU», as some diagrams draw it.« () بەشێکە لە »، وەک هەندێک وێنە دەیکێشن.RAM is outside the CPU and reached through the buses. Only the registers (and the cache) are inside the CPU. لە دەرەوەی و لە ڕێگەی پێی دەگەیەنرێت. تەنها (و کاش) لەناو .
«The PC holds the instruction being run.»«PC ئەو هەڵدەگرێت کە جێبەجێ دەکرێت.»The IR holds that instruction. The PC holds the address of the next one.IR ئەو هەڵدەگرێت. PC ناونیشانی دواتر هەڵدەگرێت.
«The ALU fetches and decodes the instructions.»« دەهێنێت و شی دەکاتەوە.»The control unit fetches and decodes; the ALU only calculates and compares. دەهێنێت و شی دەکاتەوە؛ تەنها حیساب و بەراورد دەکات.
«LOAD moves the number out of RAM, so A1 is empty afterwards.»«LOAD ژمارەکە لە دەردەهێنێت، بۆیە دواتر ⁦A1⁩ بەتاڵ دەبێت.»LOAD copies. A1 still holds 5 after LOAD A1 → R1.LOAD کۆپی دەکات. دوای LOAD A1 → R1 هێشتا ⁦A1⁩ ژمارە 5 هەڵدەگرێت.

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

ExerciseڕاهێنانTrace a subtractionشوێنپێهەڵگرتنی لێدەرکردن

RAM starts with A1 = 9 and A2 = 4. Trace this program and give R1, R2, R3, A4 and the PC at the end.

بە A1 = 9 و A2 = 4 دەست پێ دەکات. ئەم هەنگاو بە هەنگاو بگرەوە و لە کۆتاییدا ⁦R1⁩، ⁦R2⁩، ⁦R3⁩، ⁦A4⁩ و PC بنووسە.

TEXT
0: LOAD  A1 → R1
1: LOAD  A2 → R2
2: R1 − R2 → R3
3: STORE R3 → A4
Hintئاماژە

Use a trace table like the one in «The run as a table».

وەک ئەوەی بەشی «جێبەجێبوونەکە وەک خشتە» بەکار بهێنە.

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

R1 = 9, R2 = 4, R3 = 9 − 4 = 5, A4 = 5, PC = 4 (four instructions were fetched, from addresses 0 to 3). A1 and A2 still hold 9 and 4.

R1 = 9، R2 = 4، R3 = 9 − 4 = 5، A4 = 5، PC = 4 (چوار هێنران، لە ناونیشانی 0 تا ⁦3). A1⁩ و ⁦A2⁩ هێشتا 9 و 4 هەڵدەگرن.

ExerciseڕاهێنانAdd three numbersکۆکردنەوەی سێ ژمارە

A1 = 3, A2 = 4 and A3 = 5. Using only the model's four instructions and R1–R3, write a program that stores A1 + A2 + A3 in A4. (Careful: the add instruction always adds R1 and R2 into R3.)

A1 = 3، A2 = 4 و A3 = 5. تەنها بە چوار نموونەکە و ⁦R1⁩ تا ⁦R3⁩، بنووسە کە A1 + A2 + A3 لە ⁦A4⁩ـدا هەڵبگرێت. (ئاگاداربە: کۆکردنەوە هەمیشە ⁦R1⁩ و ⁦R2⁩ کۆ دەکاتەوە و دەیخاتە ⁦R3.⁩)

Hintئاماژە

Store the first sum somewhere, then load it back.

کۆی یەکەم لە شوێنێک هەڵبگرە، پاشان بیهێنەرەوە.

Show answerوەڵامەکە پیشان بدە
TEXT
0: LOAD  A1 → R1
1: LOAD  A2 → R2
2: R1 + R2 → R3     (R3 = 7)
3: STORE R3 → A4     (A4 = 7 for now)
4: LOAD  A4 → R1     (R1 = 7)
5: LOAD  A3 → R2     (R2 = 5)
6: R1 + R2 → R3     (R3 = 12)
7: STORE R3 → A4     (A4 = 12)

The model has no instruction that copies R3 into R1, so the half-way result goes to RAM and comes back. That is eight instructions, so eight fetch–decode–execute cycles. A real instruction set has a «move» instruction that saves two of them.

نموونەکە هیچ نییە کە ⁦R3⁩ کۆپی بکات بۆ ⁦R1⁩، بۆیە ئەنجامی نیوەڕێ دەچێتە و دەگەڕێتەوە. ئەمە هەشت ، واتە هەشت جار هێنان، شیکردنەوە و جێبەجێکردن. ڕاستەقینە «گواستنەوە»ـی هەیە کە دوو کەم دەکاتەوە.

ExerciseڕاهێنانThe accumulator machineکۆمپیوتەری تۆمارگەی کۆکەرەوە

In the slide's machine, address 4 now holds 10 and address 5 holds 15. The program is still LOAD 4, ADD 5, STORE 6. What is in ACC after each step, and what is in address 6 at the end?

لە سلایدەکەدا، ئێستا ناونیشانی 4 ژمارە ⁦10⁩ و ناونیشانی 5 ژمارە ⁦15⁩ هەڵدەگرێت. هێشتا ⁦LOAD 4⁩، ⁦ADD 5⁩، ⁦STORE 6⁩ـە. دوای هەر هەنگاوێک ACC چی هەڵدەگرێت؟ لە کۆتاییدا چی لە ناونیشانی 6ـدایە؟

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

After LOAD 4: ACC = 10. After ADD 5: ACC = 10 + 15 = 25. After STORE 6: ACC stays 25 and address 6 holds 25.

دوای LOAD 4: ACC = 10. دوای ADD 5: ACC = 10 + 15 = 25. دوای STORE 6: ACC هەر ⁦25⁩ دەمێنێتەوە و ناونیشانی 6 ژمارە ⁦25⁩ هەڵدەگرێت.

ExerciseڕاهێنانHandle the equal caseحاڵەتی یەکسان چارەسەر بکە

Rewrite the «larger number» steps so that for two equal numbers the program says that they are equal.

هەنگاوەکانی «ژمارە گەورەترەکە» بنووسەرەوە بە شێوەیەک کە بۆ دوو ژمارەی یەکسان بڵێت یەکسانن.

Show answerوەڵامەکە پیشان بدە
TEXT
1. Input number1
2. Input number2
3. If number1 = number2, output "equal"
4. Otherwise, if number1 > number2, output number1
5. Otherwise, output number2

Check «equal» first; only then compare which is larger.

سەرەتا «یەکسان» بپشکنە؛ ئینجا بەراورد بکە کامیان گەورەترە.

ExerciseڕاهێنانExplain the correctionڕاستکردنەوەکە ڕوون بکەرەوە

A classmate writes: «LOAD brings data into the CPU and STORE runs the program.» Which half is right? Rewrite the wrong half correctly in one sentence.

هاوپۆلێک دەنووسێت: «LOAD دەهێنێتە ناو و STORE کارا دەکات.» کام نیوەی ڕاستە؟ نیوە هەڵەکە لە یەک ڕستەدا بە ڕاستی بنووسەرەوە.

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

The first half is right. Correct second half: «STORE copies a value from a register back into memory; the program runs because the control unit fetches, decodes and executes every instruction in turn.»

نیوەی یەکەم ڕاستە. نیوەی دووەم بە ڕاستی: «STORE بەهایەک لە دەگەڕێنێتەوە بۆ ؛ جێبەجێ دەبێت چونکە هەموو بە نۆرە دەهێنێت، شی دەکاتەوە و جێبەجێ دەکات.»

Summaryپوختە

  • A program is only a list of instructions. When you open it, the operating system copies it from storage into RAM.
  • RAM holds instructions and data at numbered addresses. Registers are tiny, fast cells inside the CPU; the ALU calculates on them.
  • LOAD copies from RAM into a register, STORE copies from a register into RAM, and the ALU adds or subtracts registers.
  • 5+2=75 + 2 = 7 takes four instructions: LOAD A1 → R1, LOAD A2 → R2, R1 + R2 → R3, STORE R3 → A3.
  • Every instruction goes through the machine cycle: fetch, decode, execute (and store). The PC points to the next instruction; the IR holds the current one.
  • High-level code is translated into machine instructions by a compiler or an interpreter.
  • تەنها لیستێکی . کاتێک دەیکەیتەوە، لە کۆپیی دەکات بۆ .
  • و لە ناونیشانی ژمارەداردا هەڵدەگرێت. خانەی بچووک و خێران لەناو ؛ حیسابیان لەسەر دەکات.
  • LOAD لە کۆپی دەکات بۆ ، STORE لە کۆپی دەکات بۆ . کۆ دەکاتەوە یان لێک دەردەکات.
  • 5+2=75 + 2 = 7 چوار دەخوازێت: LOAD A1 → R1، LOAD A2 → R2، R1 + R2 → R3، STORE R3 → A3.
  • هەموو بە تێدەپەڕێت: هێنان، شیکردنەوە، جێبەجێکردن (و هەڵگرتن). PC ئاماژە بە دواتر دەکات؛ IR ئەو هەڵدەگرێت کە ئێستا جێبەجێ دەکرێت.
  • کۆدی لە لایەن یان دەکرێت بە ئامێر.
Review questionsپرسیارەکانی پێداچوونەوە
Does STORE run the program?ئایا STORE بەرنامەکە کارا دەکات؟

No. STORE copies a register into memory. Every instruction runs through the same fetch–decode–execute cycle.

نەخێر. STORE کۆپی دەکات بۆ . هەموو بە هەمان (هێنان، شیکردنەوە، جێبەجێکردن) تێدەپەڕێت.

Why does adding R1 and R2 need no bus?بۆچی کۆکردنەوەی ⁦R1⁩ و ⁦R2⁩ پێویستی بە هیچ تێپەڕگەیەک نییە؟

Both registers and the ALU are inside the CPU. Buses are needed only to reach RAM or devices.

هەردوو و لەناو . تەنها بۆ گەیشتن بە یان ئامێرەکان پێویستن.

What would happen if the PC never added 1?ئەگەر PC هەرگیز یەک زیاد نەکات چی ڕوو دەدات؟

The CPU would fetch the same instruction again and again and the program would never move on.

هەمان جار لە دوای جار دەهێنێت و هەرگیز بەرەو پێش ناچێت.

Videoڤیدیۆ

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

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

How does a computer run a program? eChalk instructional videoeChalk · Englishئینگلیزی · 60K viewsبینین · 1K likesلایک

A tiny model computer runs a short program: RAM, registers, the bus and the instruction set working together, step by step.

نموونەیی بچووک کورت جێبەجێ دەکات: ، ، و هەنگاو بە هەنگاو پێکەوە کار دەکەن.

The eChalk simulation that the lesson's model computer is redrawn from.

هاوشێوەکردنەکەی eChalk؛ نموونەیی ئەم وانەیە لەسەر ئەو دووبارە کێشراوەتەوە.

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

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

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

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

Bits, Bytes and Storage Unitsبیتەکان، بایتەکان و یەکەکانی خەزنکردن

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

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