Principles of computer programming. Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković

Size: px
Start display at page:

Download "Principles of computer programming. Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković"

Transcription

1 Principles of computer programming Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković mtanaskovic@singidunum.ac.rs

2 Course organization Lectures: Presentation of concepts and their illustration through simple examples. The examples will be done in interaction with students Exercises: Practical application of the concepts through more complex examples

3 Lecture material Basic literature 1.) Lecture and exercise slides (course webpage 2.) Book: The C Programming Language from Brian W. Kernighan and Dennis M. Ritchie (available on-line at _language_2.pdf ) Additional literature 1.) Internet (Google as your best friend)

4 Assesment The progress of the students will be continuously monitored during the semester Students can maximally obtain 100 points for this course. Out of these 100 points, 70 can be won during the semester and 30 on the final exam Students will pass the exam by winning at least 51 points during the course. Points in the range result in grade six, points in the range result in grade seven

5 Assesment Final grade will be formed on the basis of obtained points according to the following scheme: points grade 6 (six); points grade 7 (seven); points grade 8 (eight); points grade 9 (nine); points grade 10 (ten).

6 Semester progress assessment 1. Presence at lectures and exercizes (0-10 points) Students who are working and can not come to the lectures and exercises may still win these points by doing a project in agreement with the lecturer 2. Midterm I (0-30 points) student has to obtain at least 17 points in order to pass the first midterm 3. Midterm II (0-30 points) student has to obtain at least 17 points in order to pass the second midterm

7 Midterms The two midterms take place: I midterm in 6 th week of the semester II midterm in 12 th week of the semester During the second midterm, students can also do the first one, while at the final exam students can do both the first and the second midterm The midterms will consist of a written test and a mini project - Test is worth 20 points (10 are needed for a pass) - Mini project is worth 10 points and it is a take home task that students have one week to complete. It is defended orally by practically presenting the results

8 Final exam Final exam will be in a form of a take home project. Students will have two and a half weeks to complete the project The final project is defended orally by practically presenting the results Final exam is worth 30 points

9 Why should you invest your time in learning the material of this course??

10 The future of IT industry Whether you chose to study data science or embedded systems, you will profit from the future trends!

11 Where does the principles of computer programming fit in this story? Principles of computer programming lies in the fundamentals of both areas Dta Science Embedded Systems Domain specific knowledge Orogramming languages Databa ses Maths, Principles of programming

12 Why should you study this course? Form a good fundamental so that you can build your knowledge and expertize on top of it You will be able to profit from this knowledge later as you develop into software engineers!

13 Silabus Course outline Week I II III IV V VI VII VIII Team/Activity Introduction to principles of programming and the C programming language Types, operators and expressions Control flow Functions and program structures Pointers and arrays First Midterm Structures Input and output

14 Silabus Course outline Nedelja X XI XII XIII XIV XV Tema/Aktivnost The UNIX system interface Standard libraries Second Midterm Recapitulation, introduction to writting large projects in C Example of a complex programming project in C Example of a complex programming project in C, preparation for the final exam project

15 Principles of computer programming Profesor : doc. dr Marko Tanasković Assistent : doc. dr Marko Tanasković mtanaskovic@singidunum.ac.rs

16 Definition of a computer Computer (noun) An electronic device which is capable of receiving information (data) in a particular form and of performing a sequence of operations in accordance with a predetermined but variable set of procedural instructions (program) to produce a result in the form of information or signals. Computer, Wikipedia definition A computer is a device that can be instructed to carry out arbitrary sequences of arithmetic or logical operations automatically. The ability of computers to follow generalized sets of operations, called programs, enables them to perform an extremely wide range of tasks.

17 Computer - examples

18 Definition of a computer program Computer program (noun) A sequence of instructions that a computer can interpret and execute Computer program, Wikipedia definition: A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer requires programs to function and typically executes the program's instructions in a central processing unit

19 Computer program - examples

20 Definition of a programming language A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages generally consist of instructions for a computer. Programming languages can be used to create programs that implement specific algorithms. Programming language is a language that a computer may understand. By learning different programming languages we become capable of telling the computer to do what we want it to do

21 What does a computer understand? Computers are binary machines they only work with binary data Binary states in computer are represented by presence and absence of voltage We usually denote these binary states by 1 and 0 A typical binary instruction that a computer would understand

22 Representation of characters in a computer Numbers and characters are also represented as binary sequences in a computer The ASCII standard defines binary sequences that correspond to the alphabet letters and other characters

23 Representation of numbers in a computer Same logic is used for binary numbers

