Inside your computer - Bettina Bair

3,121,034 views ใƒป 2013-07-01

TED-Ed


ืื ื ืœื—ืฅ ืคืขืžื™ื™ื ืขืœ ื”ื›ืชื•ื‘ื™ื•ืช ื‘ืื ื’ืœื™ืช ืœืžื˜ื” ื›ื“ื™ ืœื”ืคืขื™ืœ ืืช ื”ืกืจื˜ื•ืŸ.

ืชืจื’ื•ื: Ido Dekkers ืขืจื™ื›ื”: benyamin zinshtein
00:15
Do you remember when you first realized
0
15353
1861
ืืชื ื–ื•ื›ืจื™ื ื›ืฉื”ื‘ื ืชื ื‘ืคืขื ื”ืจืืฉื•ื ื”
00:17
that your computer was more
1
17238
1397
ืฉื”ืžื—ืฉื‘ ืฉืœื›ื ื”ื™ื” ื™ื•ืชืจ
00:18
than just a monitor and keyboard?
2
18659
2059
ืžืžืกืš ื•ืžืงืœื“ืช?
00:20
That between the mouse click and the video playing,
3
20742
2559
ืฉื‘ื™ืŸ ื”ืœื—ื™ืฆื” ืขืœ ื”ืขื›ื‘ืจ ื•ื”ืกืจื˜ื•ืŸ ื”ืžืชื ื’ืŸ,
00:23
there was something that captured your intention,
4
23325
2334
ื”ื™ื” ืžืฉื”ื• ืฉืœื›ื“ ืืช ื”ื›ื•ื•ื ื•ืช ืฉืœื›ื,
00:25
understood it,
5
25683
721
ื”ื‘ื™ืŸ ืื•ืชืŸ,
00:26
and made it real?
6
26428
1452
ื•ื”ืคืš ืื•ืชืŸ ืœืžืฆื™ืื•ืช?
00:28
What is that something?
7
28650
1596
ืžื” ื–ื” ื”ื“ื‘ืจ ื”ื–ื”?
00:30
Is it gremlins?
8
30270
1713
ื”ืื ื–ื” ื’ืจืžืœื™ื ื™ื?
00:32
Let's imagine that we can shrink down
9
32007
1762
ื‘ื•ืื• ื ื“ืžื™ื™ืŸ ืฉืื ื—ื ื• ื™ื›ื•ืœื™ื ืœื”ืชื›ื•ื•ืฅ
00:33
to the size of an electron
10
33793
1324
ืœื’ื•ื“ืœ ืฉืœ ืืœืงื˜ืจื•ืŸ
00:35
and inject ourselves into a click of a mouse.
11
35141
2729
ื•ืœื”ื–ืจื™ืง ืืช ืขืฆืžื ื• ืœืชื•ืš ืœื—ื™ืฆืช ืขื›ื‘ืจ.
00:37
If you took your mouse apart,
12
37894
1613
ืื ืชืคืจืงื• ืืช ื”ืขื›ื‘ืจ,
00:39
you'd see that it's really a very simple machine.
13
39531
2638
ืชืจืื• ืฉื”ื•ื ืžื›ื•ื ื” ืžืžืฉ ืคืฉื•ื˜ื”.
00:42
It has a couple buttons
14
42193
1227
ื™ืฉ ืœื• ื›ืžื” ื›ืคืชื•ืจื™ื
00:43
and a system for detecting motion and distance.
15
43444
3279
ื•ืžืขืจื›ืช ืฉืžื–ื”ื” ืชื ื•ืขื” ื•ืžืจื—ืง.
00:46
You might have an optical mouse
16
46747
1477
ืื•ืœื™ ื™ืฉ ืœื›ื ืขื›ื‘ืจ ืื•ืคื˜ื™
00:48
that makes these measurements with lights and sensors,
17
48248
2596
ืฉืœื•ืงื— ืืช ื”ืžื™ื“ื•ืช ื”ืืœื• ื‘ืขื–ืจืช ืื•ืจื•ืช ื•ื—ื™ื™ืฉื ื™ื,
00:50
but older ones did this with a hard rubber ball
18
50868
2239
ืื‘ืœ ืขื›ื‘ืจื™ื ื™ืฉื ื™ื ื™ื•ืชืจ ืขืฉื• ืืช ื–ื” ืขื ื›ื“ื•ืจ ื’ื•ืžื™ ืงืฉื™ื—
ื•ื›ืžื” ื’ืœื’ืœื•ืช ืคืœืกื˜ื™ืง.
00:53
and some plastic wheels.
19
53131
1421
00:54
Same concept.
20
54576
1725
ืื•ืชื• ืขื™ืงืจื•ืŸ.
00:56
When you click the button on your mouse,
21
56325
1565
ื›ืฉืืชื ืœื•ื—ืฆื™ื ืขืœ ื”ื›ืคืชื•ืจ ื‘ืขื›ื‘ืจ,
00:57
it sends a message to the computer
22
57914
1778
ื”ื•ื ืฉื•ืœื— ื”ื•ื“ืขื” ืœืžื—ืฉื‘
00:59
with information about its position.
23
59716
2085
ืขื ืžื™ื“ืข ืขืœ ื”ืžื™ืงื•ื ืฉืœื•.
01:01
When your mouse click is received,
24
61825
1642
ื›ืฉืœื—ื™ืฆืช ื”ืขื›ื‘ืจ ืฉืœื›ื ืžืชืงื‘ืœืช,
01:03
it's handled by the basic input/output subsystem.
25
63491
3365
ื”ื™ื ืžื˜ื•ืคืœืช ืขืœ ื™ื“ื™ ืžืขืจื›ืช ืงืœื˜/ืคืœื˜ ืคืฉื•ื˜ื”.
01:06
This subsystem acts like the eyes and ears
26
66880
2540
ื”ืžืขืจื›ืช ื”ื–ื• ืžืฉืžืฉืช ื›ืขื™ื ื™ื™ื ื•ืื•ื–ื ื™ื™ื
01:09
and mouth and hands of the computer.
27
69444
2585
ื•ืคื” ื•ื™ื“ื™ื™ื ืฉืœ ื”ืžื—ืฉื‘.
01:12
Basically, it provides a way for the computer
28
72053
2143
ื‘ืขื™ืงืจื•ืŸ, ื”ื™ื ืžืกืคืงืช ื“ืจืš ืœืžื—ืฉื‘
ืœืชืงืฉืจ ืขื ื”ืกื‘ื™ื‘ื” ืฉืœื•.
01:14
to interact with its environment.
29
74220
2199
01:16
But it also acts like a buffer
30
76443
1623
ืื‘ืœ ื”ื™ื ื’ื ืžืชืคืงื“ืช ื›ืžื• ื—ื•ืฆืฅ
01:18
to keep the CPU from being overwhelmed by distractions.
31
78090
3387
ื›ื“ื™ ืœืฉืžื•ืจ ืขืœ ื”ืžืขื‘ื“ ืžืœื”ื™ื•ืช ืžื•ืฆืฃ ื‘ื”ืคืจืขื•ืช.
01:21
In this case, the I/O subsystem decides
32
81501
2286
ื‘ืžืงืจื” ื”ื–ื”, ืžืขืจื›ืช ื”ืงืœื˜ ืคืœื˜ ืžื—ืœื™ื˜ื”
01:23
that your mouse click is pretty important
33
83811
2107
ืฉืœื—ื™ืฆืช ื”ืขื›ื‘ืจ ืฉืœื›ื ืžืกืคื™ืง ื—ืฉื•ื‘ื”
01:25
so it generates an interrupt to the CPU.
34
85942
2973
ืื– ื”ื™ื ื™ื•ืฆืจืช ื”ืคืจืขื” ืœืžืขื‘ื“.
01:28
"Hey, CPU! Got a click here."
35
88939
2136
"ื”ื™, ืžืขื‘ื“! ื™ืฉ ืœื™ ืœื—ื™ืฆื” ืคื”."
01:31
The CPU, or central processing unit,
36
91952
2351
ื”ืžืขื‘ื“,ืื• ื™ื—ื™ื“ืช ื”ืขื™ื‘ื•ื“ ื”ืžืจื›ื–ื™ืช,
01:34
is the brains of the whole computer.
37
94327
2171
ื”ื™ื ื”ืžื•ื— ืฉืœ ื›ืœ ื”ืžื—ืฉื‘.
01:36
Just like your brain doesn't take up your whole body,
38
96522
2526
ื‘ื“ื™ื•ืง ื›ืžื• ืฉื”ืžื•ื— ืฉืœื›ื ืœื ืชื•ืคืก ืืช ื›ืœ ื”ื’ื•ืฃ,
01:39
the CPU doesn't take up the whole computer,
39
99072
2481
ื”ืžืขื‘ื“ ืœื ืชื•ืคืก ืืช ื›ืœ ื ืคื— ื”ืžื—ืฉื‘,
01:41
but it runs the show all the same.
40
101577
2661
ืื‘ืœ ื”ื•ื ืžื ื”ืœ ืืช ื”ื”ื•ืคืขื” ืขื“ื™ื™ืŸ.
01:44
And the CPU's job, its whole job,
41
104262
2220
ื•ื”ืขื‘ื•ื“ื” ืฉืœ ื”ืžืขื‘ื“, ื›ืœ ื”ืขื‘ื•ื“ื” ืฉืœื•,
01:46
is fetching instructions from memory
42
106506
1914
ื”ื™ื ืœื”ื‘ื™ื ื”ื•ืจืื•ืช ืžื”ื–ื™ื›ืจื•ืŸ
01:48
and executing them.
43
108444
1983
ื•ืœื‘ืฆืข ืื•ืชืŸ.
01:50
So, while you're typing, typing, typing,
44
110451
1905
ืื–, ื‘ื–ืžืŸ ืฉืืชื ืžืงืœื™ื“ื™ื, ืžืงืœื™ื“ื™ื, ืžืงืœื™ื“ื™ื,
01:52
maybe really fast,
45
112380
1206
ืื•ืœื™ ืžืžืฉ ืžื”ืจ,
01:53
like 60 words a minute,
46
113610
1454
ืžืฉื”ื• ื›ืžื• 60 ืžื™ืœื™ื ื‘ื“ืงื”,
01:55
the CPU is fetching and executing
47
115088
1978
ื”ืžืขื‘ื“ ืžื‘ื™ื ื•ืžื‘ืฆืข
01:57
billions of instructions a second.
48
117090
2023
ืžื™ืœื™ืืจื“ื™ ื”ื•ืจืื•ืช ื‘ืฉื ื™ื”.
01:59
Yes, billions every second:
49
119137
3015
ื›ืŸ, ืžื™ืœื™ืืจื“ื™ื ื›ืœ ืฉื ื™ื”:
02:02
instructions to move your mouse around on the screen,
50
122176
2782
ื”ื•ืจืื•ืช ืœื”ื–ื™ื– ืืช ื”ืขื›ื‘ืจ ืขืœ ื”ืžืกืš,
02:04
to run that clock widget on your desktop,
51
124982
2139
ืœื”ืจื™ืฅ ืืช ืืคืœื™ืงืฆื™ืช ื”ืฉืขื•ืŸ ืขืœ ืฉื•ืœื—ืŸ ื”ืขื‘ื•ื“ื”,
02:07
play your internet radio,
52
127145
1723
ืœื ื’ืŸ ืืช ืจื“ื™ื• ื”ืื™ื ื˜ืจื ื˜ ืฉืœื›ื,
02:08
manage the files you're editing on the hard drive,
53
128892
2381
ืœื ื”ืœ ืืช ื”ืงื‘ืฆื™ื ืฉืืชื ืขื•ืจื›ื™ื ืขืœ ื”ื“ื™ืกืง ื”ืงืฉื™ื—,
02:11
and much, much more.
54
131297
1579
ื•ืขื•ื“ ื”ืจื‘ื” ืžืื•ื“.
02:12
Your computer's CPU is one heck of a multitasker!
55
132900
3260
ื”ืžืขื‘ื“ ืฉืœ ื”ืžื—ืฉื‘ ืฉืœื›ื ื”ื•ื ื—ืชื™ื›ืช ืจื‘ ืคืขืœื™ื!
02:16
"But oh my gosh
56
136439
1150
"ืื‘ืœ ืื•ื™
02:17
there's a very important mouse click
57
137613
1272
ื™ืฉ ืœื—ื™ืฆืช ืขื›ื‘ืจ ืžืื•ื“ ื—ืฉื•ื‘ื”
02:18
coming through now!
58
138909
1097
ืฉืขื•ื‘ืจืช ืขื›ืฉื™ื•!
02:20
Let's drop everything now and deal with that!"
59
140030
2530
ื‘ื•ืื• ื ืขื–ื•ื‘ ืืช ื”ื›ืœ ืขื›ืฉื™ื• ื•ื ื˜ืคืœ ื‘ื”!"
02:23
There are programs for everything
60
143207
1572
ื™ืฉ ืชื•ื›ื ื™ื•ืช ืœื›ืœ ื“ื‘ืจ
02:24
that the CPU does.
61
144803
1509
ืฉื”ืžืขื‘ื“ ืขื•ืฉื”.
02:26
A special program for the mouse,
62
146336
1698
ืชื•ื›ื ื” ืžื™ื•ื—ื“ืช ืœืขื›ื‘ืจ,
02:28
for the clock widget,
63
148058
1010
ืœืืคืœื™ืงืฆื™ื™ืช ื”ืฉืขื•ืŸ,
02:29
for the internet radio,
64
149092
1187
ืœืจื“ื™ื• ื”ืื™ื ื˜ืจื ื˜ื™,
02:30
and for dealing with letters sent by the keyboard.
65
150303
2809
ื•ืœื˜ื™ืคื•ืœ ื‘ืื•ืชื™ื•ืช ืฉื ืฉืœื—ื•ืช ืขืœ ื™ื“ื™ ื”ืžืงืœื“ืช.
02:33
Each program was initially written by a human
66
153136
2528
ื›ืœ ืชื•ื›ื ื” ื ื›ืชื‘ื” ืจืืฉื™ืช ืขืœ ื™ื“ื™ ืื“ื
02:35
in a human-readable programming language,
67
155688
2194
ื‘ืฉืคื” ืงืจื™ืื” ืœืื ืฉื™ื,
02:37
like Java,
68
157906
835
ื›ืžื• ื’'ืื•ื•ื”,
02:38
C++,
69
158765
1009
C++,
02:39
or Python.
70
159798
1397
ืื• ืคื™ื™ืชื•ืŸ.
02:41
But human programs take up a lot of space
71
161219
2498
ืื‘ืœ ืชื•ื›ื ื™ื•ืช ืื ื•ืฉื™ื•ืช ืœื•ืงื—ื•ืช ื”ืจื‘ื” ืžืงื•ื
02:43
and contain a lot of unnecessary information to a computer,
72
163741
3685
ื•ืžื›ื™ืœื•ืช ื”ืจื‘ื” ืžื™ื“ืข ืœื ื ื—ื•ืฅ ืœืžื—ืฉื‘,
02:47
so they are compiled and made smaller
73
167450
1762
ืื– ื”ืŸ ืžื”ื•ื“ืจื•ืช ื•ื ืขืฉื•ืช ืงื˜ื ื•ืช ื™ื•ืชืจ
02:49
and stored in bits of ones and zeros in memory.
74
169236
3393
ื•ื ืฉืžืจื•ืช ื‘ื‘ื™ื˜ื™ื ืฉืœ ืื—ื“ ื•ืืคืก ื‘ื–ื™ื›ืจื•ืŸ.
02:52
The CPU realizes that it needs instructions
75
172653
2733
ื”ืžืขื‘ื“ ืžื‘ื™ืŸ ืฉื”ื•ื ืฆืจื™ืš ื”ื•ืจืื•ืช
02:55
for how to deal with this mouse click,
76
175410
1977
ืœืื™ืš ืœื˜ืคืœ ื‘ืœื—ื™ืฆืช ื”ืขื›ื‘ืจ,
02:57
so it looks up the address for the mouse program
77
177411
2286
ืื– ื”ื•ื ืžื—ืคืฉ ืืช ื”ื›ืชื•ื‘ืช ืฉืœ ืชื•ื›ื ื™ืช ื”ืขื›ื‘ืจ
02:59
and sends a request to the memory subsystem
78
179721
2351
ื•ืฉื•ืœื— ื‘ืงืฉื” ืœืชืช ืžืขืจื›ืช ื”ื–ื™ื›ืจื•ืŸ
ืœื”ื•ืจืื•ืช ืฉื ืฉืžืจื• ืฉื.
03:02
for instructions stored there.
79
182096
2083
03:05
Each instruction in the mouse device driver
80
185287
2048
ื›ืœ ื”ื•ืจืื” ื‘ืžื ื”ืœ ื”ืชืงืŸ ื”ืขื›ื‘ืจ
03:07
is duly fetched and executed.
81
187359
2359
ืžื•ื‘ืืช ื•ืžื‘ื•ืฆืขืช.
03:09
And that's not nearly the end of the story!
82
189742
2347
ื•ื–ื” ืœื ืžืžืฉ ื”ืกื•ืฃ ืฉืœ ื”ืกื™ืคื•ืจ!
03:12
Because the CPU learns that the mouse was clicked
83
192113
2517
ืžืคื ื™ ืฉื”ืžืขื‘ื“ ืœื•ืžื“ ืฉื”ืขื›ื‘ืจ ื ืœื—ืฅ
03:14
when the cursor was over a picture
84
194654
1620
ื›ืฉื”ืกืžืŸ ื”ื™ื” ืžืขืœ ืชืžื•ื ื”
03:16
of a button on the monitor screen,
85
196298
1855
ืฉืœ ื›ืคืชื•ืจ ืขืœ ืžืกืš ื”ืžื—ืฉื‘,
03:18
and so, the CPU asks memory for the monitor program
86
198177
3047
ื•ื›ืš, ื”ืžืขื‘ื“ ืžื‘ืงืฉ ืžื”ื–ื™ื›ืจื•ืŸ ืืช ืชื•ื›ื ื™ืช ื”ืžืกืš
03:21
to find out what that button is.
87
201248
2081
ื›ื“ื™ ืœืžืฆื•ื ืžื” ื”ื›ืคืชื•ืจ ื”ื–ื”.
03:23
And then the CPU has to ask memory
88
203353
2224
ื•ืื– ื”ืžืขื‘ื“ ืฆืจื™ืš ืœื‘ืงืฉ ืžื”ื–ื™ื›ืจื•ืŸ
03:25
for the program for the button,
89
205601
1812
ืืช ื”ืชื•ื›ื ื” ืฉืœ ื”ื›ืคืชื•ืจ,
03:27
which means that the CPU needs
90
207437
1487
ืžื” ืฉืื•ืžืจ ืฉื”ืžืขื‘ื“ ืฆืจื™ืš
03:28
the monitor program again
91
208948
1716
ืืช ืชื•ื›ื ืช ื”ืžืกืš ืฉื•ื‘
03:30
to show the video associated with the button,
92
210688
2148
ื›ื“ื™ ืœื”ืจืื•ืช ืืช ื”ืกืจื˜ื•ืŸ ืฉืงืฉื•ืจ ืœื›ืคืชื•ืจ,
03:32
and so it goes.
93
212860
1858
ื•ื›ืš ื”ืœืื”.
03:34
And let's just say there are a lot of programs involved
94
214742
2721
ื•ื‘ื•ืื• ืจืง ื ื’ื™ื“ ืฉื™ืฉ ื”ืจื‘ื” ืชื•ื›ื ื•ืช ืžืขื•ืจื‘ื•ืช
03:37
before you even see the button on the screen
95
217487
2096
ืœืคื ื™ ืฉืืชื ืืคื™ืœื• ืจื•ืื™ื ืืช ื”ื›ืคืชื•ืจ ืขืœ ื”ืžืกืš
03:39
light up when you clicked it.
96
219607
1748
ื ื“ืœืง ื›ืฉืœืฆืชื ืขืœื™ื•.
03:41
So, just the simple task of clicking your mouse
97
221379
2445
ืื–, ืจืง ื”ืคืขื•ืœื” ื”ืคืฉื•ื˜ื” ืฉืœ ืœื—ื™ืฆื” ืขืœ ื”ืขื›ื‘ืจ ืฉืœื›ื
03:43
means visiting all of the critical components
98
223848
2344
ืื•ืžืจืช ื‘ื™ืงื•ืจ ื‘ื›ืœ ื”ืจื›ื™ื‘ื™ื ื”ืงืจื™ื˜ื™ื™ื ื”ืืœื”
03:46
of your computer's architecture:
99
226216
1956
ืฉืœ ืžื‘ื ื” ื”ืžื—ืฉื‘ ืฉืœื›ื:
03:48
peripherals,
100
228196
1018
ืื‘ื™ื–ืจื™ ืงืฆื”,
03:49
the basic input-output system,
101
229238
1785
ืžืขืจื›ืช ื”ืงืœื˜ ืคืœื˜ ื”ื‘ืกื™ืกื™ืช,
03:51
the CPU,
102
231047
1308
ื”ืžืขื‘ื“,
03:52
programs,
103
232379
751
ื”ืชื•ื›ื ื•ืช,
03:53
and memory,
104
233154
962
ื•ื”ื–ื™ื›ืจื•ืŸ,
03:54
and not one gremlin.
105
234140
1993
ื•ืืคื™ืœื• ืœื ื’ืจืžืœื™ืŸ ืื—ื“.
ืขืœ ืืชืจ ื–ื”

