×

Utilizziamo i cookies per contribuire a migliorare LingQ. Visitando il sito, acconsenti alla nostra politica dei cookie.


image

CrashCourse: Computer Science, How Computers Calculate - the ALU: Crash Course Computer Science #5

How Computers Calculate - the ALU: Crash Course Computer Science #5

Hi, I'm Carrie Ann and this is Crash Course Computer Science.

So last episode, we talked about how numbers can be represented in binary. Representing

Like, 00101010 is 42 in decimal.

Representing and storing numbers is an important function of a computer, but the real goal is computation,

or manipulating numbers in a structured and purposeful way, like adding two numbers together.

These operations are handled by a computer's Arithmetic and Logic Unit,

but most people call it by its street name: the ALU.

The ALU is the mathematical brain of a computer.

When you understand an ALU's design and function, you'll understand a fundamental

part of modern computers. It is THE thing that does all of the computation in a computer,

so basically everything uses it.

First though, look at this beauty.

This is perhaps the most famous ALU ever, the Intel 74181.

When it was released in 1970, it was

It was the first complete ALU that fit entirely inside of a single chip -

Which was a huge engineering feat at the time.

So today we're going to take those Boolean logic gates we learned about last week

to build a simple ALU circuit with much of the same functionality as the 74181.

And over the next few episodes we'll use

this to construct a computer from scratch. So it's going to get a little bit complicated,

but I think you guys can handle it.

INTRO

An ALU is really two units in one -- there's an arithmetic unit and a logic unit.

Let's start with the arithmetic unit, which is responsible for handling all numerical operations in a

computer, like addition and subtraction. It also does a bunch of other simple things like

add one to a number, which is called an increment operation, but we'll talk about those later.

Today, we're going to focus on the pièce de résistance, the crème de la crème of

operations that underlies almost everything else a computer does - adding two numbers together.

We could build this circuit entirely out of

individual transistors, but that would get confusing really fast.

So instead as we talked about in Episode 3 – we can use a high-level of abstraction and build our components

out of logic gates, in this case: AND, OR, NOT and XOR gates.

The simplest adding circuit that we can build takes two binary digits, and adds them together.

So we have two inputs, A and B, and one output, which is the sum of those two digits.

Just to clarify: A, B and the output are all single bits.

There are only four possible input combinations.

The first three are: 0+0 = 0

1+0 = 1 0+1 = 1

Remember that in binary, 1 is the same as true, and 0 is the same as false.

So this set of inputs exactly matches the boolean logic of an XOR gate, and we can use it as

our 1-bit adder.

But the fourth input combination, 1 + 1, is a special case. 1 + 1 is 2 (obviously)

but there's no 2 digit in binary, so as we talked about last episode, the result is

0 and the 1 is carried to the next column. So the sum is really 10 in binary.

Now, the output of our XOR gate is partially correct - 1 plus 1, outputs 0.

But, we need an extra output wire for that carry bit.

The carry bit is only “true” when the inputs are 1 AND 1, because that's the only

time when the result (two) is bigger than 1 bit can store… and conveniently we have

a gate for that! An AND gate, which is only true when both inputs are true, so

we'll add that to our circuit too.

And that's it. This circuit is called a half adder. It's

It's not that complicated - just two logic gates - but let's abstract away even this level

of detail and encapsulate our newly minted half adder as its own component, with two

inputs - bits A and B - and two outputs, the sum and the carry bits.

This takes us to another level of abstraction… heh… I feel like I say that a lot.

I wonder if this is going to become a thing.

Anyway, If you want to add more than 1 + 1

we're going to need a “Full Adder.” That half-adder left us with a carry bit as output.

That means that when we move on to the next column in a multi-column addition,

and every column after that, we are going to have to add three bits together, no two.

A full adder is a bit more complicated - it

takes three bits as inputs: A, B and C. So the maximum possible input is 1 + 1 + 1,

which equals 1 carry out 1, so we still only need two output wires: sum and carry.

We can build a full adder using half adders. To do this, we use a half adder to add A plus B

just like before – but then feed that result and input C into a second half adder.

Lastly, we need a OR gate to check if either one of the carry bits was true.

That's it, we just made a full adder! Again,we can go up a level of abstraction and wrap

up this full adder as its own component. It takes three inputs, adds them, and outputs

the sum and the carry, if there is one.

Armed with our new components, we can now build a circuit that takes two, 8-bit numbers

– Let's call them A and B – and adds them together.

Let's start with the very first bit of

A and B, which we'll call A0 and B0. At this point, there is no carry bit to deal

with, because this is our first addition. So we can use our half adder to add these

two bits together. The output is sum0. Now we want to add A1 and B1 together.

It's possible there was a carry from the previous addition of A0 and B0, so this time we need

to use a full adder that also inputs the carry bit. We output this result as sum1.

Then, we take any carry from this full adder, and run it into the next full adder that handles

A2 and B2. And we just keep doing this in a big chain until all 8 bits have been added.

Notice how the carry bits ripple forward to each subsequent adder. For this reason,

this is called an 8-bit ripple carry adder. Notice how our last full adder has a carry out.

If there is a carry into the 9th bit, it means the sum of the two numbers is too large to fit into 8-bits.

This is called an overflow.

In general, an overflow occurs when the result of an addition is too large to be represented by the number of bits you are using.

This can usually cause errors and unexpected behavior.

Famously, the original PacMan arcade game used 8 bits to keep track of what level you were on.

This meant that if you made it past level 255 – the largest number storablein 8 bits –

to level 256, the ALU overflowed.

This caused a bunch of errors and glitches making the level unbeatable.

The bug became a rite of passage for the greatest PacMan players.

So if we want to avoid overflows, we can extend our circuit with more full adders, allowing

us to add 16 or 32 bit numbers. This makes overflows less likely to happen, but at the

expense of more gates. An additional downside is that it takes a little bit of time for

each of the carries to ripple forward.

Admittedly, not very much time, electrons move pretty fast, so we're talking about billionths of a second,

but that's enough to make a difference in today's fast computers.

For this reason, modern computers use a slightly different adding circuit called a ‘carry-look-ahead' adder

which is faster, but ultimately does exactly the same thing-- adds binary numbers.

The ALU's arithmetic unit also has circuits for other math operations

and in general these 8 operations are always supported.

And like our adder, these other operations are built from individual logic gates.

Interestingly, you may have noticed that there are no multiply and divide operations.

That's because simple ALUs don't have a circuit for this, and instead just perform a series of additions.

Let's say you want to multiply 12 by 5.

That's the same thing as adding 12 to itself 5 times. So it would take 5 passes through

the ALU to do this one multiplication. And this is how many simple processors,

like those in your thermostat, TV remote, and microwave, do multiplication.

It's slow, but it gets the job done.

However, fancier processors, like those in your laptop or smartphone,

have arithmetic units with dedicated circuits for multiplication.

And as you might expect, the circuit is more complicated than addition -- there's no

magic, it just takes a lot more logic gates – which is why less expensive processors

don't have this feature.

Ok, let's move on to the other half of the ALU: the Logic Unit.

Instead of arithmetic operations, the Logic Unit performs… well...

logical operations, like AND, OR and NOT, which we've talked about previously.

It also performs simple numerical tests, like checking if a number is negative.

For example, here's a circuit that tests if the output of the ALU is zero.

It does this using a bunch of OR gates to see if any of the bits are 1.

Even if one single bit is 1, we know the number can't be zero and then we use a final NOT gate to flip this

input so the output is 1 only if the input number is 0.

So that's a high level overview of what makes up an ALU. We even built several of

the main components from scratch, like our ripple adder.

As you saw, it's just a big bunch of logic gates connected in clever ways.

Which brings us back to that ALU you admired so much at the beginning of the episode.

The Intel 74181.

Unlike the 8-bit ALU we made today, the 74181 could only handle 4-bit inputs,

which means YOU BUILT AN ALU THAT'S LIKE

TWICE AS GOOD AS THAT SUPER FAMOUS ONE. WITH YOUR MIND! Well.. sort of.

We didn't build the whole thing… but you get the idea.

