The Essentials of Computing n241.tplt GOALS Recognize simple tasks computers perform Become familiar with characteristics and capabilities of processing units Distinguish between analog and digital storage Describe the fetch/execute cycle Be able to classify encoding schemes Recognize the essential machine language commands What is a COMPUTER? A Computer is the Universal Information Manipulator What is INFORMATION? Examples: numbers, words, instructions INFORMATION is also referred to as DATA. Two most important ways to store data - DIGITAL information storage ANALOG information storage ANALOG Information Storage Analog - An information coding scheme based on physical analogies between a value and some physical object. Analog information is MECHANICAL. Characterized by INFINITE precision but LIMITED accuracy. Example: Mercury Thermometer DIGITAL Information Storage Digital - An information coding scheme based on numeric representation of values. Digital devices record information as a series of NUMBERS then translate the numbers to represent another entity. Characterized by LIMITED precision but STRONG accuracy. Characteristics of DIGITAL COMPUTERS Limited precision but extreme accuracy Manipulates numbers Makes number represent various other kinds of information Binary Storage A computer is a machine dealing with ELECTRONIC impulses Voltage is an analog property, but forcing circuitry to accept it as one of two values make the computer a digital system. Values recognized are high and low - sometimes referred to as on/off, true/false or yes/no. Binary notation - 1's and 0's Binary Lightswitch Demo Binary Tutorial The Binary System

Binary Numbering System

Decimal

Binary

2^3
(8s)

2^2
(4s)

2^1
(2s)

2^0
(1s)

0

0

0

0

0

0

1

1

0

0

0

1

2

10

0

0

1

0

3

11

0

0

1

1

...

...

...

...

...

...

8

1000

1

0

0

0

Converting Binary to Decimal

Converting Binary to Decimal

Convert 1001 to Decimal

Place Value

8

4

2

1

Binary Value

1

0

0

1

Decimal Value

8

0

0

1

Answer = 9

CAN YOU CONVERT 1101 TO A DECIMAL VALUE?

Converting Decimal to Binary

Converting Decimal to Binary

Convert 13 to Binary

Place Value

16

8

4

2

1

Binary Value

-

1

1

0

1

Decimal Value

-

-

-

-

-

HOW DO YOU CHECK YOUR ANSWER?

Binary and Other Kinds of Information Whole numbers Integers - whole numbers and the negative numbers (-3, -2, -1, 0, 1, 2, 3) Real numbers - numbers that can be represented by fractions or decimal values (1/3, 2.357, 35.666) Real numbers and ERROR ASCII ASCII - American Standard Code for Information Exchange Text character converts to Decimal which converts to Binary

ASCII

Character

Decimal Value

Binary Value

A

65

1000001

a

97

1100001

The Translation Trap Computers track different kinds of information in different ways. Manipulation Memory just holds information
1. To Store and Retrieve
2. Cannot really change anything directly in memory. Registers are the "information garages".
1. Places to hold values while they are being manipulated.
Simple Tasks A number of simple commands can be combined in very complex ways
¨Store in 1's and 0's Set of basic commands are built into a computer chip. Each command is represented by a number. Basic, machine-specific commands are sometimes referred to as machine language.
Some Elemental Commands LOAD - Copies value from memory to register STORE - Copies value from register to memory ADD - Adds up values of two registers
subtraction, multiplication and division are a derivative of addition TEST - Compares two values JUMP - Go to another command in the list of instructions HALT - The list of commands is finished (if there is no HALT, you have a runaway computer)
FETCH/EXECUTE Cycle PROGRAM (or software)
¨a list of instructions to a computer for information
¨stored in 1's and 0's The CYCLE
¨Fetch a command
¨Execute the command
¨Fetch another command
¨Repeat until told to HALT
NEARLY UNIVERSAL Different programs change the way computers behave. This flexibility is why they are considered universal. Computers DO have limits - they are NEARLY universal Limited to 1's and 0's, BUT this is being overcome by speed and size of computing technology. Introducing ABNIAC
The ABNIAC Page
What is ABNIAC ABNIAC is the
Absolute
Beginners
Numeric
Integrator and
Calculator
What does ABNIAC do? What is will show us
-A puzzle environment to practice problem solving
-How computers store information
-How simple opCodes are combined
-A set of basic opCodes
-What can go wrong in a computer program
-Storage of instructions and data in memory
The opCodes in ABNIAC Store Add Compare Jump Output ASCII output Halt STORE Represented by 1 Takes the value to store Takes the address to store it in Stores the value in the address ADD Represented by 2 Takes three addresses Adds values in first two addresses together Places the results in the third address For counters, places the result in one of the original cells COMPARE Represented by 3 Takes three addresses Looks at values in the first two addresses If they are equal, jumps to address in the third address Usually followed by a JUMP command Used to cause branches and loops JUMP Represented by 4 Takes one address Jumps to the instruction in the address Used for loops and branches OUTPUT Represented by 5 Takes one address Prints out the value in the address to the output area ASCII OUTPUT Represented by 6 Takes one address Prints out the value in the address to the output area Translates contents to ASCII first Use ASCII chart in online help for hints HALT Represented by 7 Takes no arguments Used to stop program execution If it is not encountered, unpredictable results will occur