cs1101_09A_lec06 - CS1101 Lec06 Programming Languages and...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS1101 Lec06 Programming Languages and Program Development Dr. Jiying Wang Semester A, 2009-10 Computer Science Department City University of Hong Kong CS1101 - Lec10 2 Objectives Differentiate between machine and assembly languages Differentiate between structural and object-oriented languages Differentiate between markup languages and general-purpose programming languages Differentiate between scripting languages and general-purpose programming languages Identify the steps in a typical program development cycle Explain the basic control structures in structural design Use the basic control structures (sequence, selection, repetition) to design solutions for simple problems CS1101 - Lec10 3 For you to practice after class Lec06-Q1: Simple Integer Decryption Download the Decrypt.pdf file from Blackboard and complete the algorithm outline Lec06-Q2: Run-Length Encoding Decompression Download the Decompress.pdf file from Blackboard and complete the flowchart CS1101 - Lec10 4 Programming Languages Computer program a set of instructions that tell a computer how to solve a problem or carry out a task The instructions that make up a computer program are sometimes referred to as code Programming language - a set of keywords and grammar rules for creating program code E.g., BASIC , C , C++ , Pascal , FORTRAN , Java , COBOL Low-level languages typically include commands specific to a particular CPU or microprocessor family High-level languages use command words and grammar based on human languages Programming - the process of writing/ coding a program in a specific programming language to solve some problem CS1101 - Lec10 5 Computer Code Each instruction in a program contains Keyword: a pre-defined command word that is read by the compiler/interpreter of the program Parameters: detailed instructions Syntax: rules that dictate how code is written CS1101 - Lec10 6 Low-level Languages Machine language The 1st generation of programming language The only language CPU directly recognizes Instructions, memory addresses, numbers, characters and all other data are represented by 0s and 1s Assembly language The 2 nd generation of programming language Represent instructions in machine languages in symbolic instruction code (usually are meaningful abbreviations) Need an assembler to translate each assembly code into a corresponding machine code Machine code Assembly code 001 1 000010 LOAD #2 1 010 0 001101 STORE 13 2 001 1 000101 LOAD #5 3 010 0 001110 STORE 14 4 001 0 001101 LOAD 13 5 011 0 001110 ADD 14 6 010 0 001111 STORE 15 7 111 0 000000 HALT CS1101 - Lec10...
View Full Document

Page1 / 23

cs1101_09A_lec06 - CS1101 Lec06 Programming Languages and...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online