The 74181 used about 70 logic gates, and it couldn't multiply or divide.

But it was a huge step forward in miniaturization, opening the doors to more capable and less expensive computers.

This 4-bit ALU circuit is already a lot to take in,

but our 8-bit ALU would require hundreds of logic gates to fully build and engineers

don't want to see all that complexity when using an ALU, so they came up with a special

symbol to wrap it all up, which looks like a big ‘V'. Just another level of abstraction!

Our 8-bit ALU has two inputs, A and B, each with 8 bits. We also need a way to specify what operation the ALU should perform,

for example, addition or subtraction.

For that, we use a 4-bit operation code.

We'll talk about this more in a later episode, but in brief, 1000 might be the command

to add, while 1100 is the command for subtract. Basically, the operation code tells the ALU

what operation to perform. And the result of that operation on inputs A and B is an 8-bit output.

ALUs also output a series of Flags, which are 1-bit outputs for particular states and statuses.

For example, if we subtract two numbers, and the result is 0, our zero-testing circuit, the one we made earlier,

sets the Zero Flag to True (1). This is useful if we are trying to determine if two numbers are are equal.

If we wanted to test if A was less than B,

we can use the ALU to calculate A subtract B and look to see if the Negative Flag was set to true.

If it was, we know that A was smaller than B.

And finally, there's also a wire attached to the carry out on the adder we built,

so if there is an overflow, we'll know about it. This is called the Overflow Flag.

Fancier ALUs will have more flags, but these three flags are universal and frequently used.

In fact, we'll be using them soon in a future episode.

So now you know how your computer does all its basic mathematical operations digitally

with no gears or levers required.

We're going to use this ALU when we construct our CPU two episodes from now.

But before that, our computer is going to need some memory! We'll talk about that next week.


How Computers Calculate - the ALU: Crash Course Computer Science #5 Wie ein Computer rechnet - die ALU: Crashkurs Informatik #5 Cómo calculan los ordenadores: la ALU: Curso acelerado de informática nº 5 Comment les ordinateurs calculent - l'ALU : Cours accéléré d'informatique #5 Come calcolano i computer: l'ALU: Corso accelerato di informatica #5 コンピュータの計算方法 - ALU:クラッシュコース コンピュータサイエンス 第5回 Como os computadores calculam - a ALU: Curso Rápido de Informática #5 Как вычисляют компьютеры - АЛУ: Краткий курс информатики №5 Bilgisayarlar Nasıl Hesaplama Yapar - ALU: Crash Course Bilgisayar Bilimi #5 Як обчислюють комп'ютери - АЛУ: Прискорений курс комп'ютерних наук #5 计算机如何计算 - ALU:计算机科学速成课程 #5 計算機如何計算 - ALU:計算機科學速成課程 #5

Hi, I'm Carrie Ann and this is Crash Course Computer Science. مرحبا، أنا كاري آن، وهذا هو " Crash Course " لعلوم الكمبيوتر. Hi, mein Name ist Carrie Ann und Du schaust den "Crash Course Computer Science" 안녕하세요. 저는 Carrie Ann이고 이 강의는 컴퓨터 과학 특강입니다.

So last episode, we talked about how numbers can be represented in binary. Representing في الحلقة الأخيرة، تحدثنا عن كيف يمكن تمثيل الأرقام في النظام الثنائي. In der letzten Folge haben wir darüber gesprochen, wie Zahlen im Binärsystem dargestellt werden können. 지난 시간에, 우리는 어떻게 숫자들이 이진법으로 어떻게 나타나는 지 배웠습니다. Отже, в останньому епізоді ми говорили про те, як числа можна представити у двійковому форматі. Представляє

Like, 00101010 is 42 in decimal. مثل، 00101010 هو 42 في العشري. Zum Beispiel ist 00101010 als Dezimalzahl dargestellt 42. 예를들어 00101010을 십진법으로 고치면 42가 되죠. Наприклад, 00101010 - це 42 в десятковій системі.

Representing and storing numbers is an important function of a computer, but the real goal is computation, تمثيل و تخزين الأرقام وظيفة مهمة لجهازالكمبيوتر، ولكن الهدف الحقيقي هو الحساب، Die Darstellung und Speicherung von Zahlen ist eine wichtige Funktion eines Computers, aber das eigentliche Ziel sind Berechnungen 숫자를 저장하고 나타내는것은 컴퓨터의 중요한 기능이지만

or manipulating numbers in a structured and purposeful way, like adding two numbers together. أو التلاعب بالأرقام بطريقة منظمة وهادفة، مثل إضافة رقمين معا. oder anders gesagt Zahlen auf strukturierte und zielgerichtete Weise zu manipulieren, zum Beispiel die Addition von zwei Zahlen. 숫자를 구조화되고 목적이 있는 방식 으로 다루는 것 이에요.

These operations are handled by a computer's Arithmetic and Logic Unit, يتم التعامل مع هذه العمليات من قبل وحدة الحساب والمنطق للكمبيوتر، Diese Operationen werden von der Arithmetik- und Logikeinheit eines Computers durchgeführt, 이 작용은 컴퓨터의 산술적이고 논리적인 부분에서 다뤄지는데요,

but most people call it by its street name: the ALU. ولكن معظم الناس يسمونه بالاسم الشارع وهي: ALU. aber die meisten Leute nennen Sie entsprechend der üblichen Abkürzung: die ALU (Arithmetical Logical Unit). 대부분의 사람들은 통상 이걸 ALU라고 칭합니다.

The ALU is the mathematical brain of a computer. وALU هو الدماغ الرياضي للكمبيوتر. Die ALU ist das mathematische Gehirn eines Computers. ALU는 컴퓨터의 수학적인 두뇌를 일컬어요.

When you understand an ALU's design and function, you'll understand a fundamental عندما تفهم تصميم ALU و وظيفته ، سوف تفهم الجزئ الاساسي Wenn Sie das Design und die Funktion einer ALU verstehen, verstehen Sie einen grundlegenden 여러분이 ALU의 디자인과 기능을 이해한다면

part of modern computers. It is THE thing that does all of the computation in a computer, من أجهزة الكمبيوتر الحديثة. هو الشيء الذي يقوم بكل الحساب في الكمبيوتر، Teil moderner Computer. Es ist DAS Ding was sämtliche Rechnungen in einem Computer erledigt,

so basically everything uses it. ببساطة كل شيء يستخدمه. also wird die ALU im Grunde von allem im Computer verwendet. 기본적으로 모든 것이 ALU를 사용 합니다.

First though, look at this beauty. في الأول، أنظر الى هذا الجمال. Schauen Sie sich zuerst diese Schönheit an. 우선, 이 아름다운 것을 보세요.

This is perhaps the most famous ALU ever, the Intel 74181. ولعل هذا هو ALU الأكثر شهرة على الاطلاق، intel 74181. Dies ist vielleicht die berühmteste ALU aller Zeiten, die Intel 74181. 아마 가장 유명한 ALU일 거에요. 이름은 Intel 74181 입니다.

When it was released in 1970, it was عندما تم أطلاقه في عام 1970، كان Als sie 1970 veröffentlicht wurde, war ie 1970년에 출시되었을 당시에

It was the first complete ALU that fit entirely inside of a single chip - وكان هذا اول ALU كامل داخل شريحة واحدة die erste komplette ALU, die vollständig in einen einzelnen Chip passte - 하나의 칩안에 완전히 딱 들어맞는 완벽한 ALU였죠.

Which was a huge engineering feat at the time. الذي كان مفخرة هندسية ضخمة في ذلك الوقت. was zu dieser Zeit eine enorme technische Leistung war. 그당시의 거대한 위업이었습니다. Что для того времени было огромным инженерным достижением.

So today we're going to take those Boolean logic gates we learned about last week اليوم نحن في طريقنا لاخذ تلك البوابات المنطقية التي تعلمناها الأسبوع الماضي Heute nutzen wir diese booleschen Logikgatter, von denen wir letzte Woche erfahren haben 그래서 오늘 우리는 지난 주에 배운 부울 논리 게이트를 사용해서