24 Transformation from decimal to binary numbers LSB least significant bit (the most right digit) MSB most significant bit (the most left digit) Binary number:

25 Representation of negative binary numbers How to represent -41? Use the most significant bit to indicate the sign 0 for positive numbers 1 for negative numbers Decimal number Binary representation: Decimal number Binary representation: Alternatively use complement Decimal number Binary representation: Decimal number Binary representation:

26 Should we write our programs as binary instructions?

27 Should we write our programs as binary instructions? Writing programs as binary instructions would be very difficult Programs would be prone to errors and it would be almost impossible for humans to write large and complex computer programs in this way If programming was done through writing binary instructions, the IT industry would newer be in the state it is in now No need to write instructions as binary commands. For each computer architecture there is a finite set of commands that can be used to write instructions assembler

28 Should we write our programs in assembler?

29 Should we write our programs in assembler? An assembler is a low-level programming language for a computer, in which there is a very strong correspondence between the language and the architecture of the machine. Each assembly language is specific to a particular computer architecture Writing code in assembler is easier than writing binary instructions, but still making complex projects and discovering possible errors is very hard Programs written in assembler work only for the corresponding computer architecture. Porting assembler code is hard and programs have to be rewritten in order to work on other architectures

30 High level programming languages A high-level programming language is a programming language with strong abstraction from the details of the computer. Unlike low-level programming languages, it may use natural language elements and be easier to use. This makes the process of developing a program simpler and more understandable relative to a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is A compiler translates a program in a high-level programing language to an assembler code for a given hardware platform. This makes programs written in high level languages easily portable

31 History of high level programming languages 1957 Fortran, first compiler 1958 Lisp 1959 COBOL 1964 BASIC 1970 Pascal 1972 C 1980 C Python 1993 R 1995 Java, Java script PHP

32 Why start with C? C is not specialized to any particular area of application and is quite general, which makes it suitable for learning the fundamentals of computer programming C can be useful both in Embedded Systems and Data Science It is a high-level programming language, but still remains very close to hardware, which makes it very useful for programming in conditions of limited resources or in situations where the speed of execution is critical Most modern operating systems are written in C

