How a Computer Works
Let's use the system pictured in Figure 1-3 to illustrate how a typical computer works.A computer is controlled by a stored program: thus, the first step in using the machine is to copy the program from diskette into memory Now, the processor can begin executing instructions.Input data from the keyboard are stored in memory. The processor manipulates the data, storing the results back into memor3. Finally, the results are output.
Memory's contents are easy to change. Thus, when one set of data has been processed, the program can be repeated, reading and processing new data, and generating new output. If the data can be changed, why not the program? When a program is finished, anew one can take its place in memory, allowing the computer to process completely different data. One minute it can generate pay checks from labor data under control of a payroll program. The next minute, it can prepare bills from invoices under control of a play roll program .The next minute, it can prepare bills from invoices under control of a billing program. Later, this same collection of components, controlled by yet another program, can read
Statistical data and produce a bar chart or sense the movements of a joystick and manipulate the position of an imaginary spaceship on a display screen.
The physical components of a computer-the processor, memory, input device, and output device-are its hardware. You can see them, touch them, an (feel them. Program and data are different, existing only as electronic pulses stored in memory. Software is a general term for programs.
翻譯:
計算機如何工作
讓我們利用示意圖1-3的系統,來說明一臺典型的計算機是如何工作的。計算機是由存儲器程序來控制的;這樣,使用機器的第一步,就是將程序從軟盤復制到存儲器中去?,F在,處理器能夠開始執行指令了。從鍵盤輸入的數據被存儲在存儲器中。處理器處理沒數據,將結果存回到存儲器中。最后,結果(作為)輸出。
存儲器的內容是易于改變的,這樣,當一組數據已被處理完時,程序可被重復(執行),(通過)讀入及處理新的數據,(又會)產生新的輸出。如果數據可以改變,那么,程序為什么不能改變呢?當一個程序結束時,一個新程序可以在內存中取得其位置,這就可以允許計算機處理完全不同的數據。一個時間,它可以在工資發放程序的控制下,從勞務數據產生工資單。在下一個時間,它可以在賬單程序控制下,從發票準備賬單。以后,還是同樣的部件集合體,在另外的程序控制下,可以讀入統計數據,并產生直方圖,或者感知操縱桿的運動,在顯示屏上 操縱想象的宇宙飛船的位置。
一臺計算機的實際部件—處理器,存儲器,輸入設備及輸出設備—這些是它的硬件,你可以看見它們,觸摸它們和感知它們。程序及數據則不同,它們僅僅以存儲在內存中的電脈沖的形式存在著。軟件是各種程序的一個通用術語。