to build a simple ALU circuit with much of the same functionality as the 74181. لبناء دارة ALU بسيطة مع الكثير من نفس وظيفة 74181. um einen einfachen ALU-Schaltkreis mit der gleichen Funktionalität wie der 74181 zu bauen. 74181과 같은 기능을 할 수 있는 단순한 ALU회로를 만들거에요.

And over the next few episodes we'll use وعلى مدى الحلقات القليلة المقبلة سنستخدم Und in den nächsten Folgen verwenden wir 그리고 다음에 하게 될 몇 개의 강의에서는

this to construct a computer from scratch. So it's going to get a little bit complicated, هذا لبناء الكمبيوتر من الصفر. لذلك سيكون هناك القليل من التعقيدات، diesen Schaltkreis, um einen Computer von Grund auf neu zu konstruieren. Also wird es ein bisschen kompliziert, 컴퓨터를 구성하기 위해 이걸 사용할거고 조금은 복잡해질 거에요.

but I think you guys can handle it. ولكن أعتقد يا رفاق انكم قادرون على التعامل معها. aber ich denke ihr könnt damit umgehen. 하지만 여러분은 할 수 있을겁니다.^^

INTRO البداية INTRO

An ALU is really two units in one -- there's an arithmetic unit and a logic unit. وALU هو حقا وحدتين في واحد - هناك وحدة حسابية وحدة المنطق. Eine ALU beinhaltet in Wirklichkeit zwei Dinge in einem - es gibt eine Recheneinheit und eine Logikeinheit. ALU는 두개의 구성 단위를 가지고 있는데 그것은 산술과 논리 단위 입니다.

Let's start with the arithmetic unit, which is responsible for handling all numerical operations in a دعونا نبدأ مع وحدة حسابية، وهي المسؤولة عن التعامل مع جميع العمليات العددية في Beginnen wir mit der Recheneinheit, die für alle numerischen Operationen 산술 단위부터 시작해 봅시다.

computer, like addition and subtraction. It also does a bunch of other simple things like الكمبيوتر، مثل الجمع والطرح. هذا كما تقوم حفنة من أشياء بسيطة أخرى مثل in einem Computer zuständig ist, wie z.B. Addition und Subtraktion. Sie macht auch ein paar andere einfache Dinge

add one to a number, which is called an increment operation, but we'll talk about those later. إضافة إلى عدد، وهو ما يسمى عملية الزيادة، ولكن سوف نتحدث عن تلك في وقت لاحق. wie z.B. eins zu einer Zahl hinzuaddieren, was als Inkrementierungsoperation bezeichnet wird, aber darüber werden wir später sprechen.

Today, we're going to focus on the pièce de résistance, the crème de la crème of اليوم، نحن ذاهبون الى التركيز على قطعة "المقاومة" ، المصدر الحقيقي Heute konzentrieren wir uns auf das Pièce de Résistance, die Crème de la Crème der 이번 시간에 우리는 가장 중요한 것중에서도, 최고로 중요한 것을 집중공략 할 거에요.

operations that underlies almost everything else a computer does - adding two numbers together. العمليات التي يتركز كل شيء يقوم به جهازالكمبيوتر تقريبا كإضافة رقمين معا. Operationen, die fast allem zugrunde liegt, was ein Computer sonst noch tut - zwei Zahlen addieren. 컴퓨터가 하는 모든 것들의 근간이 되는 운영의 핵심이죠.

We could build this circuit entirely out of يمكننا أن نبني هذه الدائرة تماما من Wir könnten diese Schaltung vollständig aus 이 회로를 개별 트랜지스터로 완전히 만들 수 있지만,

individual transistors, but that would get confusing really fast. الترانزستورات الفردية، ولكن هذا سيحصل الخلط بسرعة. einzelne Transistoren bauen, aber das würde sehr schnell verwirrend.

So instead as we talked about in Episode 3 – we can use a high-level of abstraction and build our components بدلا من ذلك كما تحدثنا عنها في الحلقة 3 - يمكننا استخدام مستوى عال من التجريد وبناء مكونات لدينا Stattdessen können wir, wie wir in Folge 3 beschrieben haben, ein hohes Maß an Abstraktion verwenden und unsere Komponenten aus 그래서 대신 우리가 3강에서 말했던 것처럼,

out of logic gates, in this case: AND, OR, NOT and XOR gates. من البوابات المنطقية، في هذه الحالة: AND، OR، NOT وبوابة XOR Logikgattern erstellen. In diesem Fall: AND, OR, NOT- und XOR-Gatter.

The simplest adding circuit that we can build takes two binary digits, and adds them together. أبسط لدوائر الجمع التي ان نبنيها تأخذ اثنين من الأرقام الثنائية، وتجمعها. Die einfachste Additionsschaltung, die wir erstellen können, nimmt zwei Binärziffern und addiert diese. 가장 단순한 덧셈 회로는 2개의 2진수를 더하는 것과 같습니다.

So we have two inputs, A and B, and one output, which is the sum of those two digits. لذلك لدينا اثنين من المدخلات، A و B، وناتج واحد، الذي هو مجموع الرقمين. Wir haben also zwei Eingänge, A und B, und einen Ausgang, der die Summe dieser beiden Zahlen ist. 그래서 우리는 A와 B 두개의 입력을 갖고, 두 수의 합인 하나의 출력을 갖습니다.

Just to clarify: A, B and the output are all single bits. فقط للتوضيح: A، B والناتج كلها من ( بت ) واحد واحدة. Zur Verdeutlichung: A, B und der Ausgang sind allesamt Einzelbits. 명확히 하자면, A와B 그리고 출력은 모두 단일 비트에요.

There are only four possible input combinations. هناك فقط أربعة مجموعات مدخلات ممكنة. Es gibt nur vier mögliche Eingabekombinationen. 가능한 입력 조합은 4가지뿐입니다.

The first three are: 0+0 = 0 الثلاثة الأولى هي: 0 + 0 = 0 Die ersten drei sind: 0 + 0 = 0 처음 세가지 경우는 0+0=0

1+0 = 1 0+1 = 1 1 + 0 = 1 0 + 1 = 1 1 + 0 = 1 0 + 1 = 1 1+0=0, 0+1=1

Remember that in binary, 1 is the same as true, and 0 is the same as false. تذكر أن في ثنائي، 1 هو صحيح، و0 هو كاذب. Denke daran, dass im Binären 1 dasselbe ist wie "wahr" und 0 ist dasselbe wie "falsch". 이진수에서 기억할 것은 1은 참과 같고 0은 거짓과 같다는 사실입니다.

So this set of inputs exactly matches the boolean logic of an XOR gate, and we can use it as لذلك هذا مجموعة من المدخلات يطابق تماما مع منطق بوابة XOR، ويمكننا استخدامه بمثابة Diese Eingangskombinationen entsprechen also genau der Boole'schen Logik eines XOR-Gatters, und wir können dieses Gatter als 그래서 이 입력 조합은 XOR게이트의 부울 논리와 정확히 일치하고 다음과 같이 사용할 수 있습니다.

our 1-bit adder. عملية جمع لبت واحد. unseren 1-Bit-Addierer verwenden. 1비트 덧셈기로요!

But the fourth input combination, 1 + 1, is a special case. 1 + 1 is 2 (obviously) لكن الجمع بين المدخلات الاربع، 1 + 1، حالة خاصة. 1 + 1 هو 2 (من الواضح) Allerdings ist die vierte Eingabekombination, 1 + 1, offensichtlich ein Sonderfall. 1 + 1 ist 2 그러나 네번째 입력 조합에서 1+1은 좀 특별해요. 1+1은 분명히 2죠.

but there's no 2 digit in binary, so as we talked about last episode, the result is ولكن ليس هناك رقم 2 في الثنائي، وذلك تحدثنا عن الحلقة الأخيرة، والنتيجة هي 0 aber es gibt keine Ziffer 2 im Binären. Wie wir bereits in der letzten Folge besprochen haben, ist das Ergebnis 0 지난 시간에 얘기했듯이 이진법에서 2라는 수는 없기 때문에