33 Prepare the environment for your first program in C We will use Code::Blocks for writing our C programs (open source and freely available at As a compiler we will use GNU GCC Compiler (open source and freely available at

34 1. Start code blocks Your first program in C 2. Start a new project (Files->New->Project) 3. Select Console Project and press Go

35 Your first program in C 3. Select C as your language of choice and click next

36 Your first program in C 4. Specify the name and location directory of your folder and click next

37 Your first program in C 5. Select GNU GCC Compiler and click finish

38 Your first program in C 5. Select GNU GCC Compiler and click finish

39 Your first program in C

40 Your first program in C Include libraries that allow you to write on the standard output (monitor)

41 Your first program in C Program in C is a function that is always called main. It takes no arguments and in this case returns zero

42 Your first program in C Blocks of code are delimited with large brackets { and } in C

43 Your first program in C Each command in C must end with ; Command printf prints its argument to the standard output (console/monitor). The argument of this function is the sentence Hello world! And at the end there is a special sign \n which brings the cursor to the new line

44 Compile and run your program Press the compile and run button

45 Result of the program execution You will further extend this program during the exercise class Have fun, programming is interesting!

CS 241 Data Organization. August 21, 2018

CS 241 Data Organization. August 21, 2018 CS 241 Data Organization August 21, 2018 Contact Info Instructor: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Room 2120 of Farris Web site: www.cs.unm.edu/~vasek/cs241/

More information

Administration Computers Software Algorithms Programming Languages

Administration Computers Software Algorithms Programming Languages Administration Computers Software Algorithms Programming Languages http://www.cs.sfu.ca/cc/130/johnwill/ This course does not use Canvas John Edgar 3 Come to class Read ahead Attend the labs You get practice

More information

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software. Hardware and Software Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages Computer systems consist of hardware and software. Hardware includes the tangible

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 1: Class overview. Cristina Nita-Rotaru Lecture 1/ Fall 2013 1 WELCOME to CS240 Cristina Nita-Rotaru Lecture 1/ Fall 2013 2 240 Team Instructor: Cristina Nita-Rotaru Special

More information

CS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I

CS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I CS 61C: Great Ideas in Computer Architecture Lecture 2: Introduction to C, Part I Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/ 1 Agenda Everything is a Number

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

(0) introduction to the course. how to learn a programming language. (0) course structure

(0) introduction to the course. how to learn a programming language. (0) course structure topics: (0) introduction to the course (1) what is a computer? instructor: cis1.5 introduction to computing using c++ (robotics applications) spring 2008 lecture # I.1 introduction Prof Azhar, mqazhar@sci.brooklyn.cuny.edu

More information

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software. Hardware and Software Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages Computer systems consist of hardware and software. Hardware includes the tangible

More information

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG) SKILL AREA 304: Review Programming Language Concept Computer Programming (YPG) 304.1 Demonstrate an Understanding of Basic of Programming Language 304.1.1 Explain the purpose of computer program 304.1.2

More information

Spring 2018 NENG 202 Introduction to Computer Programming

Spring 2018 NENG 202 Introduction to Computer Programming Spring 2018 NENG 202 Introduction to Computer Programming Introductory programming course based on the C language Course Website: http://www.albany.edu/~yx152122/neng202-18.html Instructor: Prof. Y. Alex

More information

PROGRAMMAZIONE I A.A. 2017/2018

PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMAZIONE I A.A. 2017/2018 PROGRAMMING LANGUAGES A programming language is a formal language that specifies a set of instructions that can be used to produce various kinds of output. Programming languages

More information

CS 240 Fall 2015 Section 004. Alvin Chao, Professor

CS 240 Fall 2015 Section 004. Alvin Chao, Professor CS 240 Fall 2015 Section 004 Alvin Chao, Professor Today Course overview Data Structures / Algorithms Course policies The C language Motivation Computers are digital Data is stored in binary format (1's

More information

ENGINEERING PROGRAMMING

ENGINEERING PROGRAMMING ENGINEERING PROGRAMMING MS in Earth Science Engineering Semester 1, 2018/19 COURSE COMMUNICATION FOLDER University of Miskolc Faculty of Earth Science and Engineering Institute of Geophysics and Geoinformatics

More information

EL2310 Scientific Programming

EL2310 Scientific Programming Lecture 6: Introduction to C (pronobis@kth.se) Overview Overview Lecture 6: Introduction to C Roots of C Getting started with C Closer look at Hello World Programming Environment Schedule Last time (and

More information

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline

William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline William Paterson University of New Jersey Department of Computer Science College of Science and Health Course Outline I. Course Title: CS 280 Computer and Assembler Language 3 credits II. III. IV. Course

More information

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations Chapter 2 Bits, Data Types, and Operations Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University How do we represent data in a computer?!

More information

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics Computer Organization Computer Basics TOPICS Computer Organization Data Representation Program Execution Computer Languages 1 2 Architecture Computer Organization n central-processing unit n performs the

More information

ENGR/CS 101 CS Session Lecture 3

ENGR/CS 101 CS Session Lecture 3 ENGR/CS 101 CS Session Lecture 3 Log into Windows/ACENET (reboot if in Linux) Start Microsoft Visual Studio 2010 Windows button -> All Programs -> 02 Programming -> Microsoft Visual Studio 2010 -> Microsoft

More information

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng Slide Set 1 for ENEL 339 Fall 2014 Lecture Section 02 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Fall Term, 2014 ENEL 353 F14 Section

More information

Assignment 1: Communicating with Programs

Assignment 1: Communicating with Programs Assignment 1: Communicating with Programs EC602 Design by Software Fall 2018 Contents 1 Introduction 2 1.1 Assignment Goals........................... 2 1.2 Group Size.............................. 2 1.3

More information

CS 211 Programming I for Engineers

CS 211 Programming I for Engineers CS 211 Programming I for Engineers Instructor: Tom Bartenstein Course Web Page: http://www.cs.binghamton.edu/~tbartens/cs211_fall_2018/ 1 Catalog Description Introduction to computer programming with engineering

More information

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University ITC213: STRUCTURED PROGRAMMING Bhaskar Shrestha National College of Computer Studies Tribhuvan University Lecture 04: Introduction to C Readings: Chapter 1.5-1.7 What is C? C is a general-purpose, structured

More information

0 Introduction: Computer systems and program development

0 Introduction: Computer systems and program development 0 Introduction: Computer systems and program development Outline 1 Introduction 2 What Is a Computer? 3 Computer Organization 4 Evolution of Operating Systems 5 Personal Computing, Distributed Computing

More information

Advanced Compiler Construction

Advanced Compiler Construction CS 526 Advanced Compiler Construction http://misailo.cs.illinois.edu/courses/cs526 Goals of the Course Develop a fundamental understanding of the major approaches to program analysis and optimization Understand

More information

SE311: Design of Digital Systems

SE311: Design of Digital Systems SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir Al-Amer (Term 041) SE311_Lec3 (c) 2004 AL-AMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary

More information

Room 3P16 Telephone: extension ~irjohnson/uqc146s1.html

Room 3P16 Telephone: extension ~irjohnson/uqc146s1.html UQC146S1 Introductory Image Processing in C Ian Johnson Room 3P16 Telephone: extension 3167 Email: Ian.Johnson@uwe.ac.uk http://www.csm.uwe.ac.uk/ ~irjohnson/uqc146s1.html Ian Johnson 1 UQC146S1 What is

More information

C Language, Token, Keywords, Constant, variable

C Language, Token, Keywords, Constant, variable C Language, Token, Keywords, Constant, variable A language written by Brian Kernighan and Dennis Ritchie. This was to be the language that UNIX was written in to become the first "portable" language. C

More information

The Gray Code. Script

The Gray Code. Script Course: B.Sc. Applied Physical Science (Computer Science) Year & Sem.: IInd Year, Sem - IIIrd Subject: Computer Science Paper No.: IX Paper Title: Computer System Architecture Lecture No.: 9 Lecture Title:

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple client server protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

Remaining Enhanced Labs

Remaining Enhanced Labs Here are some announcements regarding the end of the semester, and the specifications for the last Enhanced Labs. Don t forget that you need to take the Common Final Examination on Saturday, May 5, from

More information

Introduction to Programming in Turing. Input, Output, and Variables

Introduction to Programming in Turing. Input, Output, and Variables Introduction to Programming in Turing Input, Output, and Variables The IPO Model The most basic model for a computer system is the Input-Processing-Output (IPO) Model. In order to interact with the computer

More information

Life Cycle of Source Program - Compiler Design

Life Cycle of Source Program - Compiler Design Life Cycle of Source Program - Compiler Design Vishal Trivedi * Gandhinagar Institute of Technology, Gandhinagar, Gujarat, India E-mail: raja.vishaltrivedi@gmail.com Abstract: This Research paper gives

More information

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture

More information

Python Programming Exercises 1

Python Programming Exercises 1 Python Programming Exercises 1 Notes: throughout these exercises >>> preceeds code that should be typed directly into the Python interpreter. To get the most out of these exercises, don t just follow them

More information

1.1 Information representation

1.1 Information representation Fundamentals of Data Representation: Before we jump into the world of number systems, we'll need a point of reference; I recommend that you copy the following table that you can refer to throughout this

More information

Introduction to Basis and Practice in Programming

Introduction to Basis and Practice in Programming Introduction to Basis and Practice in Programming Fall 2015 Jinkyu Jeong (jinkyu@skku.edu) 1 Course Overview Course Basics! Class hour GEDB029-45: Mon. 13:00 ~ 14:50 GEDB029-46: Tue. 13:00 ~ 14:50 1~2

More information

Introductory Lecture. CS319: Scientific Computing (with C++) Week 1: 11 Jan, Lecturer: Niall Madden.

Introductory Lecture. CS319: Scientific Computing (with C++) Week 1: 11 Jan, Lecturer: Niall Madden. Introductory Lecture CS319: Scientific Computing (with C++) Lecturer: Niall Madden Week 1: 11 Jan, 2017 http://www.maths.nuigalway.ie/~niall/cs319/ Source: Wikipedia CS319 Introductory Lecture 1/33 Outline

More information

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A

CSCE150A. Administrivia. Overview. Hardware. Software. Example. Program. Pseudocode. Flowchart. Control Structures. Hello World Program CSCE150A Computer Science & Engineering 150A Problem Solving Using Computers Lecture 01 - Course Introduction Stephen Scott (Adapted from Christopher M. Bourke) Roll Syllabus Course Webpage: http://cse.unl.edu/~sscott/teach/classes/cse150af09/

More information

Computer Science & Engineering 150A Problem Solving Using Computers

Computer Science & Engineering 150A Problem Solving Using Computers Computer Science & Engineering 150A Problem Solving Using Computers Lecture 01 - Course Introduction Stephen Scott (Adapted from Christopher M. Bourke) 1 / 43 Fall 2009 Roll Syllabus Course Webpage: http://cse.unl.edu/~sscott/teach/classes/cse150af09/

More information

a name refers to an object side effect of assigning composite objects

a name refers to an object side effect of assigning composite objects Outline 1 Formal Languages syntax and semantics Backus-Naur Form 2 Strings, Lists, and Tuples composite data types building data structures the % operator 3 Shared References a name refers to an object

More information

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations Chapter 2 Bits, Data Types, and Operations Original slides from Gregory Byrd, North Carolina State University Modified by Chris Wilcox, S. Rajopadhye Colorado State University How do we represent data

More information

CMPUT 201: Practical Programming Methodology. Guohui Lin Department of Computing Science University of Alberta September 2018

CMPUT 201: Practical Programming Methodology. Guohui Lin Department of Computing Science University of Alberta September 2018 CMPUT 201: Practical Programming Methodology Guohui Lin guohui@ualberta.ca Department of Computing Science University of Alberta September 2018 Lecture 1: Course Outline Agenda: Course calendar description

More information

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations Chapter 2 Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize

More information

Computers and programming languages introduction

Computers and programming languages introduction Computers and programming languages introduction Eugeniy E. Mikhailov The College of William & Mary Lecture 01 Eugeniy Mikhailov (W&M) Practical Computing Lecture 01 1 / 19 Class goals and structure Primary

More information

Computers Programming Course 5. Iulian Năstac

Computers Programming Course 5. Iulian Năstac Computers Programming Course 5 Iulian Năstac Recap from previous course Classification of the programming languages High level (Ada, Pascal, Fortran, etc.) programming languages with strong abstraction

More information

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune

Unit 1: Introduction to Programming. Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune Unit 1: Introduction to Programming Saurabh Khatri Lecturer Department of Computer Technology VIT, Pune Syllabus Unit 1: Introduction to Programming Unit 2: Flow of Control and Functions Unit 3: Arrays

More information

G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY Pasupula, Nandikotkur Road, Kurnool

G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY Pasupula, Nandikotkur Road, Kurnool G. PULLAIAH COLLEGE OF ENGINEERING AND TECHNOLOGY Pasupula, Nandikotkur Road, Kurnool-518014 BRANCH: COMPUTER SCIENCE AND ENGINEERING COURSE DESCRIPTION FORM Course Title Course Code Regulation Course

More information

CS 110 Computer Architecture. Lecture 2: Introduction to C, Part I. Instructor: Sören Schwertfeger.

CS 110 Computer Architecture. Lecture 2: Introduction to C, Part I. Instructor: Sören Schwertfeger. CS 110 Computer Architecture Lecture 2: Introduction to C, Part I Instructor: Sören Schwertfeger http://shtech.org/courses/ca/ School of Information Science and Technology SIST ShanghaiTech University

More information

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014

CMPSCI 250: Introduction to Computation. Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014 CMPSCI 250: Introduction to Computation Lecture #1: Things, Sets and Strings David Mix Barrington 22 January 2014 Things, Sets, and Strings The Mathematical Method Administrative Stuff The Objects of Mathematics

More information

KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop

KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop KULLEĠĠ SAN BENEDITTU Secondary School, Kirkop Mark HALF YEARLY EXAMINATION 2014/2015 Level 5 6 7-8 Form 4 COMPUTING TIME: 1h 30min Question 1 2 3 4 5 6 7 8 9 Global Mark Max. Mark 8 5 7 10 8 12 13 16

More information

SWEN-250 Personal SE. Introduction to C

SWEN-250 Personal SE. Introduction to C SWEN-250 Personal SE Introduction to C A Bit of History Developed in the early to mid 70s Dennis Ritchie as a systems programming language. Adopted by Ken Thompson to write Unix on a the PDP-11. At the

More information

a- As a special case, if there is only one symbol, no bits are required to specify it.

a- As a special case, if there is only one symbol, no bits are required to specify it. Codes A single bit is useful if exactly two answers to a question are possible. Examples include the result of a coin toss (heads or tails), Most situations in life are more complicated. This chapter concerns

More information

CS 240 Fall Mike Lam, Professor. Just-for-fun survey:

CS 240 Fall Mike Lam, Professor. Just-for-fun survey: CS 240 Fall 2014 Mike Lam, Professor Just-for-fun survey: http://strawpoll.me/2421207 Today Course overview Course policies Python Motivation Computers are digital Data is stored in binary format (1's

More information

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented Course Goal CMSC 330: Organization of Programming Languages Introduction Learn how programming languages work Broaden your language horizons! Different programming languages! Different language features

More information

Chapter 2 Bits, Data Types, and Operations

Chapter 2 Bits, Data Types, and Operations Chapter Bits, Data Types, and Operations How do we represent data in a computer? At the lowest level, a computer is an electronic machine. works by controlling the flow of electrons Easy to recognize two

More information

LAB A Translating Data to Binary

LAB A Translating Data to Binary LAB A Translating Data to Binary Create a directory for this lab and perform in it the following groups of tasks: LabA1.java 1. Write the Java app LabA1 that takes an int via a command-line argument args[0]

More information

Programming (Econometrics)

Programming (Econometrics) Programming (Econometrics) Lecture 1: Introduction Tommi Tervonen Econometric Institute, Erasmus University Rotterdam Course learning objectives After this course, you should be able to: Program econometrical

More information

Interfacing with C++

Interfacing with C++ Interfacing with C++ Jayantha Katupitiya Kim Bentley Interfacing with C++ Programming Real-World Applications ABC Dr. Jayantha Katupitiya Senior Lecturer School of Mechanical and Manufacturing Engineering

More information

Syllabus of ENPM 691: Secure Programming in C

Syllabus of ENPM 691: Secure Programming in C Syllabus of ENPM 691: Secure Programming in C Spring Semester 2018 Instructor: Dharmalingam Ganesan, PhD Contact: dganesan@umd.edu Class hours: Thursday 7:00 PM to 9:40 PM Class location: TBA Course Description:

More information

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo Principles in Programming: Orientation & Lecture 1 1 Course Objectives Introduce various subjects in computer science through puzzles and problems Most problems came from ICPC 2 Introduction Instructor:

More information

Overview. Exercise 0: Implementing a Client. Setup and Preparation

Overview. Exercise 0: Implementing a Client. Setup and Preparation Overview This Lab assignment is similar to the previous one, in that you will be implementing a simple clientserver protocol. There are several differences, however. This time you will use the SOCK_DGRAM

More information

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

More on Arrays CS 16: Solving Problems with Computers I Lecture #13 More on Arrays CS 16: Solving Problems with Computers I Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Announcements Homework #12 due today No homework assigned today!! Lab #7 is due on Monday,

More information

ALT-Assembly Language Tutorial

ALT-Assembly Language Tutorial ALT-Assembly Language Tutorial ASSEMBLY LANGUAGE TUTORIAL Let s Learn in New Look SHAIK BILAL AHMED i A B O U T T H E T U TO R I A L Assembly Programming Tutorial Assembly language is a low-level programming

More information

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering?

Lecture 1. Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Lecture 1 Introduction to course, Welcome to Engineering, What is Programming and Why is this the first thing being covered in Engineering? Welcome to ENGR 102 Syllabus review Your Time Expectations (in

More information

Chapter 3 DATA REPRESENTATION

Chapter 3 DATA REPRESENTATION Page1 Chapter 3 DATA REPRESENTATION Digital Number Systems In digital systems like computers, the quantities are represented by symbols called digits. Many number systems are in use in digital technology

More information

9/3/2016. ECE 120: Introduction to Computing. Few Programmers Write Instructions (Assembly Code) Spend a Week Learning the C Programming Language

9/3/2016. ECE 120: Introduction to Computing. Few Programmers Write Instructions (Assembly Code) Spend a Week Learning the C Programming Language University of Illinois at Urbana-Champaign Dept. of Electrical and Computer Engineering ECE 120: Introduction to Computing Introduction to the C Programming Language Few Programmers Write Instructions

More information

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation Course Schedule CS 221 Computer Architecture Week 3: Information Representation (2) Fall 2001 W1 Sep 11- Sep 14 Introduction W2 Sep 18- Sep 21 Information Representation (1) (Chapter 3) W3 Sep 25- Sep

More information

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION ECOM 2325 Computer Organization and Assembly Language Instructor: Ruba A.Salamah INTRODUCTION Overview Welcome to ECOM 2325 Assembly-, Machine-, and High-Level Languages Assembly Language Programming Tools

More information

Lecture 1: Preliminaries

Lecture 1: Preliminaries Lecture 1: Preliminaries Edgardo Molina Department of Computer Science City College of New York August 30, 2011 Edgardo Molina (CS@CCNY) Lecture 1 August 30, 2011 1 / 44 Info and Schedule Course Info and

More information

ECE 250 / CS 250 Computer Architecture. C to Binary: Memory & Data Representations. Benjamin Lee

ECE 250 / CS 250 Computer Architecture. C to Binary: Memory & Data Representations. Benjamin Lee ECE 250 / CS 250 Computer Architecture C to Binary: Memory & Data Representations Benjamin Lee Slides based on those from Alvin Lebeck, Daniel Sorin, Andrew Hilton, Amir Roth, Gershon Kedem Administrivia

More information

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations. Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations

More information

CS102 Unit 2. Sets and Mathematical Formalism Programming Languages and Simple Program Execution

CS102 Unit 2. Sets and Mathematical Formalism Programming Languages and Simple Program Execution 1 CS102 Unit 2 Sets and Mathematical Formalism Programming Languages and Simple Program Execution 2 Review Show how "Hi!\n" would be stored in the memory below Use decimal to represent each byte Remember

More information

Summary of Last Class. Processes. C vs. Java. C vs. Java (cont.) C vs. Java (cont.) Tevfik Ko!ar. CSC Systems Programming Fall 2008

Summary of Last Class. Processes. C vs. Java. C vs. Java (cont.) C vs. Java (cont.) Tevfik Ko!ar. CSC Systems Programming Fall 2008 CSC 4304 - Systems Programming Fall 2008 Lecture - II Basics of C Programming Summary of Last Class Basics of UNIX: logging in, changing password text editing with vi, emacs and pico file and director

More information

Concepts in Programming Languages

Concepts in Programming Languages Concepts in Programming Languages Marcelo Fiore Computer Laboratory University of Cambridge 2012 2013 (Easter Term) 1 Practicalities Course web page: with lecture

More information

CS120 Computer Science I. Instructor: Jia Song

CS120 Computer Science I. Instructor: Jia Song CS120 Computer Science I Instructor: Jia Song Instructor Contact Information Instructor: Dr. Jia Song Email: jsong@uidaho.edu (Preferred) Phone: (208) 885-1710 Office: JEB 240 (CSDS Security Lab) JEB 340

More information

Lecture 1 - Introduction (Class Notes)

Lecture 1 - Introduction (Class Notes) Lecture 1 - Introduction (Class Notes) Outline: How does a computer work? Very brief! What is programming? The evolution of programming languages Generations of programming languages Compiled vs. Interpreted

More information

Programming Language Basics

Programming Language Basics Programming Language Basics Lecture Outline & Notes Overview 1. History & Background 2. Basic Program structure a. How an operating system runs a program i. Machine code ii. OS- specific commands to setup

More information

Operating System Labs. Yuanbin Wu

Operating System Labs. Yuanbin Wu Operating System Labs Yuanbin Wu cs@ecnu Operating System Labs Introduction to Unix (*nix) Course Overview Operating System Labs Introduction to Unix (*nix) Course Overview Unix / *nix What A family of

More information

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming Topics C H A P T E R 1 Introduction to Computers and Programming Introduction Hardware and Software How Computers Store Data Using Python Introduction Computers can be programmed Designed to do any job

More information

Programming (ERIM) Lecture 1: Introduction to programming paradigms and typing systems. Tommi Tervonen

Programming (ERIM) Lecture 1: Introduction to programming paradigms and typing systems. Tommi Tervonen Programming (ERIM) Lecture 1: Introduction to programming paradigms and typing systems Tommi Tervonen Econometric Institute, Erasmus School of Economics Course learning objectives After this course, you

More information

Chapter 10 Binary Arithmetics

Chapter 10 Binary Arithmetics 27..27 Chapter Binary Arithmetics Dr.-Ing. Stefan Werner Table of content Chapter : Switching Algebra Chapter 2: Logical Levels, Timing & Delays Chapter 3: Karnaugh-Veitch-Maps Chapter 4: Combinational

More information

Final Labs and Tutors

Final Labs and Tutors ICT106 Fundamentals of Computer Systems - Topic 2 REPRESENTATION AND STORAGE OF INFORMATION Reading: Linux Assembly Programming Language, Ch 2.4-2.9 and 3.6-3.8 Final Labs and Tutors Venue and time South

More information

Computer Principles and Components 1

Computer Principles and Components 1 Computer Principles and Components 1 Course Map This module provides an overview of the hardware and software environment being used throughout the course. Introduction Computer Principles and Components

More information

CS 241 Data Organization using C

CS 241 Data Organization using C CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am

More information

Introduction to C. CS 2060 Week 1. Prof. Jonathan Ventura. Outline Introduction Introduction to C Homework 1 C Coding Style Wrap-up

Introduction to C. CS 2060 Week 1. Prof. Jonathan Ventura. Outline Introduction Introduction to C Homework 1 C Coding Style Wrap-up Outline Introduction Homework 1 C Coding Style Wrap-up CS 2060 Week 1 Outline Introduction Homework 1 C Coding Style Wrap-up 1 Introduction Why C? Syllabus and Course Structure 2 First C example: Hello,

More information

IBM 370 Basic Data Types

IBM 370 Basic Data Types IBM 370 Basic Data Types This lecture discusses the basic data types used on the IBM 370, 1. Two s complement binary numbers 2. EBCDIC (Extended Binary Coded Decimal Interchange Code) 3. Zoned Decimal

More information

Hands-On Ethical Hacking and Network Defense 2 nd edition

Hands-On Ethical Hacking and Network Defense 2 nd edition Hands-On Ethical Hacking and Network Defense 2 nd edition Chapter 7 Programming for Security Professionals Last modified 9-29-16 Objectives Explain basic programming concepts Write a simple C program Explain

More information

Central Washington University Department of Computer Science Course Syllabus

Central Washington University Department of Computer Science Course Syllabus Central Washington University Department of Computer Science Course Syllabus CS 110: Programming Fundamentals I December 27, 2015 1 Course Information Course Information Lecture: Mo,Tu,We: 10:00AM - 10:50AM,

More information

Chapter 2: Programming Concepts

Chapter 2: Programming Concepts Chapter 2: Programming Concepts Objectives Students should Know the steps required to create programs using a programming language and related terminology. Be familiar with the basic structure of a Java

More information

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers

Real Numbers finite subset real numbers floating point numbers Scientific Notation fixed point numbers Real Numbers We have been studying integer arithmetic up to this point. We have discovered that a standard computer can represent a finite subset of the infinite set of integers. The range is determined

More information

Common Core State Standards Mathematics (Subset K-5 Counting and Cardinality, Operations and Algebraic Thinking, Number and Operations in Base 10)

Common Core State Standards Mathematics (Subset K-5 Counting and Cardinality, Operations and Algebraic Thinking, Number and Operations in Base 10) Kindergarten 1 Common Core State Standards Mathematics (Subset K-5 Counting and Cardinality,, Number and Operations in Base 10) Kindergarten Counting and Cardinality Know number names and the count sequence.

More information

EP241 Computer Programming

EP241 Computer Programming EP241 Computer Programming Topic 1 Dr. Ahmet BİNGÜL Department of Engineering Physics University of Gaziantep Modifications by Dr. Andrew BEDDALL Department of Electric and Electronics Engineering Sep

More information

Slide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng

Slide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng Slide Set 5 for ENCM 369 Winter 2014 Lecture Section 01 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary Winter Term, 2014 ENCM 369 W14 Section

More information

C Programming for Engineers Introduction

C Programming for Engineers Introduction C Programming for Engineers Introduction ICEN 360 Spring 2017 Prof. Dola Saha 1 Introductions Instructor Prof. Dola Saha, PhD University of Colorado Boulder http://www.albany.edu/faculty/dsaha/ dsaha@albany.edu

More information

BCIS 3630 Dr. GUYNES FALL 2014 MONDAY SECTION

BCIS 3630 Dr. GUYNES FALL 2014 MONDAY SECTION GUYNES s CLASS RULES During the lecture portion of the class [the first 2 hours], all laptops, all cellphones, all Ipads, all PDAs, etc. must be turned off and put away. They cannot be on the desktop,

More information

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I

CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I CSC 015: FUNDAMENTALS OF COMPUTER SCIENCE I Lecture 1: Class Introduction DR. BO TANG ASSISTANT PROFESSOR HOFSTRA UNIVERSITY 1 9/7/16 CSC15 - Python OUTLINE What is Computer Science? What is this Class

More information

COMP1917: Computing 1 1. Introduction

COMP1917: Computing 1 1. Introduction COMP1917: Computing 1 1. Introduction Reading: Moffat, Chapter 1. COMP1917 12s2 Introduction 1 Course Web Site http://www.cse.unsw.edu.au/~cs1917/12s2 Please check this Web Site regularly for updated information,

More information

Software Lesson 2 Outline

Software Lesson 2 Outline Software Lesson 2 Outline 1. Software Lesson 2 Outline 2. Languages 3. Ingredients of a Language 4. Kinds of Languages 5. Natural Languages #1 6. Natural Languages #2 7. Natural Languages #3 8. Natural

More information

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang

Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Introduction to C CMSC 104 Spring 2014, Section 02, Lecture 6 Jason Tang Topics History of Programming Languages Compilation Process Anatomy of C CMSC 104 Coding Standards Machine Code In the beginning,

More information

COMP1917: Computing 1 1. Introduction

COMP1917: Computing 1 1. Introduction COMP1917: Computing 1 1. Introduction Reading: Moffat, Chapter 1. COMP1917 15s2 Introduction 1 Course Web Site http://www.cse.unsw.edu.au/~cs1917/15s2 Please check this Web Site regularly for updated information,

More information