How exactly does binary code work? - José Américo N L F de Freitas

1,375,955 views ・ 2018-07-12

TED-Ed


下の英語字幕をダブルクリックすると動画を再生できます。

翻訳: Noriko Yasumoto 校正: Tomoyuki Suzuki
00:06
Imagine trying to use words to describe every scene in a film,
0
6777
4638
想像してみて下さい 映画のあらゆるシーンや
00:11
every note in your favorite song,
1
11415
1903
お気に入りの歌の全ての音
00:13
or every street in your town.
2
13318
2717
地元の街を通る道を ひとつ残らず言葉で伝えることを
00:16
Now imagine trying to do it using only the numbers 1 and 0.
3
16035
4824
では次に 数字の1と0だけ使って 伝えることを想像してみて下さい
00:20
Every time you use the Internet to watch a movie,
4
20859
2895
インターネットを使って 映画を見るとき
00:23
listen to music,
5
23754
1109
音楽を聴くとき
00:24
or check directions,
6
24863
1486
道順を確認するとき
00:26
that’s exactly what your device is doing,
7
26349
2510
デバイスは まさに そういうことを行っています
00:28
using the language of binary code.
8
28859
2953
バイナリーコード(2進数) という記法を使うのです
00:31
Computers use binary because it's a reliable way of storing data.
9
31812
4690
コンピューターはデータを保存する 信頼性の高い方法として 2進数を使います
00:36
For example, a computer's main memory is made of transistors
10
36502
4075
例えば コンピューターのメインメモリは トランジスタで構成されていて
00:40
that switch between either high or low voltage levels,
11
40577
3577
トランジスタは高電圧と 低電圧の間で切り替わります
00:44
such as 5 volts and 0 volts.
12
44154
3490
5ボルトとか0ボルト というような電圧です
00:47
Voltages sometimes oscillate, but since there are only two options,
13
47644
4106
電圧は変動することもありますが 選択肢は2つしかないので
00:51
a value of 1 volt would still be read as "low."
14
51750
4001
1ボルトという値になっても 「低電圧」と認識されます
00:55
That reading is done by the computer’s processor,
15
55751
2529
コンピューターの処理装置は
00:58
which uses the transistors’ states to control other computer devices
16
58280
4315
トランジスタの状態から このような値を読み取り
01:02
according to software instructions.
17
62595
2196
ソフトウェアの指示に従い 他の装置を制御します
01:04
The genius of this system is that a given binary sequence
18
64791
3341
このシステムの素晴らしいところは 2進数の並びそのものは
01:08
doesn't have a pre-determined meaning on its own.
19
68132
3388
前もって定められた 意味を持っていないものの
01:11
Instead, each type of data is encoded in binary
20
71520
3685
各種のデータが それぞれのルールに従い
01:15
according to a separate set of rules.
21
75205
2910
2進数で表現されるところにあります
01:18
Let’s take numbers.
22
78115
1382
数字を取り上げてみます
01:19
In normal decimal notation,
23
79497
1682
普通の10進法の表記では
01:21
each digit is multiplied by 10 raised to the value of its position,
24
81179
4853
各桁の数字に10の累乗を乗じます
01:26
starting from zero on the right.
25
86032
2451
累乗の指数は 一番右側の桁が0です
01:28
So 84 in decimal form is 4x10⁰ + 8x10¹.
26
88483
6557
ですから10進法表記の84は 4x10⁰ + 8x10¹ を意味します
01:35
Binary number notation works similarly,
27
95040
2715
2進法表記でも 原理は同じですが
01:37
but with each position based on 2 raised to some power.
28
97755
3806
各桁の値は2の累乗を 意味しているので
01:41
So 84 would be written as follows:
29
101561
4012
84はこのように 表記されます
01:45
Meanwhile, letters are interpreted based on standard rules like UTF-8,
30
105573
4803
一方 文字はUTF-8のような 標準フォーマットにより表現されます
01:50
which assigns each character to a specific group of 8-digit binary strings.
31
110376
5107
各文字には 8桁の2進数の数個分からなる 特定の値が割り当てられています
01:55
In this case, 01010100 corresponds to the letter T.
32
115483
6906
この場合では 01010100 は 「T」に対応します
02:02
So, how can you know whether a given instance of this sequence
33
122389
3758
では このような数字の列が あったとき
02:06
is supposed to mean T or 84?
34
126147
2685
Tなのか 84なのか どう判断するのでしょう?
02:08
Well, you can’t from seeing the string alone
35
128832
3038
もちろん 数字の並びだけではわかりません
02:11
– just as you can’t tell what the sound "da" means from hearing it in isolation.
36
131870
4572
「da」という音だけ単独で聴いても 何のことかわからないのと同じです
02:16
You need context to tell whether you're hearing Russian, Spanish, or English.
37
136442
4837
文脈により ロシア語 スペイン語 英語 どれかを特定する必要があります
02:21
And you need similar context
38
141279
1391
同様に 数字も文脈から
02:22
to tell whether you’re looking at binary numbers or binary text.
39
142670
4115
2進数そのものか2進数で表現される 文字データかを判断できるのです
02:26
Binary code is also used for far more complex types of data.
40
146785
4361
バイナリーコードはさらに複雑なタイプの データにも使われます
02:31
Each frame of this video, for instance,
41
151146
2346
例えばこのビデオの 1コマ1コマは
02:33
is made of hundreds of thousands of pixels.
42
153492
2468
何十万もの ピクセルから できています
02:35
In color images,
43
155960
1681
カラー画像では
02:37
every pixel is represented by three binary sequences
44
157641
3454
1つ1つのピクセルは 3つの2進数で表され
02:41
that correspond to the primary colors.
45
161095
2606
3原色に対応しています
02:43
Each sequence encodes a number
46
163701
1786
各2進数は
02:45
that determines the intensity of that particular color.
47
165487
3184
それぞれの色の輝度を 数値化したものです
02:48
Then, a video driver program transmits this information
48
168671
3929
そして ビデオドライバープログラムが その情報を
02:52
to the millions of liquid crystals in your screen
49
172600
2710
画面を構成する 何百万もの液晶に転送し
02:55
to make all the different hues you see now.
50
175310
2778
ご覧のような 様々な色調を表現します
02:58
The sound in this video is also stored in binary,
51
178088
3314
このビデオの音声もまた 2進数で記録されたものです
03:01
with the help of a technique called pulse code modulation.
52
181402
3404
パルス符号変調という 技術が使われています
03:04
Continuous sound waves are digitized
53
184806
2384
連続した音波は
03:07
by taking "snapshots" of their amplitudes every few milliseconds.
54
187190
4392
数ミリ秒ごとに 振幅の 「スナップ写真」によりデジタル化され
03:11
These are recorded as numbers in the form of binary strings,
55
191582
3665
一連の2進数で表される 数値として記録され
03:15
with as many as 44,000 for every second of sound.
56
195247
3913
その数は1秒当たり 44,000個にも上ります
03:19
When they’re read by your computer’s audio software,
57
199160
2610
これがコンピューターの オーディオソフトにより読み取られ
03:21
the numbers determine how quickly the coils in your speakers should vibrate
58
201770
4354
スピーカーのコイルが 振動する速さが決定され
03:26
to create sounds of different frequencies.
59
206124
2841
様々な周波数の 音が作り出されるのです
03:28
All of this requires billions and billions of bits.
60
208965
3695
これらの情報は 莫大なビット数を必要としますが
03:32
But that amount can be reduced through clever compression formats.
61
212660
4003
優れた圧縮フォーマットを使えば サイズを小さくできます
03:36
For example, if a picture has 30 adjacent pixels of green space,
62
216663
4508
例えば ある画像の中に 緑を示す 30個の隣接ピクセルが含まれる場合
03:41
they can be recorded as "30 green" instead of coding each pixel separately -
63
221171
4848
ピクセルが個々にではなく 「30の緑」 として符号化され 記録されます
03:46
a process known as run-length encoding.
64
226019
3175
連長圧縮という処理です
03:49
These compressed formats are themselves written in binary code.
65
229194
4900
その圧縮フォーマット自体も バイナリーコードで記されています
03:54
So is binary the end-all-be-all of computing?
66
234094
3070
ところで2進数は コンピューターにおける 最終形でしょうか?
03:57
Not necessarily.
67
237164
1385
そうとも限りません
03:58
There’s been research into ternary computers,
68
238549
2418
3進法コンピューターの 研究が行われており
04:00
with circuits in three possible states,
69
240967
2465
これは3つの状態が可能な 回路を持つものです
04:03
and even quantum computers,
70
243432
1820
また 量子コンピューターの 研究もあり
04:05
whose circuits can be in multiple states simultaneously.
71
245252
3664
その回路は 同時に複数の状態を 持つことができます
04:08
But so far, none of these has provided
72
248916
2423
しかし今までのところ これらのコンピューターは
04:11
as much physical stability for data storage and transmission.
73
251339
3296
データの保存や転送に関して 物理的な安定性を備えていません
04:14
So for now, everything you see,
74
254635
2444
ですから今のところは スクリーンを通して見るもの
04:17
hear,
75
257079
769
04:17
and read through your screen
76
257848
1616
聴くもの
読むものは 全て
04:19
comes to you as the result of a simple "true" or "false" choice,
77
259464
3633
「真」か「偽」かという単純な 二者択一が
04:23
made billions of times over.
78
263097
2274
非常に多くの回数なされた 結果なのです
このウェブサイトについて

このサイトでは英語学習に役立つYouTube動画を紹介します。世界中の一流講師による英語レッスンを見ることができます。各ビデオのページに表示される英語字幕をダブルクリックすると、そこからビデオを再生することができます。字幕はビデオの再生と同期してスクロールします。ご意見・ご要望がございましたら、こちらのお問い合わせフォームよりご連絡ください。

https://forms.gle/WvT1wiN1qDtmnspy7