ืืชืจ ื–ื” ื™ืฆื™ื’ ื‘ืคื ื™ื›ื ืกืจื˜ื•ื ื™ YouTube ื”ืžื•ืขื™ืœื™ื ืœืœื™ืžื•ื“ ืื ื’ืœื™ืช. ืชื•ื›ืœื• ืœืจืื•ืช ืฉื™ืขื•ืจื™ ืื ื’ืœื™ืช ื”ืžื•ืขื‘ืจื™ื ืขืœ ื™ื“ื™ ืžื•ืจื™ื ืžื”ืฉื•ืจื” ื”ืจืืฉื•ื ื” ืžืจื—ื‘ื™ ื”ืขื•ืœื. ืœื—ืฅ ืคืขืžื™ื™ื ืขืœ ื”ื›ืชื•ื‘ื™ื•ืช ื‘ืื ื’ืœื™ืช ื”ืžื•ืฆื’ื•ืช ื‘ื›ืœ ื“ืฃ ื•ื™ื“ืื• ื›ื“ื™ ืœื”ืคืขื™ืœ ืืช ื”ืกืจื˜ื•ืŸ ืžืฉื. ื”ื›ืชื•ื‘ื™ื•ืช ื’ื•ืœืœื•ืช ื‘ืกื ื›ืจื•ืŸ ืขื ื”ืคืขืœืช ื”ื•ื•ื™ื“ืื•. ืื ื™ืฉ ืœืš ื”ืขืจื•ืช ืื• ื‘ืงืฉื•ืช, ืื ื ืฆื•ืจ ืื™ืชื ื• ืงืฉืจ ื‘ืืžืฆืขื•ืช ื˜ื•ืคืก ื™ืฆื™ืจืช ืงืฉืจ ื–ื”.

https://forms.gle/WvT1wiN1qDtmnspy7