0 and the 1 is carried to the next column. So the sum is really 10 in binary. ويتم اخذ 1 الى العمود التالي. وبالتالي فإن المجموع هو حقا 10 في ثنائي. und die 1 wird in die nächste Spalte übernommen. Die Summe ist also in Wirklichkeit 1 0 im Binären. 결과는 0이 되고 1을 다음 열에 받아올림해요. 2진수에서 합계는 실제로 10이 됩니다.

Now, the output of our XOR gate is partially correct - 1 plus 1, outputs 0. الآن، من بوابة XOR لدينا هو الصحيح جزئيا - 1 زائد 1 والناتج 0. Jetzt ist die Ausgabe unseres XOR-Gatters teilweise korrekt - 1 plus 1, gibt 0 aus. 자, XOR게이트의 출력은 부분적으로 정확합니다. 1+1는 0을 출력해요.

But, we need an extra output wire for that carry bit. ولكن، نحن بحاجة إلى سلك الناتج اضافية لذللك البت الزائد. Für das Übertragsbit benötigen wir jedoch einen zusätzlichen Ausgang. 그렇지만 받아올린 비트를 위해 여분의 출력선이 더 필요합니다.

The carry bit is only “true” when the inputs are 1 AND 1, because that's the only البت المضاقف يساوي "حقيقي" عندما تكون المدخلات هي 1 و 1، لأن هذا هو فقط Das Übertragsbit ist nur dann "wahr", wenn die Eingänge 1 UND 1 sind, da dies der einzige Zeitpunkt ist 입력이 1과 1일때만 받아올린 비트는 참이에요. 왜냐하면

time when the result (two) is bigger than 1 bit can store… and conveniently we have الوقت عندما تكون النتيجة (اثنين) أكبر من ما يمكن لبت واحد تخزينه... ومن حظنا لدينا zu dem das Ergebnis (zwei) größer ist als 1 Bit speichern kann .. und glücklicherweise haben wir

a gate for that! An AND gate, which is only true when both inputs are true, so بوابة لذلك! وهي البوابة 'and' ، والتي هي "صحيح" فقط عندما تكون كل من المدخلات "صحيح"، لذلك ein Gatter dafür! Ein UND-Gatter, dessen Ausgang nur wahr ist wenn beide Eingänge wahr sind, also

we'll add that to our circuit too. سنقوم بإضافة ذلك إلى الدارة لدينا أيضا. werden wir auch dieses Gatter zu unserer Schaltung hinzufügen. 그래서 우리는 두 회로를 합할 거에요.

And that's it. This circuit is called a half adder. It's وهذا كل شيء. وهذا ما يسمى دارة 'نصف جامع'. Und das war's. Diese Schaltung wird als Halbaddierer bezeichnet. 그게 다에요. 이 회로는 반가산기라고 합니다.

It's not that complicated - just two logic gates - but let's abstract away even this level انها ليست بهذا التعقيد - اثنين فقط من البوابات المنطقية - ولكن دعونا ننتقل لمستوى اعلا من التجريد Die Schaltung ist nicht besonders kompliziert - nur zwei logische Gatter - aber wir wollen auch in diesem Level 그렇게 복잡하지 않아요. 단지 두개의 논리 게이트죠. 하지만 이 단계에서도 세부적인 추상화를 해 봅시다.

of detail and encapsulate our newly minted half adder as its own component, with two التفاصيل وتغليف بوابتنا النصف المسكوكة حديثا في مكون واحد خاص به، مع اثنين من von Details abstrahieren und unseren neu zusammengebauten Halbaddierer als eigene Komponente mit zwei 새롭게 생겨난 반가산기를 자체 구성 요소로 요약 해 봅시다.

inputs - bits A and B - and two outputs, the sum and the carry bits. المدخلات - بت A و B - واثنين من النواتج، جمعهما و البت المضاف. Eingängen - A und B - und zwei Ausgänge, die Summe und das Übertragsbit, betrachten. A와 B비트의 두가지 입력과 합계와 캐리비트(받아올림) 두개의 출력으로 말이죠.

This takes us to another level of abstraction… heh… I feel like I say that a lot. هذا يأخذنا إلى مستوى آخر من التجريد ... هيه ... أشعر وكأنني أقول هذا كثيرا. Dies bringt uns auf eine andere Abstraktionsebene ... heh ... ich habe das Gefühl, dass ich das oft sage. 우리의 다른 추상화 수준으로 이끌어 줍니다. 흠.. 제가 이 말을 좀 많이 한 것 같군요.

I wonder if this is going to become a thing. وأتساءل عما إذا كان هذا سوف يصبح شيئا. Ich frage mich, ob das zu einer Gewohnheit werden wird... 아무것도 아닌게 될까 모르겠네요.

Anyway, If you want to add more than 1 + 1 على أي حال، إذا كنت ترغب في إضافة أكثر من 1 + 1 Wie auch immer, wenn Sie mehr als 1 + 1 hinzufügen möchten 어쨋든, 만약 1+1보다 큰 덧셈을 한다면

we're going to need a “Full Adder.” That half-adder left us with a carry bit as output. ونحن في طريقنا في حاجة إلى "جامع كامل". وهذا نصف جامع -يترك لنا بت مضاف كإخراج. brauchen wir einen "Volladdierer". Der Halbaddierer hat uns ein Übertragsbit als Ausgang hinterlassen. "전가산기"가 필요해요. 반가산기는 출력으로 캐리비트를 남겼어요.

That means that when we move on to the next column in a multi-column addition, وهذا يعني أنه عندما ننتقل إلى العمود التالي في عملية جمع بأعمدة عدة، Das heißt, wenn wir uns die nächste Spalte in einer Multiplikation mit mehreren Spalten ansehen 다중 열 추가 계산에서 다음 열로 넘어갈 때

and every column after that, we are going to have to add three bits together, no two. وكل عمود بعد ذلك، ونحن نتجه لإضافة ثلاثة أجزاء معا، لا اثنين. und jede Spalte links davon müssen wir drei Bits addieren, nicht nur zwei. 모든 열 이후에, 우리는 2비트가 아닌 3비트를 더해야 해요.

A full adder is a bit more complicated - it الجمع الكامل هي معقدة أكثر قليلا - انها Ein Volladdierer ist etwas komplizierter - er 전가산기는 좀 더 복잡합니다.

takes three bits as inputs: A, B and C. So the maximum possible input is 1 + 1 + 1, تأخذ ثلاثة أجزاء كمدخلات: A، B و C. لذلك الحد الأقصى للمدخلات الممكن هو 1 + 1 + 1، benötigt drei Bits als Eingabe: A, B und C. Das bedeutet die maximal mögliche Eingabe ist 1 + 1 + 1, A와 B, C 세개의 비트를 입력받을 수 있기 때문에

which equals 1 carry out 1, so we still only need two output wires: sum and carry. أي ما يعادل 1 وواحد مضاف، لذلك فإننا لا نزال تحتاج فقط سلكي إخراج : المجموع والمضاف. was gleich 1, mit dem Übertrag 1 ist, wir brauchen also wie bisher zwei Ausgaben: sum und carry (Übertrag). 1을 올려받고 여전히 두개의 출력선이 필요해요 : 합계와 받아올림

We can build a full adder using half adders. To do this, we use a half adder to add A plus B نتمكن من بناء الجامع الكامل باستخدام الجامع نصفي. للقيام بذلك، نحن سنستخدم "نصف الجامع" لإضافة َ A زائد B Wir können einen Volladdierer aus Halbaddierern aufbauen. Dazu verwenden wir einen Halbaddierer, um A und B zu addieren 우리는 반가산기를 이용해서 전가산기를 만들 수 있어요.

just like before – but then feed that result and input C into a second half adder. تماما مثل قبل - ولكن بعد ذلك نستعمل الناتج والمدخل C إلى الجامع نصفي الثاني. genau wie vorhin - aber dann leiten wird das Ergebnis und C als Eingaben in einen zweiten Halbaddierer weiter.

