logic and systems a beginner’s guide. hardware vs. software hardware is the devices software is...

13
Logic and Systems A beginner’s guide

Upload: homer-shields

Post on 03-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Logic and Systems

A beginner’s guide

Hardware vs. Software

Hardware is the devices Software is the programs There are four major

operations of Hardware and Software together:

1. Input

2. Processing

3. Output

4. Storage

Input

Keyboards, mice, etc. How something ENTERS the computer system. Understand that entry can come from a Storage device as well.

Processing

Much like “processing” in any other context – things are organized, analyzed, numbers calculated etc. Data may or may not come out different at exit from entrance.

The CPU (Central Processing Unit) is the hardware that handles processing.

Output

How Processing results can be seen. May be to printer, screen or other device.

Storage

How data are saved: CDs, internal hard disks, flash drives are examples of external storage. Memory is also called internal storage. What is stored on memory is active, and disappears after the computer is shut down. What is stored on disks is passive but nonvolatile – hopefully it will not be lost.

Programming Languages

How instructions are written. Java, C++, Visual Basic,

are just a few. Each programming language has its own

Syntax, which could be compared to conventions in human language. You don’t say “expired bought milk yesterday sister my” or “do do how you” and computer language is even stricter as the computer can’t “guess.”

Machine Language

The actual hardware of a computer is really just many, many on/off switches. To have a program, such as Java, speak to the machine, a compiler or interpreter, needs to be there to translate the programming language to machine language and back again.

print to screen “buy fresh milk”

Logic

Processes must be grouped properly – procedures – like “fly kite” or “exit room.”

Order of operations is very important – sequences – like “a” coming before “b.”

Nothing can be missing –steps – like leaving car keys at home.

Execution

Also called Running. Happens only after program has been

translated to machine language. Involves the basic operations: Input,

Processing, Output, Storage.

Flowcharts

Input Symbols Processing Symbols Output Symbols Flowlines Terminal Symbols Connector Symbols Decision Symbols

start

get userName

look up userAge by userName

print userAge

stop

userAge > 21

no

yes

stop

Data Types

Numeric integer - 1,2,3 floating point - 2.33, 5.325, .42

String - “hello world!” or “Jane Jones”

Variable

Memory locations May change over time An example would be (if driving your car was

a computer program) myGasLevel, which would change as your drive your car.