Computer Programming-Programming-Lecture Slides, Slides of Computer Programming

This lecture was delivered by Prof. Varun Sahil to explain Programming concepts at Ankit Institute of Technology and Science. It includes: Computer, Programming, Mathematical, Logical, Operations, Pentium, Machine, Languages, Applications

Typology: Slides

2011/2012

Uploaded on 07/23/2012

paravi
paravi 🇮🇳

5

(1)

65 documents

1 / 31

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Computer Programming
A computing device can perform several
mathematical and logical operations in a
second
Pentium can perform more than 1000,000,000
operations in a second
Now power of a supercomputer is on our desktop
To make a computing device work it needs to
be programmed
There are several programming languages
C is the language of choice for engineers
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f

Partial preview of the text

Download Computer Programming-Programming-Lecture Slides and more Slides Computer Programming in PDF only on Docsity!

Computer Programming

^ A computing device can perform severalmathematical and logical operations in asecond^ ^ Pentium can perform more than 1000,000,000operations in a second^ ^ Now power of a supercomputer is on our desktop ^ To make a computing device work it needs tobe programmed ^ There are several programming languages ^ C is the language of choice for engineers

The most powerful machine on Earth, Space,Moon and Mars: the microprocessor

Applications

^ By programming you can make aPentium or other microprocessors doseveral things ^ At CARE we have developed severalsystems^ ^ All the programs where written in C/C++

Radars

Enhanced MPDR Radar Receiver

for Pakistan Air Force

DoCoMo: Migrateable VideoConferencing System

High Resolution Combat

Simulation

YF-22N22YF docsity.com

Why Programming Language?  Computer only understands machinelanguage^ ^ consists of 1s and 0s^ ^1001011100001000  Initially all computers wereprogrammed using machine language^ ^ difficult and cumbersome^ ^ Only small programs can be written

Machine Language

10100110 0111011000100110 0000000011111010 1111101001001110 1010011011100110 1001011011001110 0010111010100110 0100111011111010 0110011001001110 10000110

etc...

COMPUTER ORGANIZATION

LOW AND HIGH LEVEL PROGRAMMING^ 

Lowest Level: Machine Codes  Directly process able, written inBinary:  10001011 01100111 10011011 11000111  Hard to ‘read’, slow to create, fast torun.

LOW AND HIGH LEVEL PROGRAMMING ^ High level: Pascal, ‘C’, Fortran,‘C++’/Java ^ One statement is equivalent of many ^ machine code operations.

ans = a/(b*24);

^ Human understandable, fast to write, ^ inefficient (?) in terms of code size and run ^ speed, portable between processors.

High-Level Language

#include <stdio.h>int main(){ printf(“Hello World”);return 0;}^ Source code ^ Compilers and linkers translate ahigh level program into executablemachine code.

Executable code

10100110

01110110 00100110

00000000 11111010

11111010 01001110

10100110 11100110

10010110 11001110

00101110 10100110

01001110 11111010

01100110 01001110

(^10000110) etc...

Why C?^ ^ Structured language^ ^ Standard library exists, allowing portability^ ^ C is the

basis for many other languages (Java,

C++, Verilog)  Wide availability on a variety of computers  Low level activities possible  It can produce lean and efficient code  Widely used  preferred language for OS

ANSI C

^ 1972:

C language developed at Bell Labs ^ Dennis Ritchie wrote C for Unix OS ^ Needed C for work with Unix  late 70s:

C becomes popular for OS development by many vendors  The resultant language was first described inthe paper “Portability of C Programs and theUNIX System,” by S.C. Johnson and DennisRitchie in 1978.  This style of C was commonly called UNIX C.