Lastly, we need a OR gate to check if either one of the carry bits was true. وأخيرا، نحن بحاجة إلى بوابة OR للتحقق مما إذا كان أي واحد من البتات المضافة صحيح. Zuletzt benötigen wir ein ODER-Gatter, um zu überprüfen, ob eines der Übertragbits wahr ist. 마지막으로, 우리는 캐리비트 중 하나가 참인지 확인하기 위해서 OR게이트가 필요해요.

That's it, we just made a full adder! Again,we can go up a level of abstraction and wrap هذا كل شيء، ونحن اتممنا للتو الجامع الكلي ! مرة أخرى، يمكننا أن نذهب لأعلى مستوى من التجريد و يتم إحتوائه Das war's, wir haben soeben einen Volladdierer erstellt! Auch hier können wir eine Stufe in der Abstraktion aufsteigen 그게 전부에요. 바로 지금 우리는 방금 전가산기를 만들었어요~!

up this full adder as its own component. It takes three inputs, adds them, and outputs هذا الجامع الكامل في مكون الخاصة به. يأخذ ثلاثة مداخل، يجمعها، وينتج und diesen Volladdierer als eine eigene Komponente betrachten. Er nimmt drei Eingaben, addiert sie und gibt 전가산기를 자체 구성 요소로 사용할 수 있습니다.

the sum and the carry, if there is one. مجموع , ومضاف إذا كان هناك واحد. die Summe und den Übertrag aus, falls vorhanden. 만약 1이 있다면 합계와 캐리비트를 더하면 되요.

Armed with our new components, we can now build a circuit that takes two, 8-bit numbers مسلحين بعناصرنا الجديدة، يمكننا الآن بناء الدارة التي تاخذ رقمين مكونين من 8 بتات Mit unseren neuen Komponenten können wir jetzt eine Schaltung aufbauen, die zwei 8-Bit-Zahlen 새로운 무기로 무장하고, 8비트 숫자가 두개를 결합해서 회로를 만들어 봅시다.

– Let's call them A and B – and adds them together. - دعنا نسميها a و b - ونجمعهما. - Nennen wir sie A und B - als Eingabe akzeptiert sie dann addiert. 이 숫자를 A와 B라고 부르고 그들을 더해요.

Let's start with the very first bit of دعونا نبدأ مع البت الأول من Beginnen wir mit dem allerersten Bit von A와 B라고 하는 첫번째 비트부터 시작해봅시다.

A and B, which we'll call A0 and B0. At this point, there is no carry bit to deal ا A و B، ونحن سوف ندعوهم A0 وB0. في هذه النقطة، ليس هناك مضاف للتعامل معه A und B, die wir als A0 und B0 bezeichnen. Zunächst muss hier kein Carry-Bit berücksichtigt werden,

with, because this is our first addition. So we can use our half adder to add these لأن هذا هو بالإضافة الأولى بالنسبة لنا. حتى نتمكن من استخدام نصف الأفعى لدينا لإضافة هذه weil dies unsere erste Addition ist. Also können wir unseren Halbaddierer verwenden, um diese 왜냐하면 첫번째 덧셈이기 때문이죠. 그래서 우리는 두개를 더하는데 반가산기를 씁니다.

two bits together. The output is sum0. Now we want to add A1 and B1 together. بت اثنين معا. الإخراج هو sum0. الآن نريد أن نضيف A1 و B1 معا. zwei Bits zu addieren. Die Ausgabe ist sum0. Nun addieren wir A1 und B1.

It's possible there was a carry from the previous addition of A0 and B0, so this time we need فمن الممكن انه كان هناك مضاف من العملية السابقة من A0 وB0، حتى هذا الوقت نحن بحاجة Es ist möglich, dass es einen Übertrag von der vorherigen Addition von A0 und B0 gab, also brauchen wir diesmal 이전의 A0과 B0의 합에서 캐리비트가 나올 가능성이 있기 때문에

to use a full adder that also inputs the carry bit. We output this result as sum1. لاستخدام الجامع الكامل الذي أيضا يستخدم المضاف كمدخلات . نحن نخرج هذه النتيجة كما sum1. einen Volladdierer, der auch den Übertrag addiert. Wir geben dieses Ergebnis als sum1 aus.

Then, we take any carry from this full adder, and run it into the next full adder that handles ثم، ونحن نأخذ أي مضاف من هذا الجامع الكامل، وتشغيله في الجامع الكامل المقبل الذي يعالج Dann nehmen wir den Übertrag von diesem Volladdierer und führen ihn in den nächsten Volladdierer, der 그리고 전가산기에서 캐리비트들을 얻어서 A2와 B2를 처리하는 다음 전가산기에 그것을 집어넣어습니다.

A2 and B2. And we just keep doing this in a big chain until all 8 bits have been added. ،A2 و B2. ونحن فقط نعيد القيام بذلك في سلسلة كبيرة حتى كل 8 بتات تتم اضافتها. A2 und B2 addiert. Und wir machen das immer so weiter, bis alle 8 Bits hinzugefügt wurden.

Notice how the carry bits ripple forward to each subsequent adder. For this reason, لاحظ كيف البت المضاف يتموج للامام لكل فرع جمع و لهذا السبب Beachten Sie, wie die Übertragsbits nach vorne "rieseln" (ripple) an jeden nachfolgenden Addierer. Aus diesem Grund

this is called an 8-bit ripple carry adder. Notice how our last full adder has a carry out. يسمى 8-bit ripple carry adder . لاحظ كيف أن الجامع الكامل له مضاف كمخرجات. wird er als 8-Bit-Carry--Ripple-Addierer bezeichnet. Sie sehen auch einen Carry-Bit-Ausgang an dem letzten Volladierer.

If there is a carry into the 9th bit, it means the sum of the two numbers is too large to fit into 8-bits. إذا كان هناك مضاف إلى بت 9، فهذا يعني أن مجموع الرقمين كبير جدا ليتناسب مع 8 بت. Wenn es einen Übertrag in das 9. Bit gibt, bedeutet dies, dass die Summe der beiden Zahlen zu groß ist, um in 8 Bits zu passen.

This is called an overflow. وهذا ما يسمى تجاوز. Dies wird als Überlauf bezeichnet. 이것을 오버플로라고 부릅니다.

In general, an overflow occurs when the result of an addition is too large to be represented by the number of bits you are using. بشكل عام، يحدث تجاوز عندما تكون نتيجة الجمع كبيرة جدا لكي يتم تمثيلها من قبل عدد البتات الذي تستخدمه. Im Allgemeinen tritt ein "Überlauf" auf, wenn das Ergebnis einer Addition zu groß ist, um durch die Anzahl der verwendeten Bits dargestellt zu werden. 일반적으로, 우리가 사용중인 비트수보다 덧셈의 결과가 더 커서 표현할 수 없을 때 오버플로가 발생해요.

This can usually cause errors and unexpected behavior. وهذا يمكن أن يسبب عادة الأخطاء والسلوك غير متوقع. Dies kann zu Fehlern und unerwartetem Verhalten führen. 보통 에러가 나거나 예상치 못한 동작이 발생해요.

Famously, the original PacMan arcade game used 8 bits to keep track of what level you were on. بشكل مشهور، استخدمت لعبة بكمن الممرات الأصلي 8 بت إلى تتبع ما المستوى الذي كنا على. Das berühmte ursprüngliche PacMan-Arcade-Spiel hat 8 Bit verwendet, um festzustellen, auf welchem ​​Level Sie sich befinden. 유명한 원조 팩맨 아케이드 게임은 8비트를 사용해서 여러분이 있는 레벨을 추적하죠.

This meant that if you made it past level 255 – the largest number storablein 8 bits – وهذا يعني أنه إذا تجاوزة المستوى 255 - أكبر عدد يمكن تخزينه في 8 بت - Dies bedeutet, dass, wenn Sie es nach Level 255 geschafft haben - die größte in 8 Bits speicherbare Zahl - 레벨을 255을 지나서 8비트 안에서 저장할 수 있는 최대 레벨인 256까지 간다면

to level 256, the ALU overflowed. إلى مستوى 256، فاضت على ALU. ist die ALU beim Übergang in Level 256 übergelaufen.

