JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
Back to the library
計算機科學 1945

《關於 EDVAC 的報告初稿》

約翰·馮·紐曼

把電腦的指令與資料放進同一個記憶體——此後每臺機器都沿用這套設計。

Choose your version
In depth · the introduction

正是這份藍圖,讓電腦能改寫自己的指令——靠的是把指令和資料放進同一個記憶體。

把這個想法拆開看

像 ENIAC 那樣的早期電子機器,是靠「物理改線」來編程的——撥開關、重插電纜,換一道新問題可能要折騰好幾天。馮·紐曼的報告提出了不一樣的做法:把程式寫成數字,存進機器的記憶體裡,就緊挨著它要處理的資料。

這一個決定,就是「儲存程式」的想法。因為指令不過是躺在記憶體裡的一串數字,機器便能讀它、一條一條照著做,甚至改動它——於是同一臺實體電腦,無須任何改線,就能運行你裝進去的任何程式。從此,每一臺電腦都是這樣工作的:要換功能,裝新軟體就好,不必重造硬體。

它從哪裡來

1945 年春天,馮·紐曼正為 EDVAC 擔任顧問——那是賓夕法尼亞大學為 ENIAC 規劃的後繼機。他把團隊的討論彙成一份手稿;赫爾曼·戈德斯坦把它打字成文,於 1945 年 6 月 30 日寄給約二十多人,扉頁上署著馮·紐曼的名字。它只是一份「初稿」,未完成,也沒有圖紙——可它把邏輯設計講得如此清楚,以致衝出了專案本身,定下了整個領域的模板。

這份初稿還帶著一根至今仍能感到的「刺」。造出 ENIAC 的工程師 J. 普雷斯珀·埃克特與約翰·莫渠利,認為這些想法是集體的功勞,看到扉頁上只有一個名字,深感不平——這樁關於「功勞該歸誰」的爭執,史學家至今仍在爭論。

它為何重要

在此之前,「電腦」是一臺專用機器:要應對一類新問題,就得把它重造一遍。在此之後,機器變得通用了——你只消改一改記憶體裡的數字,就改變了它所做的事。這正是計算器與電腦之間的全部分野;也正因如此,同一臺筆記型電腦,可以是打字機、是暗房、是電影院、是遊戲機——全看此刻裝的是哪一個程式。

一個類比

想想自動鋼琴。老式的那種,從一卷打孔的紙帶上讀出曲子:樂曲與機器是分開的,要彈新曲就換一卷紙帶。而馮·紐曼機,索性把樂譜和草稿紙放進同一個抽屜,用同一套速記寫成——於是它不僅能彈這支曲子,還能在演奏途中改寫它。指令與資料,共用一個抽屜。在下方,試試這臺小小的機器。

一排八個記憶單元:單元 0–3 裝著指令 LOAD 6、ADD 7、STORE 5、HALT,單元 5–7 裝著數字。時鐘步滑桿每次取出並執行一條指令,高亮該指令以及它所用到的資料單元,同時程式計數器與累加器隨之更新;運算元滑桿改變單元 6 裡的數字,於是單元 5 中存下的結果也隨之改變。

它落在何處

它是本館中另外兩個想法的工程「孿生體」。1936 年,艾倫·圖靈已經證明:一臺「通用機」只要讀入對另一臺機器的描述,就能模仿它——而馮·紐曼的報告,正是告訴你怎樣真的把這樣一臺機器造出來。1948 年,克勞德·香農又用「位元」度量了資訊,而位元,正是馮·紐曼的記憶體所裝的那種東西。圖靈的理論、香農的位元、馮·紐曼的架構,就是每一臺電腦底下的三根支柱。

The original document
Original source text
John von Neumann · Moore School of Electrical Engineering, University of Pennsylvania · distributed June 30, 1945 by Herman H. Goldstine · 101-page typescript
1. The aim
The considerations which follow deal with the structure of a very high speed automatic digital computing system, and in particular with its logical control.
From the first line the report sets out to describe a logical structure, not a wiring diagram. Von Neumann idealizes the components as two-state, all-or-none elements — borrowing the formal neuron of McCulloch and Pitts — so the argument is about organization, not vacuum tubes.
2. The organs of the machine
The device is divided into parts: a central arithmetical unit (CA) for the elementary operations; a central control (CC) that sequences the work by interpreting coded orders; a memory (M); and the input (I), output (O), and an outside recording medium (R).
The three specific parts CA, CC (together C) and M correspond to the associative neurons in the human nervous system. It remains to discuss the equivalents of the sensory or afferent and the motor or efferent neurons. These are the input and the output organs of the device.
3. One memory for numbers and for orders
The instructions which govern a complicated problem may constitute considerable material, particularly so, if the code is circumstantial (which it is in most arrangements). This material must be remembered.
While it appeared that various parts of this memory have to perform functions which differ somewhat in their nature and considerably in their purpose, it is nevertheless tempting to treat the entire memory as one organ, and to have its parts even as interchangeable as possible for the various functions enumerated above.
So the orders that govern a problem are kept in the same memory M as the numbers they act on, in the same form and addressed the same way. This is the stored-program principle — the single idea for which the report is remembered.
[ … ]
The document is explicitly a “First Draft”: it breaks off before the detailed circuit engineering, carries no references, and names only von Neumann, though it distilled discussions of the whole EDVAC team. The full text — definitions, the binary arithmetic of CA, the coding of orders — is at the source below.
Moore School, University of Pennsylvania · June 1945