CS 111 – Nov. 5 Sorting –Selection and Bubble √ –insertion: place next element in correct place by shifting over other ones to make space –Merge: Repeatedly.

Slides:



Advertisements
Similar presentations
Programming in Visual Basic
Advertisements

The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
Programming Languages: Notes for Class Discussion: V Deena Engel’s class.
Overview of Programming Paradigms
The Analytical Engine Module 6 Program Translation.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Program Flow Charting How to tackle the beginning stage a program design.
Chapter 16 Programming and Languages: Telling the Computer What to Do.
ISBN Chapter 2 Evolution of the Major Programming Languages.
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
Introduction to Programming (in C++) Introduction Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC.
1 I.Introduction to Algorithm and Programming Algoritma dan Pemrograman – Teknik Informatika UK Petra 2009.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Programming Languages Lecture 12. What is Programming?  The process of telling the computer what to do  Also known as coding.
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to Programming Language CS105 Programming Language First-generation: Machine language Second-generation: Assembly language Third-generation:
Programming Languages
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
 Lesson 03: Computer Programming. The Algorithm A List of Well-Defined Instructions for Completing a Task.
Hello World 2 What does all that mean?.
1 Computing Software. Programming Style Programs that are not documented internally, while they may do what is requested, can be difficult to understand.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
Programming History. Who was the first programmer?
Computer Concepts 2014 Chapter 12 Computer Programming.
ดร.สุรศักดิ์ มังสิงห์ SPU, Computer Science Dept.
Introduction to Computers (L02) * Hardware * Software * Programming Languages * Three Phase of Program Development * Development and Design Steps * Algorithms.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 1- 1 October 20, October 20, 2015October 20, 2015October 20,
Computer System Building blocks of a computer system: Using bits –Binary data and operations –Logic gates Units of measuring amount of data CPU vs. memory.
Chapter 12 Computer Programming. Chapter Contents Chapter 12: Computer Programming 2  Section A: Programming Basics  Section B: Procedural Programming.
Software Basics. Some Pioneers Charles Babbage Analytical Engine Countess Ada Lovelace First Programmer ? John Von Neumann storing instructions in memory.
OCC - CS/CIS CS116-Ch00-Orientation Morgan Kaufmann Publishers ( Augmented & Modified by M.Malaty) 1CS 116 Fall 2003 Not quite finished Creating.
Chapter 6 Programming Languages (1) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Lecture 11: 10/1/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Control Structures sequence of execution of high-level statements.
Introduction to Language Processing Technology Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 3, Lecture 1.
Programming at a high level. Developing a Computer Program Programmer  Writes program in source code (VB or other language) Compiler  Converts source.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Introduction to programming Carl Smith National Certificate Year 2 – Unit 4.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
Programming Languages
CS 1110/1111 The Case for Computer Science CS 1110/1111 – Introduction to Programming.
CONCEPTS OF PROGRAMMING LANGUAGES
Software Development Introduction
Some Computer Science Conceptual Background Material Doug Hogan This version for UIC Spring 2016 CS 107.
CS 125 Lecture 2 Martin van Bommel. Hardware vs Software Hardware - physical components you can see and touch –e.g. processor, keyboard, disk drive Software.
Indexed Addressing addition to implementing new instructions, the extended assembler implements a new addressing mode. This is indexed addressing, a mode.
Software Engineering Algorithms, Compilers, & Lifecycle.
Debuggers. Errors in Computer Code Errors in computer programs are commonly known as bugs. Three types of errors in computer programs –Syntax errors –Runtime.
Programming Languages and Data Organization
Chapter 5: Preparing C Programs
Basic Concepts: computer, program, programming …
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
CSCI 161: Introduction to Programming
Why study programming languages?
Merging Merge. Keep track of smallest element in each sorted half.
Programming Mehdi Bukhari.
MIPS instructions.
High Level Programming Languages
صياغة البرامج ولغات البرمجة Programming & programming languages
CS-401 Computer Architecture & Assembly Language Programming
MIPS Coding.
CS 101 – Oct. 21 Sorting Much-studied problem in CS – many ways to do it Given a list of data, need to arrange it “in order” Some methods do better based.
A G L O R H I M S T A Merging Merge.
ICT Programming Lesson 1:
A G L O R H I M S T A Merging Merge.
A G L O R H I M S T A Merging Merge.
Presentation transcript:

CS 111 – Nov. 5 Sorting –Selection and Bubble √ –insertion: place next element in correct place by shifting over other ones to make space –Merge: Repeatedly split list in half until 1-2 elements each. Then merge adjacent lists by collating them. Computer languages 3 kinds of software errors Commitment –For next week, please read sections 6.2 (review); 9.1, 9.2

Language evolution Machine language Assembly language –Like machine language, also unique to each manufacturer High-level language –FORTRAN, COBOL –Pascal, Algol, Ada –C, C++, C# –Java, Javascript, Python –many more

Example How would we calculate: … ? Let’s create our own solution, and see what the “code” looks like in different types of languages: –Machine language  –Assembly language  –High-level language

Machine language : :200c : :3c0a c:354a :8d4a :018a :1d c:018c : :010b :218c c: : a : c  help me!

Assembly language numValue:.word 20 __start: addi $12, $0, 1 addi $8, $0, 0 lui $10, 0 ori $10, $10, 0x3000 lw $10, 0($10) while: sub $9, $12, $10 bgtz $3, end mult $12, $12 mflo $11 add $8, $8, $11 addi $12, $12, 1 j while end: addi $8, $0, 10 syscall

HLL (Pascal) var sum : integer; count : integer; begin sum := 0; for count := 1 to 20 do sum := sum + count * count; writeln(sum); end.

Bugs Any mistake made in a computer program Term ‘bug’ coined by Grace Hopper, ca kinds of bugs –Syntax errors –Run-time errors –Logical errors Beyond bugs, program can be just slow! –Ex. Ineffective ways of finding the divisors of some number.