SCH 415 Computer Applications in Chemistry: at The End of This Unit You Should Be Able To General Objective
SCH 415 Computer Applications in Chemistry: at The End of This Unit You Should Be Able To General Objective
Course outline
Data acquisition, digital-to-digital, single switch (digital) interfacing. The data highway,
multibit interfacing modes. Protocol, timers and counters, input/output software. Analog-to-
digital (A/D) and Digital-to-Analog (D/A) conversion, conversion theory and hardware,
signal conditioning, transducers and process controllers. Data reduction, filtering and
averaging techniques. Mathematical processing, typical statistical and curve fitting
programs, typical curve plotting programs. Interactive microwave, personal software,
spreadsheet use
UNIT OBJECTIVES
At the end of this unit you should be able to;
General objective
Specific Objectives
1
Computer Basics
1 - Computer Types: Intro
Computers are showing up everywhere you look, and even in places you can't
see. Computers check out your groceries, pump your gas, dispense money at the
ATM, turn the heat on and off, control the way your car runs. They're
everywhere! They're everywhere!
When automobiles were new, many people said "Those smelly, loud,
complicated things will never replace the horse!" And "Those things break down
in just a few miles, while my faithful horse goes on and on and repairs itself!"
Nowadays it's hard to imagine the world without all the variety of four-wheeled,
internal combustion vehicles. How many can you name? Sedans, pickup trucks,
fire engines, front-end loaders, 4-wheelers, golf carts, bulldozers, cranes, vans,
dump trucks... We have an "automobile" for every purpose under heaven - and
in different models and colors, too.
What is a computer?
2
a. accepts data
Input
b. processes
Processing
data
c. produces
Output
output
The Information
d. stores Processing Cycle
Storage
results
In the lessons that follow we will study the parts of the computer
and each of the four parts of the Information Processing Cycle.
Information data which has been massaged into a useful form, like a
complete mailing address
3
Reliability Failures are usually due to human error, one
way or another. (Blush for us all!)
There is a computer for every use under heaven, or so it seems. Let's look at the
kinds of computers that there are, based on general performance levels.
Personal or micro
Computers for personal use come in all shapes and sizes, from tiny PDAs (personal
digital assistant) to hefty PC (personal computer) towers. More specialized models
are announced each week - trip planners, expense account pads, language
translators...
4
Descriptions of Personal Computers
When talking about PC computers, most people probably think of the desktop type,
which are designed to sit on your desk. (Bet you figured that one out!) The tower
and the smaller mini-tower style cases have become popular as people started
needing more room for extra drives inside. Repairmen certainly appreciate the
roominess inside for all the cables and circuit boards ... and their knuckles.
The market for the smallest PCs is expanding rapidly. Software is becoming available
for the small types of PC like the palmtop (PPC) and handheld (HPC). This new
software is based on new operating systems like Windows CE (for Consumer
Electronics). You may find simplified versions of the major applications you use. One
big advantage for the newer programs is the ability to link the small computers to
your home or work computer and coordinate the data. So you can carry a tiny
computer like a PalmPilot around to enter new phone numbers and appointments
and those great ideas you just had. Then later you can move this information to your
main computer.
With a Tablet PC you use an electronic stylus to write on the screen, just like with a
pen and paper, only your words are in digital ink. The Tablet PC saves your work
just like you wrote it (as a picture), or you can let the Hand Recognition (HR)
software turn your chicken-scratches into regular text.
Main Frame
5
Supercomputers
The power needed for some calculations is more than even a single supercomputer
can manage. In distributed computing, using a PC grid, many computers of all
sizes can work on parts of the problem and their results are pooled. A number of
current projects rely on volunteers with computers connected to the Internet. The
computers do the work when they are not busy otherwise.
The projects that need distributed computing are highly technical. For example,
the SETI@Home project looks for signs of intelligent communication in radio signals
coming from space. (SETI stands for Search for Extra-Terrestrial Intelligence.)
If you volunteer your computer for this project, you might be asked to load a small
screen-saver program onto your own computer. When the computer is not busy, the
screen saver comes on. The program downloads some signal data, starts to analyze it,
and later reports the results back to SETI@Home. Once the program is installed,
you do not have to do anything else but watch the progress in the screen saver.
Another method does not use a screen saver, but uses any idle time on your
computer to work on the project. Results are sent to the project's home over the
Internet.
6
Folding@home working on how proteins fold, which is important to understanding
how they work and reproduce
Server
more power
larger memory
larger storage capacity
high speed communications
Minicomputer
The minicomputer has become less important since the PC has gotten so powerful
on its own. In fact, the ordinary new PC is much more powerful than minicomputers
used to be. Originally this size was developed to handle specific tasks, like
engineering and CAD calculations, that tended to tie up the main frame.
2 - Applications: Intro
A text interface was all that was available in the beginning. The example
below is of PKZIP, which squashes files into smaller size to save you space.
Notice in the center the command you would have to type to use this program.
An actual command line would look something like:
c:\>pkzip c:\myfiles\newfile.zip c:\docs\report14.doc
A text-based interface means typing in all the commands. If you mis-type, you
have to backspace to your error, which erases what you already typed. It's hard
to have fun this way!
Add-on programs were written, of course, so you could edit what was typed - to
the joy of all who had to work with long command lines.
Modern text interfaces have lots of cool shortcuts and features. But you still
have to spell and type well
Notice the list of commands in the popup menu in the center. You would use the
arrow keys to move up and down the list and then press the Enter key to execute the
8
command. Various menus are usually available by using the ALT key in combination
with a letter or number key.
Graphical Interface
The example below is from Windows 95/98. The use of drop-down menus, windows,
buttons, and icons was first successfully marketed by Apple on the Macintosh
computer. These ideas are now as standard for graphical interfaces as door knobs are
for doors.
3 - Input: Intro
9
What is Input?
Input
Processing
Output
Storage
Types of Input
Commands are special codes or key words that the user inputs to perform a task,
like RUN "ACCOUNTS". These can be selected from a menu of commands like
"Open" on the File menu. They may also be chosen by clicking on a command
button.
User response is the user's answer to the computer's question, such as choosing
OK, YES, or NO or by typing in text, for example the name of a file.
Keyboard
The first input device we will look at is the Keyboard. The image used on the next
page to illustrate the various keys may not look like the keyboard you are using.
Several variations are popular and special designs are used in some companies. The
keyboards shown below put the function keys in different places. The Enter and
Backspace keys are different shapes and sizes. One has arrow keys while the other
doesn't. It's enough to confuse a person's fingers!!
10
The backslash key has at least 3 popular placements: at the end of
the numbers row, above the Enter key, and beside the Enter key.
We also have the Windows keyboards which have two extra keys.
One pops up the Start Menu and the other displays the right-click context sensitive
menu. Ergonomic keyboards even have a different shape, curved to fit the natural fall
of the wrists.
4 - Processing : Intro
What is Processing?
Input
Processing
Output
Storage
The kind of "thinking" that computers do is very different from what people do.
Machines have to think the hard way. They do one thing at a time, one step at a time.
Complex procedures must be broken down into VERY simple steps. Then these steps
can be repeated hundreds or thousands or millions of times. All possible choices can
be tried and a list kept of what worked and what didn't.
People, on the other hand, are better at recognizing patterns than they are at single
facts and step-by-step procedures. For example, faces are very complex structures.
But you can identify hundreds and even thousands of different faces.
11
A human can easily tell one face from another, even when the faces belong to
strangers. You don't recognize Mom's face because you remember that Mom's nose is
4 cm long, 2.5 cm wide, and has a freckle on the left side! You recognize the whole
pattern of Mom's face. There are probably a lot of folks with noses the size and shape
of Mom's. But no one has her whole face.
But a computer must have a lot of specific facts about a face to recognize it. Teaching
computers to pick Mom's face out of a crowd is one of the hardest things scientists
have tried to do yet with computers. But babies do it naturally!
So computers can't think in the same way that people do. But what they do, they do
excellently well and very, very fast
5 - Output: Intro
What is Output?
Input
Processing
Output
Storage
Output is data that has been processed into useful form, now called Information.
12
Types of Output
Hard copy:
Soft copy:
6 - Storage: Intro
What is Storage?
Input
Processing
Output
Storage
Storage refers to the media and methods used to keep information available for later use.
Some things will be needed right away while other won't be needed for extended periods of
time. So different methods are appropriate for different uses.
Earlier when learning about processing, we saw all the kinds of things that are stored
in Main Memory.
13
Main Memory = Primary Storage
Main memory keeps track of what is currently being processed. It's volatile,
meaning that turning the power off erases all of the data.
Poof!!
For Main Memory, computers use RAM, or Random Access Memory. These
memory chips are the fastest, but most expensive, type of storage
It is nonvolatile, meaning that turning the power off does not erase it.
So, Auxiliary Storage is where you put last year's tax info, addresses for old customers,
programs you may or may not ever use, data you entered yesterday - everything that is not
being used right now.
14
7 - Computer to Computer: Intro
Depending on the context, for computer communications you might use the terms:
Communications Channel
15
8 - System Software: Intro
System software is a catch-all term for the programs that handle the running of
your computer's hardware. The two main categories are:
operating systems utility programs
Operating Systems
16
What can a computer do without an operating system?
Not much!! Let's look at what happens when you turn on your computer, before the
operating system is involved.
An older BIOS might not understand your newest, spiffiest piece of hardware. In this
case you would have to get a new motherboard or an updated BIOS. A newer
motherboard will have a BIOS that can be updated using software. It may require
making a physical change on the inside of your computer, running a special software
program, then resetting the motherboard back the way it was. (This is a task only for
the brave and technically skilled since you can ruin a motherboard very easily!)
After the BIOS has gone through its morning wake-up routine, you'll see on your
screen something about running the POST (Power On Self Test). This is a set of
tests of the hardware. If, for example, your keyboard is not plugged in or is broken,
you will see a message about "Keyboard failure" and the computer will stop where it
is in the POST. There are tests included for the hard drives, memory, and the buses,
too. This is only a quick check-up though and does not guarantee that everything is
perfect.
That's it for what the computer can do without an operating system. It can wake up
and twitch a little, but it can't move or talk yet. Its nervous system is not working.
Next the computer looks for some kind of operating system. It will usually be set
up to look in the floppy drive first and then on the hard drive. This way if your hard
drive fails, you have a way to get the system working enough to diagnose the
problem. Enough of the operating system to get started will fit on a 3½" floppy disk.
This part of the operating system has various names. Kernel, master program,
supervisor, control program are a few. In PCs using DOS or Windows the term kernel
is used.
17
When the kernel is loaded, the computer looks for three files:
command language The command language interpreter is the program that turns your
interpreter keystrokes into all those 1's and 0's for the processor to swallow.
For DOS and Windows 95 the program is command.com.
config.sys From the config.sys the computer finds what devices are
connected, such as a mouse, CD drive, or scanner. The file tells
where to look for the directions, called drivers, for using these
devices.
Here is an example of a config.sys that might be used with Windows 95, with explanations in
blue on the right. The blue parts can't be in the real file. Win95 doesn't require a
config.sys unless there are devices that you want to run in DOS mode.
DEVICEHIGH=C:\PIONEER\ATAPI_CD.SYS
/S:3 /D:MSCD001
This device operates the CD drive. The
HIGH part says to load the driver HIGH
in memory, so the HIMEM device must
be loaded too.
autoexec.bat This file does optional tasks like loading programs that you want to
start every time your computer is turned on. You may see a lot of
messages on the screen as the various programs are started. This
file also tells the computer where to look for files, called the path.
Many programs add their own directories to the path when they
are installed. The path can get too long to function right!
Here's an example of an autoexec.bat that might be used under Windows 95, with
explanations on the right in blue. The blue parts can't be in the real file. Win95 doesn't
require an autoexec.bat but you might want to change some of the defaults or to have some
things to run in DOS mode.
18
@C:\PROGRA~1\NORTON~3\NAVBOOT.EXE /STARTUP Starts Norton's Antivirus program
The @ in the front of a line keeps that command from displaying on the screen as it is
executed. Some people want to see them ALL. Most of us would rather not think about it!
By the way, if you look on your hard drive under Windows for these files, you might
not see them. The default installation of some versions of Windows hides system
files, which includes autoexec.bat and config.sys. To view such files you must change
a setting. From any My Computer or Explorer window, on the View menu, select
Options. Then choose the View tab. There is a choice there to show or not show
system and hidden files.
DOS - When your pretty graphical interface breaks, you may have to go to the
command line to fix it. Even within Windows, it can be faster to type a command on
the Run line than to find the right icon to start a program. So, a knowledge of DOS
commands is not yet useless. See DOS Commands
So we see that without the operating system, the computer is paralyzed. Let's look
now at the types and functions of operating systems.
19
9 - Programming: Intro
Language Types
Programming has changed a lot since the first computers were created. The original
programs were very simple and straight forward compared to today's elaborate
databases, word processors, schedulers, and action games.
Different computer languages have been created with which to write these
increasingly complex computer programs. They can be categorized based on how
close to normal speech they are, and thus how far from the computer's internal
language.
20
Abbreviations for machine language
Assembly
Languages
= 4GL. Very high-level languages. These are results oriented and include
4th database query languages. There are fewer options for programmers, but the
Generation programs are much easier to write than in lower level languages. These too
Languages must be compiled or interpreted.
21