1 / 14

ID 1061: Introduction to Computer Programming

ID 1061: Introduction to Computer Programming. Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1. Administrative . Class webpage http://www.iith.ac.in/~tbr/teaching/id1061/ CS Teaching Labs 1, 2 (Next to Server Room) Lab Hours Mondays: 2 to 5 PM: EE students and 1 st 7 students of CH

elsa
Download Presentation

ID 1061: Introduction to Computer Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ID 1061: Introduction to Computer Programming Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1

  2. Administrative • Class webpage http://www.iith.ac.in/~tbr/teaching/id1061/ • CS Teaching Labs 1, 2 (Next to Server Room) • Lab Hours • Mondays: 2 to 5 PM: EE students and 1st 7 students of CH • Tuesdays: 2 to 5 PM: CS students and rest of CH students • Thursdays: 2 to 5 PM: ME students • Teaching Assistants (TAs) for course/lab • VanlinSathya • Sangram • Gandherva • Aishwarya • Tony • Jin • Niranjan • Office Hours: Wednesdays 2 to 3 PM (Room 36)

  3. Tentative Syllabus • Introduction to CS and History of C • Linux Basics • Variables and Types • Coding Style and Documentation • Arrays, Strings, Command line arguments • Conditionals and Loops • Functions, Recursion • More Types: unions, structs, typedef • File I/O, C Preprocessor • Bit Operations and Boolean Logic • Pointers, Memory Management

  4. Reference Books • Practical C Programming (3rd Edition) by Steve Oualline, O’reilly Press • A Computer Science Tapestry: Exploring Programming and Computer Science with C++ (2nd Edition) by Owen L. Astrachan • http://www.cs.duke.edu/csed/tapestry/ • The C Programming Language (2nd Edition) by Brian Kernighan and Dennis Ritchie • C: The Complete Reference (4th Edition) by Herbert Schildt, TMG • C++: The Complete Reference (4th Edition) by Herbert Schildt, TMG

  5. Online Resources • http://www.cis.upenn.edu/~cdmurphy/cit593/resources.shtml • http://www1.cs.columbia.edu/~bert/courses/1003/cunix.html • http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-087-practical-programming-in-c-january-iap-2010/lecture-notes/ • Many more will be posted on class webpage

  6. Grading Policy • Mid-term (20%) • End-term (25%) • Homework Assignments (25%) • Individual assignments • Only in Linux platform using gcc compiler • 50% marks for Program • 50% marks for Coding Style and Documentation • Lab Exams (30%) • TAs give 1 or 2 problems on-spot! • No supplementary exams for absentees • 1st Lab Exam (Jan 23, 24, 26!) • 1st HW Assignment Due: Jan 29. Evaluation (Jan 30, 31, Feb 2)

  7. What is Computer Science? • Scientific study of computers • The study of efficient and effective software development techniques • Computer science is a discipline that involves the understanding and design of computers and computational processes • Computer Science is more than programming • The discipline is called informatics in many countries • Elements of both science and engineering • Scientists build to learn, engineers learn to build • http://www.cs.mtu.edu/~john/whatiscs.html

  8. What is Computer? • A device that executes a sequence of computations and instructions • A programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations • Modern computers are electronic and digital • The actual machinery -- wires, transistors, and circuits -- is called hardware. • the instructions and data are called software. • http://en.wikipedia.org/wiki/Computer

  9. What is Program? • A sequence of instructions and computations • Programs are based on Algorithms • Algorithm • A step-by-step problem-solving procedure • eventually stops with an answer • general process rather than specific to a computer or to a programming language • Examples: Searching, finding MAX element in a list

  10. Creating a Program • Specify the problem • remove ambiguities • identify constraints • Develop algorithms, design classes, design software architecture • Implement program • revisit design • test, code, debug • revisit design • Documentation, testing, maintenance of program • From ideas to electrons

  11. Programming Languages • Computers operate on binary circuits • bits are either on (1) or off (0). • Basic operations (adding, multiplying, etc). • But we do not want to write our programs in 0’s and 1’s! • Instead we use programming languages • Want language to be close to English, but more precise • We will learn the C programming language. • C is a “high-level” language; close to English

  12. Compilers

  13. Levels of Programming Language • Machine specific assembly language, Sparc on left, Pentium on right, both generated from the same C main: main: save %sp,-128,%sp pushl %ebp mov 7,%o0 movl %esp,%ebp st %o0,[%fp-20] subl $12,%esp mov 12,%o0 movl $7,-4(%ebp) st %o0,[%fp-24] movl $12,-8(%ebp) ld [%fp-20],%o0 movl -4(%ebp),%eax ld [%fp-24],%o1 imull -8(%ebp),%eax call .umul,0 movl %eax,-12(%ebp) nopxorl %eax,%eax st %o0,[%fp-28] jmp .L1 mov 0,%i0 .align 4 b .LL1 xorl %eax,%eax nopjmp .L1

  14. Reading Assignment 2 • Chapter 1 of Practical C Programming textbook • Chapter 1 of A Computer Science Tapestry textbook

More Related