REWIEW OF COMPUTER BASIC 计算机的组织 Computer Organization 口计算机包括六大部件: - Input unit(输入单元) Obtains information from input devices(key board, mouse) Output unit(输出单元) Outputs information(to screen, to printer, to control other devices) Memory unit(内存 Rapid access, low capacity, stores input information Central processing unit(cPU)(中央处理单元) Arithmetic and logic unit(ALU)(算术逻辑单元 Performs arithmetic calculations and logic decisions Control unit(控制器) Supervises and coordinates the other sections of the computer - Secondary storage unit(辅助存储器) Cheap, long-term, high-capacity storage Stores inactive programs 第一讲〔语言报疹计入门 目录
计算机的组织 Computer Organization 计算机包括六大部件: – Input unit(输入单元) • Obtains information from input devices (keyboard, mouse) – Output unit(输出单元) • Outputs information (to screen, to printer, to control other devices) – Memory unit(内存) • Rapid access, low capacity, stores input information – Central processing unit (CPU)(中央处理单元) • Arithmetic and logic unit (ALU)(算术逻辑单元) – Performs arithmetic calculations and logic decisions • Control unit(控制器) – Supervises and coordinates the other sections of the computer – Secondary storage unit(辅助存储器) • Cheap, long-term, high-capacity storage • Stores inactive programs reVieW oF ComPuTer BasiC 第一讲 C语言程序设计入门 目 录
REWIEW OF COMPUTER BASIC 计算机语言 Computer Language 三种编程语言( programming language): 机器语言( Machine language) 机器指令( machine instruction) 汇编语言( Assembly language) 类似英文的缩写来表示基本操作( elementary operation) 通过汇编程序( assembler)翻译成机器语言 高级语言(High- evel language) 代码(code)类似日常英语 使用数学符号( mathematical notations) ·通过编译程序( compiler)翻译成机器语言 0110001100000110 工OAD 0110010111001100 ADD Z X+ Y 0000110000011011 STORE Z Machine Language Assembly Language High-level Language 第一讲〔语言报疹计入门 目录
计算机语言 Computer Language 三种编程语言(programming language): – 机器语言(Machine language) • 机器指令(machine instruction) – 汇编语言(Assembly language) • 类似英文的缩写来表示基本操作(elementary operation) • 通过汇编程序(assembler)翻译成机器语言 – 高级语言(High-level language) • 代码(code)类似日常英语 • 使用数学符号(mathematical notations) • 通过编译程序(compiler)翻译成机器语言 reVieW oF ComPuTer BasiC 第一讲 C语言程序设计入门 目 录 0110001100000110 0110010111001100 0000110000011011 LOAD X ADD Y STORE Z Z = X + Y Machine Language Assembly Language High-level Language
C LANGUAGES EVOLUTION AND FEA TURES C语言的发畏 C LAnguages Evolution 日 Traditional C Evolved by Ritchie from two previous programming languages, BCPL and B Used to develop UNIX Used to write modern operating systems Hardware independent( portable)(可移植) o.. By late 1970's C had evolved to"Traditional C" 标准化( Standardization) 许多互不兼容( incompatible)的c的变种( variations),差异很小 成立委员会建立“ unambiguous, machine-independent”(明确的,独立于 机器的)定义 正式的标准诞生于1989年(c89),在1999作了重大更新(c99) 第一讲〔语言报疹计入门 目录
C语言的发展 C Language’s Evolution Traditional C – Evolved by Ritchie from two previous programming languages, BCPL and B – Used to develop UNIX – Used to write modern operating systems – Hardware independent (portable)(可移植) – By late 1970's C had evolved to "Traditional C" 标准化(Standardization) – 许多互不兼容(incompatible)的C的变种(variations),差异很小 – 成立委员会建立 “unambiguous, machine-independent” (明确的,独立于 机器的)定义 – 正式的标准诞生于1989年(C89), 在1999作了重大更新(C99) C Language’s eVoLuTion anD FeaTures 第一讲 C语言程序设计入门 目 录
STRUCTURED PROGRAMMING 程序概念 Program Concept 口程序的概念 程序是计算机解决问题所需的一系列指令的集合。 A program is a set of self-contained instructions that tells a computer how to solve a problem or carry out a task. 口程序=数据结构十算法十程序设计方法十语言工具和编程环境 数据结构( Data structure)是数据的类型和数据的组织形式。 算法( Algorithm)是为解决某个特定的问题而采用的确定且有限的步骤。 程序设计方法( Programming method) 语言工具和编程环境( Language tools and programming environment) 第一讲〔语言报疹计入门 目录
程序概念 Program Concept 程序的概念 – 程序是计算机解决问题所需的一系列指令的集合。 – A program is a set of self-contained instructions that tells a computer how to solve a problem or carry out a task. 程序=数据结构+算法+程序设计方法+语言工具和编程环境 – 数据结构(Data structure)是数据的类型和数据的组织形式。 – 算法(Algorithm)是为解决某个特定的问题而采用的确定且有限的步骤。 – 程序设计方法(Programming method) – 语言工具和编程环境(Language tools and programming environment) sTruCTureD Programming 第一讲 C语言程序设计入门 目 录
STRUCTURED PROGRAMMING 倒1-1简单程序设计 A Simple program Design 日问题 求方程ax+bx+c=0的根(设b2-4ac≥0) 口程序设计步骤 定义数据结构 Define data structure 设计算法 Design algorithm 确定程序设计方法 Select a programming method 确定语言和开发环境 Select a computer language and programming environment 实现 Implementation 第一讲〔语言报疹计入门 目录
例1-1 简单程序设计 A Simple Program Design 问题 – 求方程ax2+bx+c=0的根(设b2-4ac≥0) 程序设计步骤 – 定义数据结构 Define data structure – 设计算法 Design algorithm – 确定程序设计方法 Select a programming method – 确定语言和开发环境 Select a computer language and programming environment – 实现 Implementation sTruCTureD Programming 第一讲 C语言程序设计入门 目 录