0% found this document useful (0 votes)
80 views

What Is Programming

Programming involves: 1) Controlling a computer to do exactly what a programmer specifies through a sequence of instructions expressed in a specific programming language. 2) Teaching a computer how to learn and perform new tasks by telling it how through programming. 3) Solving problems by finding ways for a computer to perform useful tasks through programming.

Uploaded by

Vinitha Arun
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

What Is Programming

Programming involves: 1) Controlling a computer to do exactly what a programmer specifies through a sequence of instructions expressed in a specific programming language. 2) Teaching a computer how to learn and perform new tasks by telling it how through programming. 3) Solving problems by finding ways for a computer to perform useful tasks through programming.

Uploaded by

Vinitha Arun
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

WHAT IS PROGRAMMING?

• Programming

• Computer Languages

BY
P.Vinitha Arun
Aspects of Programming
• Programming is controlling
– computer does exactly what you tell it to

• Programming is teaching
– computer can only “learn” to do new things if you tell it
how
• Programming is problem solving
– always trying to make computer do something useful —
i.e., finding an optimal travel route
• Programming is creative
– must find a good solution out of many possibilities

• Programming is modelling
– describe salient (relevant) properties and behaviours of a
system of components (objects)
What’s a Program?
• Sequences of instructions expressed in specific
programming language:
– syntax: grammatical rules for forming instructions
– semantics: meaning/interpretation of instructions
• Instructions written (programmed /coded) by
programmer coded in a specific programming language
– programming languages allow you to express
yourself more precisely than natural language
– as a result, programs cannot be ambiguous
– all instructions together are called source code
• Executed by computer by carrying out
individual instructions
• Real world example:
– library catalogue, word processor, video game, ATM
The Computer Onion
• Layers of software

– cover hardware like an onion covers its core make it easier to use
computer organized into libraries and programs

hardware
(PC)
Linux

X/Windows

Your Program
Two Views of a Program
software layers hidden by user
interface

user interface

user’s view

programmer’s view

User
Programmer
Programming Languages
• Machine language
– machine is short for computing machine (i.e.,
computer)
– computer’s native language
– sequence of zeroes and ones (binary)
– different computers understand different
sequences
– hard for humans to understand:
01010001...
Programming Languages
• Assembly language
– mnemonics for machine language
– low level: each instruction is minimal
– still hard for humans to understand:
ADD.L d0,d2
– you’ll learn all about assembly if you take CS31
Programming Languages

• High-level languages
– FORTRAN, Pascal, BASIC, C, C++, Java, etc.
– high level: each instruction composed of many
low-level instructions
– closer to English and 9th grade algebra
– easier to read and understand:
hypotenuse = Math.sqrt(opposite *
opposite + adjacent * adjacent);
Programming Languages

You might also like