Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Welcome to the world of

Computer Science
We are all in this together!
Marks Distribution
Marks Head Frequency Marks Frequency Total Marks
Quiz 3 5 15
Assignment 3 5 15
Mid Term 1 30 30
Final 1 40 40
Total 100

2
Class Rules
❑Mobile phone usage is not allowed
❑Late comers can attend the class but won’t get marked as present
❑Eating food is not allowed during class
❑Late assignments will not get accepted
❑Quiz and Assignment will be announced well before time. Start working the
day you are assigned
❑No retake of quiz will be conducted
❑On copied assignments, tasks quizzes both parties will get straight zero marks
❑Work hard copied work will not get you a grade!

3
Fundamentals of Programming
Lecture 1
Agenda
❑Basic Introduction to Computers
❑Basic Introduction to Computer Program
❑Basic Introduction Programming Languages

5
Computer
a programmable electronic device designed to accept data,
perform prescribed mathematical and logical operations at
high speed, and display the results of these operations

6
What Does Computer Do?

7
Hardware Components
❑Central Processing Unit (CPU)
❑Main Memory

8
Central Processing Unit
❑Control Unit (CU)
• Directs the flow of data through the CPU, to and from other devices

❑Arithmetic Logic Unit (ALU)


• Performs arithmetic calculations and logic decisions

9
Main Memory
❑Ordered sequence of cells
❑Directly connected to CPU
❑All programs must be brought into Main Memory before execution
❑When power is turned off everything in the main memory is lost

10
11
Computer Organization
Six Logical Units
1. Input Unit
2. Output Unit
3. Memory Unit
4. Arithmetic and Logic Unit
5. Central Processing Unit
6. Secondary Storage Unit

12
Operating System
Operating system is a software that communicates with the
hardware and allow other programs to run

Example Services:
• Memory Management
• I/O Operations
• Program Execution

13
Computer Program
❑A computer program is a collection of instructions that perform a
specific task when executed by a computer

❑Programming: Process of creating a set of instructions (lines of


code) that tells a computer how to perform a task

❑Lines of code makes a program


❑Programming can be done using a programming language

14
Programming Languages
Three types of programming languages
❑Machine Languages
❑Assembly Languages
❑High Level Languages

15
Machine Languages
❑Sequence of 0’s and 1’s
❑Bit : a binary digit 0 or 1
❑Byte : sequence of 8 bits
Example(binary):
◦ 01001000
◦ 01100101
◦ 01101100

16
Assembly Language
❑English-like abbreviations representing elementary computer
operations (translated via assemblers)
Example: Assembly Language Machine Language
◦ LOAD LOAD 100100
◦ STORE STORE 100010
◦ ADD ADD 100101

Assembler: translates assembly language instructions into machine


language

17
High Level Language
❑Code similar to everyday English
❑Use mathematical notations (translated via compilers)
Example Languages: Example Code Writing:
◦ C/C++ grosspay = basepay + overtimepay
◦ Java
◦ COBOL
◦ FORTRAN
◦ Basic
Compiler: translates high level language into machine language

18
Programming Paradigm
❑Procedural Programming
◦ Structured/Modular Programming

❑Object Oriented Programming

19
Procedural Programming
❑Follows step by step instructions
❑Top down instructions
❑It contains a systematic order of statements, functions and
commands to complete a computational task or program
❑Examples: C, FORTRAN, COBOL

20
Structured Programming
❑Structured Programming is also known as Modular Programming
and is a subset of procedural programming language
❑Functions- Dividing large problems into smaller modules
❑Each function handles the particular task
❑collection of all the functions is called a program
❑Clear, easy to test and debug and easy to modify
❑Multitasking- Specifying that many activities run in parallel

21
Top Down Approach
Main Module

Module 1 Module 2

Module 1a Module 1b Module 2a

22
Books Used to Create Slides

23

You might also like