This caused a bunch of errors and glitches making the level unbeatable. وادى ذلك الى مجموعة من الأخطاء والثغرات مما يجعل مستوى الذي لا يهزم. Dies verursachte eine Reihe von Fehlern und Störungen, die das Level unlösbar machten. 이것은 매우 많은 오류와 결함을 발생시켜 절대 이길수 없는 단계를 만들어내죠..

The bug became a rite of passage for the greatest PacMan players. أصبح علة طقوس العبور لأعظم لاعبي بكمن. Der Fehler wurde für die größten PacMan-Spieler zu einer nie gelösten Herausforderung. 버그는 가장 훌륭한 팩맨 플레이어들의 통과 의례가 되었습니다.

So if we want to avoid overflows, we can extend our circuit with more full adders, allowing لذلك إذا أردنا تجنب overflow ، نحن يمكن أن نمدد الدائرة لدينا مع المزيد من الجامع الكامل، مما يسمح Wenn wir also Überläufe vermeiden möchten, können wir unsere Schaltung mit mehr Volladdierern erweitern, 오버플로를 피하고 싶다면

us to add 16 or 32 bit numbers. This makes overflows less likely to happen, but at the لنا لإضافة 16 أو 32 بتات. وهذا يجعل من overflow أقل احتمالا أن يحدث، ولكن في um 16 oder 32 Bit Zahlen zu addieren. Dadurch ist es weniger wahrscheinlich, dass Überläufe auftreten, 16비트나 32비트 숫자까지 가능하게 할 수 있도록요.

expense of more gates. An additional downside is that it takes a little bit of time for يستهلك المزيد من البوابات. على الجانب السلبي من الامر هو انه يستغرق قليلا من الوقت الزائد aber wir haben höhere Kosten für mehr Gatter. Ein weiterer Nachteil ist, dass es einige Zeit braucht bis

each of the carries to ripple forward. لكل من يحمل لتموج للأمام. die Übertragsbits "durch die Schaltung nach vorne gerieselt" (ripple) sind.

Admittedly, not very much time, electrons move pretty fast, so we're talking about billionths of a second, وباعتراف الجميع، وليس وقتا طويلا جدا، تتحرك الإلكترونات سريعة جدا، لذلك نحن نتحدث عن البليون من الثانية، Zugegeben, nicht sehr viel Zeit, Elektronen bewegen sich ziemlich schnell, also reden wir über Milliardstelsekunden. 인정하자면 긴 시간은 아니에요 전자는 꽤 빨리 움직이죠

but that's enough to make a difference in today's fast computers. ولكن هذا يكفي لإحداث فرق في أجهزة الكمبيوتر سريع اليوم. Aber das ist genug, um einen Unterschied in den heutigen schnellen Computern zu machen. 하지만 오늘날의 빠른 컴퓨터에 변화를 주기에는 충분해요.

For this reason, modern computers use a slightly different adding circuit called a ‘carry-look-ahead' adder لهذا السبب، وتستخدم أجهزة الكمبيوتر الحديثة دارة جمع مختلفة قليلا تسمى ‘carry-look-ahead' adder Aus diesem Grund verwenden moderne Computer eine etwas andere Addierschaltung, die als "Carry-Look-Ahead" -Addierer bezeichnet wird 이러한 이유로, 현대 컴퓨터는" 올림수 예견 가산기"라는 약간 다른 회로를 사용해요.

which is faster, but ultimately does exactly the same thing-- adds binary numbers. وهو أسرع، ولكن في النهاية يقوم بنفس الشيئ تماما يضيف الأرقام الثنائية. Die ist schneller, macht aber letztendlich genau das Gleiche - sie addiert Binärzahlen. 이건 더 빠르고, 궁극적으로 정확하게 이진수를 더하는 일을 똑같이 해요.

The ALU's arithmetic unit also has circuits for other math operations وحدة حسابية للALU أيضا لديها الدوائر لعمليات الرياضيات الأخرى Die Recheneinheit der ALU hat auch Schaltkreise für andere mathematische Operationen ALU의 산술 유닛은 다른 수학 연산을 하는 회로를 갖고 있는데

and in general these 8 operations are always supported. وبشكل عام يتم دعم هذه العمليات 8 دائما. , im Allgemeinen werden diese 8 Operationen immer unterstützt. 일반적으로 8가지가 항상 지원됩니다.

And like our adder, these other operations are built from individual logic gates. ومثل الجمع لدينا، بنيت هذه العمليات الأخرى من البوابات المنطقية الفردية. Und wie unser Addierer sind diese anderen Operationen aus einzelnen Logikgattern aufgebaut. 그리고 우리가 배운 가산기처럼 이러한 다른 연산들은 개별 논리 게이트로 만들어졌어요.

Interestingly, you may have noticed that there are no multiply and divide operations. ومن المثير للاهتمام، كنت قد لاحظت أنه لا توجد عمليات الضرب والقسمة. Interessanterweise haben Sie vielleicht bemerkt, dass es keine Multiplikations- und Divisionsoperation gibt. 흥미로운것은,

That's because simple ALUs don't have a circuit for this, and instead just perform a series of additions. ذلك لأنه ببساطة ALUs لم تملك دائرة لهذا، وبدلا من ذلك تقوم بإجراء سلسلة من الإضافات. Das liegt daran, dass einfache ALUs keine Schaltung dafür haben und stattdessen nur eine Reihe von Additionen durchführen. 단순한 ALU는 이를 위한 회로를 갖고 지 않기 때문이에요. 대신 일련의 추가 작업을 수행하죠.

Let's say you want to multiply 12 by 5. دعونا نقول انك تريد مضاعفة 12 بنسبة 5. Angenommen, Sie möchten 12 und 5 multiplizieren. 여러분이 12 곱하기 5를 한다고 가정해봅시다.

That's the same thing as adding 12 to itself 5 times. So it would take 5 passes through هذا هو الشيء نفسه مع إضافة 12 لنفسه 5 مرات. لذلك سيستغرق 5 مرات من خلال Das ist das Gleiche wie 5 mal 12 auf sich selbst addiert. Es würde also 5 Durchgänge für 이건 12를 5번 더하는것과 똑같은 거에요.

the ALU to do this one multiplication. And this is how many simple processors, ـALU للقيام بذلك الضرب واحدة. و هذه هي طريقة العديد من المعالجات البسيطة، die ALU dauern diese eine Multiplikation durchzuführen. Und auf diese Weise führen viele einfache Prozessoren

like those in your thermostat, TV remote, and microwave, do multiplication. مثل تلك الموجودة في الترموستات، التلفزيون عن بعد، والميكروويف،تقوم بالضرب. zu finden z.b. in Ihrem Heizungs-Thermostat, Ihrer TV-Fernbedienung und Ihrer Mikrowelle eine Multiplikation durch. 온도 조절 장치, TV리모콘, 전자레인지에 있는 프로세서들의 이렇게 곱셈을 합니다.

It's slow, but it gets the job done. انها بطيئة، لكنها تقوم بالمهمة . Es ist langsam, aber die Arbeit wird erledigt. 느리긴 하지만 일은 잘 해요.

However, fancier processors, like those in your laptop or smartphone, ومع ذلك، المعالجات ، مثل تلك الموجودة في جهاز الكمبيوتر المحمول أو الهاتف الذكي، Anspruchsvollere Prozessoren, wie die Ihres Laptops oder Smartphones 하지만 스마트폰이나 노트북에 있는 고급 프로세서들은

have arithmetic units with dedicated circuits for multiplication. لديها وحدات حسابية مع الدوائر المخصصة للضرب. haben arithmetische Einheiten mit dedizierten Schaltungen für die Multiplikation. 곱셈 전용 회로가 있는 산술 유닛을 갖고 있습니다.

And as you might expect, the circuit is more complicated than addition -- there's no وكما هو متوقع، الدارة هي أكثر تعقيدا من الجمع - لا يوجد Und wie zu erwarten ist, ist die Schaltung komplizierter als eine Addition - es gibt keine 여러분이 예상하듯, 이 회로는덧셈보다 더 복잡해요.

