コンピューターのしくみ
コンピューターは写真からプログラムまで、すべてを0と1の並びとして記録し、小さなスイッチでそれを処理します。6つの単元で、いちばん下の層から順に進みます。2進数、バイトと文字、論理ゲート、ゲートによる足し算、CPUのフェッチ・デコード・実行のサイクル、そしてメモリです。ビットを切り替え、ゲートをつなぎ、加算器の中を桁上がりが伝わるようすを見て、小さなコンピューターのプログラムを1段階ずつ進めることができます。
進み具合
- 1ビットと2進数8個のスイッチは256通りの並びを表せます。0から255までのすべての数に足りる数です。
- 2バイト、16進数と文字文字Aは65、つまり01000001として記録されます。UTF-8では、U+D55Cのような韓国語の音節1つが3バイトになります。
- 3論理ゲートIntel初のマイクロプロセッサー、1971年の4004には2,300個のトランジスタがありました。それらはゲートとしてつながれていて、プロセッサーはゲートだけでできています。
- 4ゲートで数を足すしくみ2つのビットを足すには、XORゲート1つとANDゲート1つで十分です。全加算器を4つつなげば、0から15までの2つの数を足せます。
- 5CPUがしていること3 GHzのプロセッサーは1秒に30億回刻み、1回の刻みは3分の1ナノ秒ごとです。
- 6メモリとストレージ32ビットのアドレスなら、プロセッサーは4,294,967,296バイト、ちょうど4 GiBを指定できます。電源を切ると、RAMはそのすべてを忘れます。
このコースの出典 (9)
- (checked 2026-10-17; reordered 2026-10-19: standards first, then official documentation, then the teaching model and calculations, history sources last)
- Standards: NIST, "Prefixes for binary multiples" (physics.nist.gov/cuu/Units/binary.html: IEC approved kibi, mebi, gibi in December 1998; 1 B = 8 bit; 1 MiB = 1 048 576 B; 1 MB = 1 000 000 B; 1 GiB = 1 073 741 824 B; historical note: memory makers usually mean 2²⁰ bytes by megabyte, storage makers 1 000 000, and the "1.44 MB" diskette uses a megabyte of 1 024 000 bytes)
- IETF RFC 20 "ASCII format for Network Interchange" (1969, 7-bit codes, A = 65, a = 97, 0 = 48)
- IETF RFC 3629 "UTF-8, a transformation format of ISO 10646" (2003: 1 to 4 octets per character, ASCII unchanged, code points up to U+10FFFF, U+0800 to U+FFFF take three octets, "the first octet of a multi-octet sequence indicates the number of octets", example U+D55C U+AD6D U+C5B4 = ED 95 9C EA B5 AD EC 96 B4)
- Official documentation: MDN Web Docs, "<color>" (hexadecimal colour notation #RRGGBB)
- Intel, "Intel Chips" timeline poster (2012: Intel 4004 of 1971 with 2,300 transistors; 2nd generation Core 2010 with 1.16 billion)
- Claude E. Shannon, "A Symbolic Analysis of Relay and Switching Circuits", Transactions of the AIEE vol. 57 (1938)
- abstract of his MIT master's thesis. Computer History Museum, The Silicon Engine, "1947: Invention of the Point-Contact Transistor" (Bardeen and Brattain, December 1947, germanium)
- John von Neumann, "First Draft of a Report on the EDVAC" (30 June 1945, Moore School, reprinted in IEEE Annals of the History of Computing 15:4, 1993).
確認日: 2026-10-17