Programming – Planning or scheduling the performance of a task or event

Computer – A programmable device that can store or retrieve data

Computer Programming – The process of planning a sequence of steps for a computer to follow

 

Writing a Program(p4)

Problem Solving Phase

  1. Analysis and specification
  2. General Solution – develop an algorithm
  3. Verify – manually review steps as a computer would

Implementation Phase

  1. Concrete solution – Write a program
  2. Test

Maintenance Phase

  1. Use
  2. Maintain

 

Algorithm – A step-by-step procedure for solving a problem in a finite amount of time

Programming Language – A (‘small’) set of rules, symbols, and special words used to construct a program

 

Coding the algorithm is translation from algorithm to programming language

 

Documentation – The written text and comments that make a program easier for others to understand, use, and modify.

 

Information – Any knowledge that can be communicated

Data – Information in a form a computer can use

 

What is a Programming Language?(p10)

All data, whatever its form is stored and used as binary codes.

Instructions and data stored as binary codes are indistinguishable by themselves.

  1. The manner in which they are used gives the codes meaning
  2. The computer treats its own instructions as data

 

Machine language – the language made up of binary coded instructions that is directly used by a computer

-Very specific

 

Assembly language – a low-level programming language in which a mnemonic is used to represent each of the machine language instructions for a particular computer

 

Assembler – program that translates assembly language into Machine language, operating under the principle that a computer can treat its own instructions as data.

 

Assembly language is still too specific to each computer to be easily usable

 

High level languages – closer to a natural language (English)

 

Human Thought

Natural Language

High-level language

Low-level language

Machine language

 

Compiler – program (or set of programs) that translates a high-level language into machine language

 

Compilers vs Interpreters (Translate vs Translate and Execute)

 

Instructions in a programming language reflect the operations a computer is capable of:

Data transfer

Data input and output

Data storage and retrieval

Data comparison

Arithmetic

 

Four basic ways of structuring statements in most programming languages:

Sequentially (Sequence)

Conditionally (Selection)

Repetitively (Loop)

With subprograms (Subprogram)

 

What is a Computer? (p16)

Six basic components:

Memory

CPU: Control unit and Arithmetic/Logic unit

Input devices

Output Devices

Auxiliary Storage Devices

 

Memory Unit – (RAM) – internal, temporary storage for instructions or data

CPU: Two components.

ALU: Comparison and arithmetic functions

Control Unit: Component that coordinates the actions of the other components so that instructions are executed in the correct sequence

 

Fetch-execute cycle

 

Peripheral – any input, output or aux storage device attached to a computer

Aux storage – a device that stores data in encoded form outside the computer’s main memory

 

Interactive system – A system that allows direct communication between user and computer

Batch system – A system whereby tasks to be done are collected and submitted in groups or batches

 

Operating system – A set of software that manages the computer’s resources

 

Ethics and Responsibilities (p25)

Piracy

Privacy of Data

Use of Computer Resources

Software Engineering

 

Problem-solving techniques (p30)

Ask Questions – define the problem: givens, expectations, limitations, requirements

Look for things that are familiar/Solve by analogy

Means-ends analysis – define the desired results and examine the possible methods to achieve that

Divide and conquer

Merging solutions – get the most out of a step