Introduction To Computers
Introduction To Computers
COMPUTERS AND
PROGRAMMING
CS F111 Computer Programming
Levels of Transformations
Problems
Algorithms
Language
Machine (ISA) Architecture
Microarchitecture
Circuits
Devices
Algorithms
▪ Step-by-step
step procedure that has
– Finiteness (guarantees to terminate)
– Definitiveness (each step precisely stated)
– Effective computability (each step could be
computed)
Programs
– Machine independent
– Can be compiled to run on any machine
– Much easier to write than Low level
languages
– Higher productivity and abstractions
▪ Data structures like queues, stacks etc.
▪ Control structures like loops, switch etc.
Low level languages (LLLs)
(LLLs
– Machine specific
▪ Programmer exposed to the internal machine
organization
– They access very low level details
▪ Number and type of registers
▪ Specific instructions
▪ Hardware features
– Lower productivity but higher performing
code
– Generally called as assembly language
The C Language
▪ General-purpose
purpose programming language
▪ Closely associated with the UNIX system
▪ Language is not tied with any operating
system or machine
▪ Knowing C programming helps in other
disciplines too
▪ Product in itself – can create a career
based on programming unlike other courses
Operating System
▪ Written in high-level
level language
▪ Simple user interface that can provide the
services user wants
▪ Allows complex programs to be built from
simpler programs
▪ Hierarchical file system allowing easy
maintenance
▪ Multi-user multi-process
process system; each user
can execute several processes
▪ Hides machine architecture from the user
The UNIX System
▪ Standard input
▪ Standard output
▪ Standard error
Redirection and Piping
▪ A text-based
based editor of Unix used to
write programs
▪ Works in three modes:
– Command mode
– Command line mode
– Input mode