magic, it just takes a lot more logic gates – which is why less expensive processors سحر، والامر يتطلب الكثير من البوابات المنطقية - وهذا هو السبب لمذا المعالجات الأقل تكلفة Magie, es braucht einfach viel mehr logische Gatter - weshalb kostengünstigere Prozessoren

don't have this feature. لم يكن لديها هذه الميزة. diese Operation nicht anbieten können.

Ok, let's move on to the other half of the ALU: the Logic Unit. حسنا، دعونا ننتقل إلى النصف الآخر من ALU: وحدة المنطق. Ok, fahren wir mit der anderen Hälfte der ALU fort: der Logikeinheit. 좋아요. ALU의 다른 절반으로 이동해보죠.

Instead of arithmetic operations, the Logic Unit performs… well... بدلا من عمليات الحساب، وحدة المنطق ينفذ ... حسنا ... Anstelle von Arithmetischen Operationen führt die Logikeinheit ... klar ... 산술 연산 대신, 논리 유닛은.. 음,

logical operations, like AND, OR and NOT, which we've talked about previously. العمليات المنطقية، مثل AND، OR NOT والذي تحدثنا عنها سابقا. logische Operationen wie AND, OR und NOT durch, über die haben wir ja bereits gesprochen. 전에 얘기했던 AND, OR, NOT과 같은 논리 연산을 하죠.

It also performs simple numerical tests, like checking if a number is negative. كما تقوم بالاختبارات العددية البسيطة، مثل فحص ما إذا كان الرقم سالبا. Sie führt auch einfache numerische Tests durch, z. B. das Überprüfen, ob eine Zahl negativ ist. 또 어떤 숫자가 음수인지 확인하는 것과 같은 간단한 숫자 테스트를 하기도 해요.

For example, here's a circuit that tests if the output of the ALU is zero. على سبيل المثال، وهنا الدارة التي تفحص ان كانت نتيجة ALU هي صفر Hier ist zum Beispiel eine Schaltung, die testet ob der Ausgang der ALU Null ist. 예를 들어, 여기 ALU의 출력이 0인지를 확인하는 회로를 보시죠.

It does this using a bunch of OR gates to see if any of the bits are 1. وهي تفعل ذلك باستخدام مجموعة من بوابات OR لمعرفة ما إذا كان أي من البتات هي 1. Dies geschieht mit einer Reihe von ODER-Gattern, um festzustellen, ob eines der Bits 1 ist. 이 회로는 많은 OR게이트를 사용해서 비트중 하나가 1인지 확인해요.

Even if one single bit is 1, we know the number can't be zero and then we use a final NOT gate to flip this حتى لو واحد بت هو 1، ونحن نعلم أن العدد لا يمكن أن يكون صفرا ثم نستخدم NOT لعكس Selbst wenn ein einzelnes Bit 1 ist, wissen wir, dass die Zahl nicht Null sein kann, und verwenden dann ein abschliessendes NICHT-Gatter, um diesen Wert zu negieren, 1인 비트가 하나일때조차, 그 숫자는 0이 될 수 없다는걸 우리는 알고있고

input so the output is 1 only if the input number is 0. المدخلات وبالتالي فإن الناتج هو 1 فقط إذا كان الرقم المدخل هو 0. so dass der Ausgang nur 1 ist, wenn der Wert am Eingang 0 ist.

So that's a high level overview of what makes up an ALU. We even built several of ولهذا لمحة من مستوى عال من ما تتكون ALU. حتى اننا بنينا العديد من Das ist also ein umfassender Überblick darüber, was eine ALU ausmacht. Wir haben sogar mehrere 이건 ALU를 구성하는 요소에 대한 높은 수준의 개요입니다.

the main components from scratch, like our ripple adder. المكونات الرئيسية من نقطة الصفر، لدينا مثل ripple adder. der Hauptkomponenten von Grund auf neu gebaut, wie z.B. unseren Ripple-Addierer.

As you saw, it's just a big bunch of logic gates connected in clever ways. كما رأيتم، انها مجرد حفنة كبيرة من البوابات المنطقية مرتبطة بطرق ذكية. Wie Sie gesehen haben, handelt es sich nur um eine Große Anzahl von Logikgattern, die auf clevere Weise miteinander verbunden sind. 여러분이 본 바와 같이, 그것은 똑똑하게 연결 된 많은 논리게이트일 뿐입니다.

Which brings us back to that ALU you admired so much at the beginning of the episode. وهو ما يقودنا إلى ALU التي كنت معجبة بها كثيرا في بداية الحلقة. Das bringt uns zurück zu der ALU, die wir zu Beginn der Episode so sehr bewundert haben. 강의를 시작할때 우리가 매우 감탄했던 ALU에게 다시 되돌아갑시다.

The Intel 74181. إنتل 74181. Die Intel 74181. 인텔 74181

Unlike the 8-bit ALU we made today, the 74181 could only handle 4-bit inputs, وخلافا لل 8 بت ALU التي قطعناها على أنفسنا اليوم، 74181 يمكنها فقط معالجة مدخلات 4 بت، Anders als die 8-Bit-ALU, die wir heute hergestellt haben, konnte die 74181 nur 4-Bit-Eingänge verarbeiten. 오늘 배운 8비트 ALU와는 다르게 74181은 4비트의 입력만 처리할 수 있었어요.

which means YOU BUILT AN ALU THAT'S LIKE وهو ما يعني انك بنيت ALU افضل was bedeutet, dass DU EINE ALU GEBAUT HAST, DIE 그건 여러분이 완전 유명하고 대단한 것보다

TWICE AS GOOD AS THAT SUPER FAMOUS ONE. WITH YOUR MIND! Well.. sort of. مرتين من اشهر واحدة. مع عقلك! حسنا نوعا ما. ZWEIMAL SO GUT WIE DIESE SUPER BERÜHMTE ALU IST. MIT DEINEM VERSTAND! Naja, so ungefähr. 두배나 더 좋은 ALU를 여러분 마음속에 만들었다는 거죠!

We didn't build the whole thing… but you get the idea. نحن لم نبني كل شيء ... ولكن حصلنا على هذه الفكرة. Wir haben nicht alles gebaut ... aber Du hast das Prinzip verstanden. 전체를 다 짓진 않았지만 여러분은 아이디어는 건졌어요.

The 74181 used about 70 logic gates, and it couldn't multiply or divide. على 74181 تستخدم نحو 70 من البوابات المنطقية، وأنه لا يمكنها الضرب أو القسمة. Die 74181 verwendete ungefähr 70 Logikgatter und konnte weder multiplizieren noch dividieren. 74181은 약 70개의 논리게이트를 사용했고 그건 곱셈과 나눗셈은 할 수 없었어요.

But it was a huge step forward in miniaturization, opening the doors to more capable and less expensive computers. ولكنه كان خطوة كبيرة إلى الأمام في التصغير، وفتح الأبواب أمام أجهزة الكمبيوتر أكثر قدرة وأقل تكلفة. Aber sie war ein großer Fortschritt in der Miniaturisierung, der die Türen zu leistungsfähigeren und kostengünstigeren Computern öffnete. 하지만 소형화하는 데에 큰 발걸음 이 됬고, 더 싸고 유능한 컴퓨터로의 문을 열어주었어요.

This 4-bit ALU circuit is already a lot to take in, هذه الدائرة ALU... ا4 بت بالفعل الكثير لتأخذ بعين الاعتبار، Diese 4-Bit-ALU-Schaltung braucht bereits eine Menge Gatter, 이 4비트 ALU 회로는 이미 많이 도입되었지만

but our 8-bit ALU would require hundreds of logic gates to fully build and engineers ولكن لدينا ALU 8 بت سيتطلب مئات البوابات المنطقية لبنائها بالكامل والمهندسين aber für unsere 8-Bit-ALU wären Hunderte von Logikgattern erforderlich, um sie vollständig zu erstellen und die Ingenieure 8비트 ALU는 완전히 구축하려면 수백 개의 논리게이트가 필요했어요.

