Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

Course Title: Computer Fundamentals & Programming

Course No : CSE 1287

SYLLABUS
Course Title: Computer Fundamentals & Programming
Course No : CSE 1287

REFERENCE BOOKS
NAME WRITER

Programming in C Stephen G. Kochan

PROGAMMING IN ANSCII C E BALAGURUSAMY

PROGRAMMING WITH C BYRON GOTTFRIED

TEACH YOURSELF C HERBERT SCHILDT


Brian W. Kernighan
C Programming Language
Dennis M. Ritchie
SYLLABUS CONTENT ON CSE 1287

MAJOR THREE PATRS:

 Introduction to computer fundamentals


 Hardware
 Programming concept
CONTENTS
 PROGRMMING LANGUAGE
 ADVANTAGES OF HIGH LEVEL LANGUAGE
 COMPILER, INTERPRETER AND ASSEMBLER
 SOURCE PROGRAM AND OBJECT PROGAM
 DIFFERENCE BETWEEN COMPILER AND INTERPRETER
 ADVANTAGES OF COMPILER
 ADVANTAGES OF INTERPRETER
 C HISTORY
 INTRODUCTION TO C
 ADVANTAGES OF C PROGRAMMING
 OPERATING SYSTEM
PROGRMMING LANGUAGE

There are many different languages can be used


to program a computer.
 HIGH LEVEL LANGUAGE
 LOW LEVEL LANGUAGE

LANGUAGE EXAMPLE

Python, JavaScript, Visual


HIGH LEVEL LANGUAGE Basic, Delphi, Perl, PHP,
ECMAScript, Ruby, C#, Java
LOW/HIGH LEVEL
C,C++,BASIC,FORTRAN
LANGUAGUE
LOW LVEL LANGUAGE MACHINE, ASSEMBLY
MACHINE LANGUAGE: The lowest-level programming
language.

 Machine languages are the only languages


understood by computers.

 While easily understood by computers, machine


languages are almost impossible for humans to use
because they consist entirely of numbers.

 Programmers, therefore, use either a high-level


programming language or an assembly language.
Assembly languages: Assembly language are a
type of low-level languages for programming
computers, microprocessors, microcontrollers.

 An assembly language contains the same


instructions as a machine language, but the
instructions and variables have names instead of
being just numbers.
HIGH-LEVEL LANGUAGE: A high-level programming
language is a programming language with strong
abstraction from the details of the computer.

 Such languages are considered high-level


because they are closer to human languages and
further from machine languages.
LOW-LEVEL LANGUAGE: A low-level programming
language is a programming language that provides
little or no abstraction from a computer's instruction
set architecture.

The computer ... into this,


You write this
translates it which it can run

1/45
ADVANTAGES OF HIGH LEVEL LANGUAGE
The high-level language offer three significant
advantages over machine language.
 SIMPLICITY
 UNIFORMITY
 PORTABILITY (i.e. MACHINE INDEPANDENCE)

In other words, we may say the main advantage of high-


level languages over low-level languages is that they are
easier to read, write, and maintain.
KEY POINTS:

 Machine languages are the only languages


understood by computers.
 A program that is written in high-level language
must be translated into machine language before it
can be executed. This is known as compilation or
interpretation.
The question arises how high-level language
is converted into machine language?

The entire task can be completed using


compiler or interpreter.
COMPILER, ASSEMBLER AND INTERPRETER

COMPILER: A compiler is itself a computer


program. Programs written in high-level
languages are translated into assembly language
or machine language by a compiler.

ASSEMBLER: A program that translates


programs from assembly language to machine
language.
INTERPRETER: A program that executes
instructions written in a high-level language.

 There are two ways to run programs written in a


high-level language.

The most common is to compile the program; the


other method is to pass the program through an
interpreter.
KEY POINTS
 A compiler and interpreter is itself a
computer program.

 It accepts a program written in a high-level


language(e.g. C) as input, and generates a
corresponding machine-language program
as output.
DIFFERENCE BETWEEN COMPILER AND INTERPRETER

 A compiler first takes in the entire program, checks for


errors, compiles it and then executes it.

 Whereas, an interpreter does this line by line, so it takes


one line, checks it for errors and then executes it.

NAME EXAMPLE
COMPILER JAVA,C
INTERPRETER PHP

Python
???
C COMPILER

NAME EXAMPLE
GCC
Unix and Unix-Like
(GNU Compiler
Also Windows
Collection)
MS-DOS Turbo C
SOURCE PROGRAM AND OBJECT PROGRAM

SOURCE PROGRAM: The original high-level


program is called source program.

OBJECT PROGRAM: The resulting machine


language program is called object program.
ADVANTAGES OF COMPILER

 They produce programs which run quickly.

 They can spot syntax errors while the program is


being compiled. However, this does not mean that
a program that compiles correctly is error-free!
ADVANTAGES OF INTERPRETER

 There is no lengthy "compile time", i.e. you do not have


to wait between writing a program and running it, for it to
compile. As soon as you have written a program, you can
run it.

 They tend to be more "portable", which means that they


will run on a greater variety of machines. This is because
each machine can have its own interpreter for that
language.
C HISTORY
 C was originally developed in the 1970s by Dennis Ritchie at
Bell Telephone Laboratories.
Designed for systems programming
Operating systems
Utility programs
Compilers
Filters

 Designed for application programming ( for writing a program


to solve a complicated system of mathematical equations).
INTRODUCTION TO C
 Currently, the most commonly-used language for embedded
systems

 “High-level assembly”

 Very portable: compilers exist for virtually every processor

 Easy-to-understand compilation

 Produces efficient code

 Fairly concise
ADVANTAGES OF C PROGRAMMING

 C is simpler and more compact.

 It's usually easier to work out what the program's doing.

 It's more portable.

 it has relatively small instruction set, though actual


implementation include extensive library functions which
enhance the basic instruction.
 It is free-form language.
OPERATING SYSTEM

OPERATING SYSTEM: An operating system is


a program that controls the entire operation of a
computer system.

All input/output operations are channeled


through the operating system.
EXAMPLE OF OPERATING SYSTEM

 UNIX ( for minicomputer)


 MS-DOS( for microcomputer)
 LINUX
Windows
Unix-like
KEY POINTS
The most important program that runs on a
computer.

 Every general-purpose computer must have


an operating system to run other programs.

 Operating systems perform basic tasks, such as


recognizing input from the keyboard, sending output to
the display screen, and controlling peripheral devices
such as disk drives and printers.
WHY SHOULD WE STUDY C PROGRAMMING

Suppose we want to determine the prime numbers


between 1 to 100000. If we want to calculate this by
hand it will take enough time with error. But if we
calculate this using programming( here we will use c
programming) then this problem can be calculated
within a second.

Embedded the code to the edge computing devices


so that you could shape the world. Like Robot

You might also like