AP Computer Science Principles Unit 1 Test

*Computer science

the study of algorithms including their
� formal and mathematical properties
� hardware realizations
� linguistic realizations
� applications

*Their formal and mathematical properties

studying the behavior of algorithms to determine if they are correct and efficient

*Their hardware realizations

designing and building computer systems that can execute algorithms

*Their linguistic realizations

designing programming languages and translating algorithms into these languages so they can be executed by the hardware

*Their applications

identifying important problems and designing algorithms to solve them

*Common misconceptions of computer science

1) It is the study of computers.
2) It is the study of how to write computer programs.
3) It is the study of the uses and applications of computers and software

*Algorithm

a well-ordered collection of unambiguous and effectively computable operations that, when executed, produces a result and halts in a finite amount of time (informally, an ordered sequence of instructions that is guaranteed to solve a specific problem)

Sequential operation

Carries out a single, well-defined task. When that task is finished, the algorithm moves on to the next operation. Usually expressed as simple declarative sentences

Conditional operation

Question asking" instructions of an algorithm. They ask a question, & the next operations is selected on the basis of the answer to that question

Iterative operation

Looping" instructions of an algorithm. Tell you to go back and repeat the execution of a previous block of instructions rather than going on to the next instruction

Computing agent

The machine, robot, person, or thing carrying out the steps of an algorithm

*Primitive

When an operation is unambiguous

*doable

There exists a computational process that allows the computing agent to complete that operation successfully

Infinite loop

It'll run forever

computer revolution

In the 20th and 21st centuries; enabled us to implement algorithms that mechanize and automate the drudgery of repetitive mental tasks

*Natural language

The language we speak and write in our everyday lives (not good when writing algorithms)

*Pseudocode

Programming language without any details

*Computation, input, and output

3 basic sequential operations a Pseudocode must include instructions for to carry out

Variable

A named storage locations that can hold a data value
EX: Set the value of carry to 0

*Input operations

Submits to the computing agent data values from the outside world that it may use in later instructions

*Output operations

Send results from the computing agent to the outside world

'Single quotes'

Enclose messages

Double quotes

Words/phrases inside double quotes represent specific elements you must insert

Straight line algorithm

Executes it's instructions in a straight line from top to bottom then stops

Control operations

Conditional/iterative operations together; allow alteration of the normal sequential flow of control in an algorithm

Conditional statements

Question asking" operations of an algorithm. If/then/else statements

Loop

Repetition of a block of instructions

Logarithm

Invented by Scotsman John Napier in 1614. A quantity representing the power to which a fixed number (the base) must be raised to produce a given number

First mechanical calculator (the Pascaline)

Invented by French philosopher/mathematician Blaise Pascal in 1672. Could do addition & subtraction

*Leibnitz's Wheel

Invented by German mathematician Gottfried Leibnitz in 1674. A mechanical calculator that could add & subtract, but also divide and multiply

Computer characteristics

� have a memory where info could be stored in machine-readable form
� programmable

*Jacquard loom

First actual "computing device". Developed by Frenchman Joseph Jacquard in 1801. Automated loom using punched cards to create desired pattern

*Difference Engine

Largest/most sophisticated mechanical calculator of its time. Could +,-,x,/ up to 6 sig. digits, solve polynomial equations & other complex probs. Made by Babbage in 1823

*Analytic Engine

Computational machine configured to solve a wider range of numerical problems. Made by Babbage in 1830s. Had four basic components -

A mill

Performed the arithmetic manipulation of data

A store

Held the data

An operator

Processed the instructions contained on punched cards

An output unit

Put the results onto separate punched cards

Herman Hollerith

Designed/built programmable card-processing machines that could automatically read, tally, & sort data entered on punched cards

*Mark 1

General purpose, electromechanical programmable computer using relays, magnets, & heard to process/store data. 1st computing device to use base-2 binary numbering system

*ENIAC

1st fully electronic general purpose programmable computer

*Colossus

Computer used to crack the German Enigma code

Z1

Computing device for German army, similar in design to ENIAC

John Von Neumann

Invented programming as we know it today

*Von Neumann architecture

Design of what he thought a computer should be like

First generation

Large, vacuum tubes for circuitry, relied on machine language, only solve one problem at a time

Second generation

Smaller, faster, cheaper, transistors replace vacuum tubes, moved to assembly languages

Third generation

Integrated circuit, keyboards and monitors over punched cards and printouts

Fourth generation

Microprocessor, all components of computer located on a single chip

Fifth generation

Based on artificial intelligence

Embedded systems

Devices that contain a computer to control their internal operation

Caches

A type of RAM; Stores program instructions that are frequently needed by software during operation

Volatile memory

When the power is turned off it loses all its data

*RAM (random access memory)

Used by computers to store data that is being used currently or was recently used

ROM (read only memory)

Computer memory in which data is prerecorded; can only be read not removed

Secondary storage

Includes hard drives, floppy disks, punch cards

CPU (central processing unit)

Electronic circuitry located in motherboard usually as a small chip (microprocessor)

Arithmetic/logic unit

A digital circuit used to perform arithmetic and logic operations; fundamental building block of the CPU

Transistor

Semiconductor device with 3 connections, capable of amplification and rectification

*Register

High speed storage unit in CPU

Control unit

Part of the CPU that directs the operation of the processor

Types of Input

Mouse, keyboard, camera

Types of output

Printer, speaker, monitor