Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1.

Similar presentations

Presentation on theme: " Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1."— Presentation transcript:

1  Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1

2  Class webpage  CS Teaching Labs 1, 2 (Next to Server Room)  Lab Hours o Mondays: 2 to 5 PM: EE students and 1 st 7 students of CH o Tuesdays: 2 to 5 PM: CS students and rest of CH students o Thursdays: 2 to 5 PM: ME students  Teaching Assistants (TAs) for course/lab o Vanlin Sathya o Sangram o Gandherva o Aishwarya o Tony o Jin o Niranjan  Office Hours: Wednesdays 2 to 3 PM (Room 36)

3  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  Practical C Programming (3rd Edition) by Steve Oualline, O’reilly Press  A Computer Science Tapestry: Exploring Programming and Computer Science with C++ (2 nd Edition) by Owen L. Astrachan o  The C Programming Language (2nd Edition) by Brian Kernighan and Dennis Ritchie  C: The Complete Reference (4 th Edition) by Herbert Schildt, TMG  C++: The Complete Reference (4 th Edition) by Herbert Schildt, TMG

5  s.shtml s.shtml  nix.html nix.html  computer-science/6-087-practical-programming-in-c- january-iap-2010/lecture-notes/ computer-science/6-087-practical-programming-in-c- january-iap-2010/lecture-notes/  Many more will be posted on class webpage

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

7  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 o The discipline is called informatics in many countries o Elements of both science and engineering Scientists build to learn, engineers learn to build 

8  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 o The actual machinery -- wires, transistors, and circuits -- is called hardware. o the instructions and data are called software. 

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

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

11  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


13  Machine specific assembly language, Sparc on left, Pentium on right, both generated from the same C 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) nop xorl %eax,%eax st %o0,[%fp-28] jmp.L1 mov 0,%i0.align 4 b.LL1 xorl %eax,%eax nop jmp.L1

14  Chapter 1 of Practical C Programming textbook  Chapter 1 of A Computer Science Tapestry textbook

Download ppt " Bheemarjuna Reddy Tamma IIT Hyderabad Lecture 1."

Similar presentations

Ads by Google