## 三、計算機語言的介紹
----From a high school student's view to learnPython
關鍵字:高中生 學編程 Python語言 計算機語言 初學者如何選擇計算機語言?
在之前的博文中給大家大概的闡述了一下計算機的組成,可是計算機到底是怎樣來執行各種指令的呢,本篇主要介紹這方面的內容。
由于涉及到計算機原理方面的內容都比較高深,我還是采用摘錄的方式來進行組織,大部分的內容來源于《**計算機組成與設計:硬件/軟件接口**》,第四版,非常非常好的書,很容易看懂。
[第一章](http://images.china-pub.com/ebook190001-195000/194732/ch01.pdf)?[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)
(一)、計算機指令
主要了解計算機是如何運行的:
1、?????閱讀[第一章](http://images.china-pub.com/ebook190001-195000/194732/ch01.pdf)的1.2小節“從高級語言到硬件語言”,主要明白機器所識別的語言以及高級語言是如何轉變為機器能夠識別的語言
2、?????閱讀[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)的2.1、2.2明白機器指令的概念,了解一般的機器指令如何分類、作用
3、?????閱讀[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)的2.3小節,明白寄存器、存儲器的區別,大致理解高級語言與機器語言的轉換
4、?????閱讀[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)的2.4小節,這一節非常的重要,計算機的基礎,二進制必須搞明白
5、?????[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)的2.6小節,介紹計算機如何實現基本的邏輯操作
6、?????[第二章](http://images.china-pub.com/ebook190001-195000/194732/ch02.pdf)的2.7小節,介紹計算機的基本結構化指令:判斷和決策、循環
這些章節的閱讀,對于進一步理解計算的基本原理以及計算機語言的初步了解非常有幫助。
(二)、計算機語言的歷史:(Programming Language Cultures)
Programs for modern computersconsist of sequences of instructions that are encoded as numericdigits. This encoding system is known as a machine language.Unfortunately, writing programs in a machine language is so tediousthat often leads to errors that must be corrected before the job isfinished.
In the 1940s, researcherssimplified the programming process by developing notational systemsby mnemonic instructions. With the development of mnemonic system,a programs called assemblers were developed to convert mnemonicexpressions into machine language instructions. Then computersscientists began developing programming languages that were moreconducive to software development that those assembly languages.The result was the emergence of a third generation of programminglanguages that were both higher level and machine independent (inthat they did not rely on the characteristics of a particularmachine). The third generation of programming languages containFORTRAN, COBOL, and ALGOL. ?
6 0年代中后期,出現了“軟件危機”。軟件越來越多,規模越來越大,因為缺乏科學規范的系統規劃與測試、評估標準,所以建立起大批耗費巨資的軟件系統,這些軟件系統含有錯誤而無法使用,因此給人的感覺是越來越不可靠,以致幾乎沒有不出錯的軟件。這時人們認識到大型程序的編制不同于寫小程序,它應該是一項新的技術,應該像處理工程一樣處理軟件研制的全過程。程序的設計應易于保證正確性,也便于驗證正確性。后來有人提出了“結構化程序設計方法”。終于,第一個結構化程序設計語言—Pascal語言在1970年出現了,這標志著結構化程序設計時期的開始。
In the beginning of 1980s, therewas a great revolution on the design of software, which was theobject-oriented paradigm, which is associated with the programmingprocess called object-oriented programming. Following thisparadigm, a software system is viewed as a collection of unitscalled objects, each of which is capable of performing the actionsthat are immediately related to itself as well as requestingactions of other objects. Together, these objects interact to solvethe problem at hand. C++, VB, Delphi is the typicalrepresentation.
(三)、計算機語言的種類
計算機語言有許多,具有代表性的一些高級語言有FORTRAN、ALGOL、COBOL、BASIC、LISP、SNOBOL、PL/1、Pascal、C、PROLOG、Ada、C++、VC、VB、Delphi、JAVA等。
下面就向大家介紹幾種:
1.BASIC
BASIC(Beginners' All-purpose Symbolic InstructionCode,又譯培基),意思就是“初學者的全方位符式指令[代碼](http://baike.baidu.com/view/41.htm)”,是一種設計給初學者使用的[程序設計語言](http://baike.baidu.com/view/128511.htm)。BASIC是一種直譯式的[編程語言](http://baike.baidu.com/view/552871.htm),在完成編寫后不須經由編譯及連結等手續即可執行,但如果需要單獨執行時仍然需要將其建立成執行檔。[BASIC語言](http://baike.baidu.com/view/329004.htm)是由Dartmouth學院JohnG.Kemeny與ThomasE.Kurtz兩位教授于1960年代中期所創。由于立意甚佳,BASIC語言簡單、易學的基本特性,很快地就普遍流行起來,幾乎所有小型、微型家用電腦,甚至部分大型電腦,都有提供使用者以此種語言撰寫程式。
2.Visual Basic
Visual Basic is anobject-oriented programming language that was developed byMicrosoft as a tool by which users of Microsoft’s Windows operatingsystem could develop their own GUI applications. Actually, VisualBasic is more than a language, it is an entire software developmentpackage that allows a programmer to construct applications frompredefined components and to customize these components bydescribing how they should react to various events.
3.JAVA
Java是一種可以撰寫跨平臺應用軟件的面向對象的程序設計語言,是由[SunMicrosystems](http://baike.baidu.com/view/1061350.htm)公司于1995年5月推出的Java程序設計語言和[Java平臺](http://baike.baidu.com/view/209634.htm)(即JavaSE,JavaEE, JavaME)的總稱。Java?技術具有卓越的通用性、高效性、平臺移植性和安全性,廣泛應用于個人PC、[數據中心](http://baike.baidu.com/view/754520.htm)、游戲控制臺、[科學](http://baike.baidu.com/view/3805.htm)[超級計算機](http://baike.baidu.com/view/296324.htm)、移動電話和[互聯網](http://baike.baidu.com/view/6825.htm),同時擁有全球最大的開發者專業社群。在全球云計算和移動互聯網的產業環境下,Java更具備了顯著優勢和廣闊前景。
4.Python
Python is programming languagethat was created by Guido van Rossum in the late 1980s. Today it ispopular in developing Web applications, in scientific computationand as an introductory language for students. Python emphasizesreadability, and includes elements of the imperative,object-oriented, and functional programming paradigms. Python isalso an example of a modern language that uses a form of fixedformatting. It uses indentation to denote program blocks, ratherthat punctuation marks or reserved words.
5.C/C++
C語言是在70年代初問世的。一九七八年由美國電話電報公司(AT&T)貝爾實驗室正式發表了C語言。同時由B.W.Kernighan和D.M.Ritchit合著了著名的“THEC PROGRAMMING LANGUAGE”一書。通常簡稱為《K&R》,也有人稱之為《K&R》標準。但是,在《K&R》中并沒有定義一個完整的標準C語言,后來由美國國家標準協會在此基礎上制定了一個C?語言標準,于一九八三年發表。通常稱之為ANSI C。
在C的基礎上,一九八三年又由貝爾實驗室的Bjarne Strou-strup推出了C++。?C++進一步擴充和完善了C語言,成為一種面向對象的程序設計語言。MicrosoftVisualC++?基本上是windows系統下的最主要開發工具。
C++提出了一些更為深入的概念,它所支持的這些面向對象的概念容易將問題空間直接地映射到程序空間,為程序員提供了一種與傳統結構程序設計不同的思維方式和編程方法。因而也增加了整個語言的復雜性,掌握起來有一定難度。
但是,C是C++的基礎,C++語言和C語言在很多方面是兼容的。因此,掌握了C語言,再進一步學習C++就能以一種熟悉的語法來學習面向對象的語言,從而達到事半功倍的目的。
同時,現在非常火熱的蘋果系統(macos以及IOS)都采用Objective C,它也是一個C語言為基礎的擴展集。???
到底選擇一門什么樣的語言作為自己第一門入門、學習的語言呢?其實在之前也有過簡單的說明,Python作為入門是非常合適的,準備工作非常的簡單,所需的軟件也都免費,雖然Microsoft也提供免費的基礎版本軟件,但Microsoft的東西向來以龐大、復雜著稱,所以,如果自學,首選還是Python,在有相當的基礎之后,我們在開始接觸C語言、C++語言或者ObjectiveC,關鍵還看你準備在哪個操作系統平臺上進一步學習。
(四)、結束
這幾篇的內容,寫起來非常的糾結,都是基礎、比較理論,對于大多數的只是我也屬于初學者,所以為了不讓大家走彎路,引用一些書籍上的內容,當然,更詳細的內容還需要大家去進一步的閱讀。相關的資料都有鏈接供大家直接使用。
最后,也添加一個MIT公開課的視頻剪輯,也是關于計算機語言方面的。
我的更多文章:
- [Python程序調試的一些體會](http://blog.sina.com.cn/s/blog_d6cca93e0101ewc9.html)(2013-10-06 22:57:35)
- [十四、Python編程計算24點(之二)](http://blog.sina.com.cn/s/blog_d6cca93e0101euxx.html)(2013-10-03 22:18:28)
- [十三、Python編程計算24點(之一)](http://blog.sina.com.cn/s/blog_d6cca93e0101eukc.html)
(2013-10-02 22:15:46)
- [十二、Python簡單數據結構應用(之二)](http://blog.sina.com.cn/s/blog_d6cca93e0101euk8.html)(2013-10-02 22:10:41)
- [十一、Python簡單數據結構應用(之一)](http://blog.sina.com.cn/s/blog_d6cca93e0101ep9z.html)(2013-09-23 23:31:49)
- [十、Python編程解決組合問題(之二)](http://blog.sina.com.cn/s/blog_d6cca93e0101entc.html)
(2013-09-21 23:37:27)
- [九、Python編程解決組合問題(之一)](http://blog.sina.com.cn/s/blog_d6cca93e0101ent7.html)(2013-09-21 23:32:54)
- [八、Python的函數編程(之二)](http://blog.sina.com.cn/s/blog_d6cca93e0101ekwj.html)
(2013-09-20 23:09:39)
- [七、Python的函數編程(之一)](http://blog.sina.com.cn/s/blog_d6cca93e0101ekwg.html)
(2013-09-20 23:09:10)
- [高中生如何學編程](http://blog.sina.com.cn/s/blog_d6cca93e0101e8fn.html)(2013-09-02 19:26:01)