don't want to see all that complexity when using an ALU, so they came up with a special لا يريدون أن نرى كل هذا التعقيد عند استخدام ALU، ولذلك جاء مع رمز möchten nicht all diese Komplexität sehen, wenn Sie eine ALU verwenden, deshalb haben sie sich ein spezielles Symbol ausgedacht, 그리고 기술자들은 ALU를 사용할 때 이 모든 복잡성을 다 보고싶지도 않았고

symbol to wrap it all up, which looks like a big ‘V'. Just another level of abstraction! خاص لتغطية كل شيء، والتي تبدو مثل 'V' كبير. ...مجرد مستوى آخر من التجريد! um alles zusammenzufassen, es sieht aus wie wie ein großes "V". Und wir haben einen weiteren Abstraktionslevel erreicht!

Our 8-bit ALU has two inputs, A and B, each with 8 bits. We also need a way to specify what operation the ALU should perform, لدينا 8 بت ALU لديه اثنين من المدخلات، A و B، ولكل منها 8 بت. ونحن أيضا بحاجة إلى وسيلة لتحديد ما ينبغي للALU القيام بها، Unsere 8-Bit-ALU verfügt über zwei Eingänge A und B mit jeweils 8 Bits. Wir brauchen auch eine Möglichkeit anzugeben, welche Operation die ALU ausführen soll, 8비트 ALU는 A와 B 두개의 각 8비트짜리 입력이 있죠.

for example, addition or subtraction. على سبيل المثال، الجمع أو الطرح. Zum Beispiel Addition oder Subtraktion.

For that, we use a 4-bit operation code. لذلك، ونحن نستخدم رمز التشغيل 4-بت. Dafür verwenden wir einen 4-Bit-Operationscode. 이를 위해 4비트 연산 코드를 사용합니다.

We'll talk about this more in a later episode, but in brief, 1000 might be the command سنتحدث عن ذلك أكثر في حلقة لاحقة، ولكن باختصار، 1000 قد يكون الأمر Wir werden in einer späteren Folge mehr darüber sprechen, aber in Kürze: 1000 könnte der Befehl 다음 강의에서 더 이야기 하겠지만 간단히 말하면,

to add, while 1100 is the command for subtract. Basically, the operation code tells the ALU لإضافة، في حين أن 1100 هو الأمر لطرح. في الأساس، ورمز عملية يخبرALU zum Addieren sein, und 1100 der Befehl zum Subtrahieren. Grundsätzlich teilt der Operationscode der ALU mit

what operation to perform. And the result of that operation on inputs A and B is an 8-bit output. ما العمل لأدائه. ونتيجة لتلك العملية على المدخلات A و B هي ناتج 8 بت. welche Operation sie ausführen soll. Das Ergebnis dieser Operation ist eine 8-Bit-Zahl am Ausgang.

ALUs also output a series of Flags, which are 1-bit outputs for particular states and statuses. اALUs أيضا تقوم إخراج سلسلة من الأعلام، والتي هي مخرجات 1 بت للاوضاع والحالات الخاصة. ALUs geben auch eine Reihe von sogenannten Flags aus, dass sind 1-Bit-Ausgaben für bestimmte Zustände in der ALU ALU는 또한 특정 상태나 상황들에 대해서 1비트로 일련의 신호를 출력하기도 해요.

For example, if we subtract two numbers, and the result is 0, our zero-testing circuit, the one we made earlier, على سبيل المثال، إذا كان لنا أن طرح رقمين، والنتيجة هي 0، لدينا دائرة لاختبار الصفر، واحد التي صنعناها في وقت سابق، Wenn wir zum Beispiel zwei Zahlen subtrahieren und das Ergebnis 0 ist, setzt unsere Null-Testschaltung die, die wir bereits gebaut haben 예를 들어서요, 만약 우리가 두개의 수를 뺐는데 결과가 0이라면

sets the Zero Flag to True (1). This is useful if we are trying to determine if two numbers are are equal. يصبح "Zero Flag" إلى True. وهذا مفيد إذا نحن نحاول تحديد ما إذا كان رقمين متساويان. das Zero Flag auf True (1). Dass ist nützlich, wenn wir feststellen wollen ob zwei Zahlen gleich sind. 0 깃발을 1로 놓습니다.

If we wanted to test if A was less than B, إذا كنا نريد لاختبار إذا كان A أقل من B، Wenn wir testen wollten, ob A kleiner als B ist, A가 B보다 작은지를 테스트하고 싶다면,

we can use the ALU to calculate A subtract B and look to see if the Negative Flag was set to true. يمكننا استخدام ALU لحساب A طرح B والبحث لمعرفة ما إذا تم تعيين "Negative Flag" إلى true. können wir die ALU benutzen, um A minus B zu berechnen und dann zu sehen, ob das negative Flag auf wahr gesetzt wurde. ALU를 사용해서 A에서 B를 빼고 음의 신호가 참인지를 살펴보면 됩니다.

If it was, we know that A was smaller than B. إذا كان، سنعلم ان A اصغر من B. Wenn ja, wissen wir, dass A kleiner als B war. 만약 참이라면, A가 B보다 작다는걸 알 수 있어요.

And finally, there's also a wire attached to the carry out on the adder we built, وأخيرا، هناك أيضا سلك مربوط بالمضاف الخاص بالجامع الذي صنعناه Und schließlich gibt es noch eine Leitung, die mit dem Carry-Ausgang des von uns gebauten Addierers verbunden ist. 그리고 마침내, 우리가 만든 가산기를 수행하기 위해 부여된 선도 있습니다.

so if there is an overflow, we'll know about it. This is called the Overflow Flag. حتى إذا كان هناك تجاوز، سنعرف عن ذلك. وهذا ما يسمى''Overflow Flag". Wenn es einen Überlauf gibt, werden wir also jetzt darüber Bescheid wissen. Das wird als Überlauf-Flag bezeichnet. 오버플로가 있다면, 우린 이걸 오버플로 신호라고 부른다는걸 알거에요.

Fancier ALUs will have more flags, but these three flags are universal and frequently used. الاكثز تطورا من ALUs لديهم المزيد من flags، ولكن هذه "flags" الثلاث هي حقوق عالمية وتستخدم في كثير من الأحيان. Aufwendigere ALUs haben mehr Flags, aber diese drei Flags sind universell und werden häufig verwendet. 고급 ALU는 더 많은 신호들을 갖고 있을 것이지만, 이 세가지 신호들은 보편적이고 자주 사용됩니다.

In fact, we'll be using them soon in a future episode. في الواقع، سنستخدمها قريبا في الحلقة القادمة. Tatsächlich werden wir sie bald in einer zukünftigen Folge verwenden. 사실은, 그 신호들을 다음에 할 강의에 곧 사용할 거에요.

So now you know how your computer does all its basic mathematical operations digitally حتى الآن تعلمون كيف يفعل جهاز الكمبيوتر الخاص بك عملياته الحسابية الأساسية رقميا Jetzt wissen Sie also, wie Ihr Computer alle grundlegenden mathematischen Operationen digital ausführt 이제 여러분은 컴퓨터가 기본적인 수학 연산을 디지털로 수행하는 방법을 알았어요.

with no gears or levers required. مع عدم وجود التروس أو العتلات المطلوبة. ohne Getriebe oder Hebel! 기어나 레버가 없이도요.

We're going to use this ALU when we construct our CPU two episodes from now. ونحن في طريقنا لاستخدام هذه ALU عندما نبني وحدة المعالجة المركزية حلقتين من الآن. Wir werden diese ALU verwenden, wenn wir in der übernächsten Folge unsere CPU erstellen. 우리는 이 ALU를 CPU를 구성하기 위해 이후 두 개의 강의에서 사용할 겁니다.

But before that, our computer is going to need some memory! We'll talk about that next week. ولكن قبل ذلك، جهاز الكمبيوتر الخاص بنا سوف تحتاج الى بعض الذاكرة! سنتحدث عن ذلك في الاسبوع المقبل. Aber vorher braucht unser Computer Speicher! Wir werden nächste Woche darüber reden. 그렇지만 그 전에 우리의 컴퓨터는 메모리가 필요해요.