285x Filetype PDF File size 0.13 MB Source: math.uaa.alaska.edu
Chapter 4
Chapter 4:
Computer Languages,
Algorithms and Program
Development
How do computers know what
we want them to do?
Computer Languages, Algorithms
and Program Development
n In this lecture:
What makes up a language and how do we use language to communicate
with each other and with computers?
How did computer programming languages evolve?
How do computers understand what we are telling them to do?
What are the steps involved in building a program?
The Computer Continuum 1
Chapter 4
Communicating with
a Computer
n Communication cycle
One complete unit of communication.
– An idea to be sent.
– An encoder. Speaker encodes
– A sender. information Listener decodes
– A medium. information
– A receiver.
– A decoder.
– A response.
Listener returns
feedback to speaker
Communicating with
a Computer
n Substituting a computer for
one of the people in the
communication process. User encodes
Process is basically information Computer decodes
the same. information
– Response may be symbols
on the monitor.
Computer
returns results
to user
The Computer Continuum 2
Chapter 4
Communicating with
a Computer
A breakdown can occur any place along the cycle...
n Between two people: n Between a person and a computer:
The person can’t hear you. The power was suddenly
The phone connection is broken in interrupted.
mid-call. An internal wire became
One person speaks only French, disconnected.
while the other only Japanese. A keyboard malfunctioned.
When communicating instructions to a computer, areas
of difficulty are often part of the encoding and decoding
process.
Communicating with
a Computer
n Programming languages bridge the gap between human thought
processes and computer binary circuitry.
Programming language: A series of specifically defined commands
designed by human programmers to give directions to digital computers.
– Commands are written as sets of instructions, called programs.
– All programming language instructions must be expressed in binary
code before the computer can perform them.
The Computer Continuum 3
Chapter 4
The Role of Languages
in Communication
n Three fundamental elements of language that contribute to the
success or failure of the communication cycle:
Semantics
Syntax
Participants
The Role of Languages
in Communication
n Semantics: Refers to meaning.
n Human language: n Computer language:
Refers to the meaning of what is Refers to the specific command
being said. you wish the computer to perform.
Words often pick up multiple – Input, Output, Print
meanings. – Each command has a very
Phrases sometimes have idiomatic specific meaning.
meanings: – Computers associate one
– let sleeping dogs lie meaning with one computer
(don’t aggravate the situation command.
by “putting in your two The nice thing about computer
cents”) languages is the semantics is
mostly the same
The Computer Continuum 4
no reviews yet
Please Login to review.