1.1 編程的第一步就是搞清楚什么是編程(programming)
什么是編程呢? 編程這個術語意味著創(chuàng)建(或開發(fā))軟件,也稱為程序钟鸵。The term programming means to
create (or develop) software or program.
用基本術語來說北苟,軟件包含指令占调,告訴計算機或計算機化的設備(計算設備)做什么四敞。In basic terms, software contains the instructions that tell a computer—or a computerized device—what to do.
summary:程序就是一系列的指令集迟螺,面向客戶的使用需求所形成的商品或服務就是軟件。
編寫的目的就是告訴計算機需要做什么荆萤。
1.2 什么是計算機
計算機包括硬件和軟件镊靴。一般來說,硬件由計算機可見的物理元素組成链韭,而軟件提供不可見的指令(instructions)來控制硬件并使其執(zhí)行特定的任務偏竟。了解計算機硬件并不是學習編程語言的必要條件,但它可以幫助你更好地理解程序指令對計算機及其組件的影響梧油。
1.2.0 硬件組件
(1)下列為硬件的主要組件:
■ A central processing unit (CPU)
■ Memory (main memory)
■ Storage devices (such as disks and CDs)
■ Input devices (such as the mouse and keyboard)
■ Output devices (such as monitors and printers)
■ Communication devices (such as modems and network interface cards)
(2)bus and motherboard
A computer’s components are interconnected by a subsystem called a bus. You can think of a bus as a sort of system of roads running among the computer’s components; data and power travel along the bus from one part of the computer to another. In personal computers,
計算機的各個部件是由一個叫做總線bus的子系統(tǒng)相互連接的苫耸。你可以把bus想象成一種道路系統(tǒng),它在電腦的各個部件之間運行;數(shù)據(jù)和電力沿著總線從計算機的一部分傳輸?shù)搅硪徊糠掷茉伞he bus is built into the computer’s motherboard, which is a circuit case that connects all of the parts of a computer together.總線內(nèi)建在計算機的主板褪子,這是一個電路箱,連接計算機的所有部分在一起骗村。