Title: Introduction to Computers, Programs, and Python
1Introduction to Computers, Programs, and Python
- HI5100 Data Structures for BioInformatics
- Lesson 1
2- Man is still the most extraordinary computer of
all. - John F. Kennedy
3OBJECTIVES
- In this Lesson you will learn
- Roles of hardware and software in a computing
system. - What computer science might have to offer life
sciences and health care industries. - To differentiate different types of programming
languages. - Name of programming languages that are widely
used. - A little history of the Python language.
- Some basics of Python and the interpreter that
executes programs written in the Python language. - Historical background for UMLthe
industry-standard object oriented system modeling
language. - Historical background for the Internet and the
World Wide Web. - To test-drive a simple Python program script.
4Lesson 1 Sections
- 1.1 What Is a Computer?
- 1.2 What is a Program?
- 1.3 What is Computer Science?
- 1.4 Hardware Basics
- 1.5 Historical Perspectives
- 1.6 Personal Computing, Distributed Computing and
Client/Server Computing
5Lesson 1 Sections
- 1.7 Hardware Trends
- 1.8 Operating Systems
- 1.9 The Internet and the World Wide Web
- 1.10 Types of Programming Languages
- 1.11 High-Level Languages
- 1.12 Python
6What is a Computer?
- Device
- Stores and manipulates information
- Does this under the control of a changeable
program - Performs computations fast
- Performs yes/no decisions fast
- e.g., are two values equal?
7A Computer Transforms Information
info in
transformed info out
8What is Not a Computer?
- Calculator transforms information
- ATM machine transforms information
- Built to perform a single specific task
- Many task-specific electronic devices contain
embedded computers
9What is a Computer?
- Its a device that executes changeable programs
- Part hardware devices such as keyboard, screen,
mouse, hard drive, memory, DVD drive, processors,
etc. - Part software programs that run on a computer
- Word processing programs
- Email
- Browser
- Games
- Etc.
10What is a Computer Program?
- Step-by-step instructions that tell the computer
what to do - Software programs that run on a computer
- Word processing programs
- Email
- Browser
- Games
- Etc.
11Programming
- Process of creating software
- Since software controls the hardware, enabling it
to complete tasks, it is important to all
computer professionals - Creative process
- Anyone can learn the basics
- Can be fun!
12Computer Science
- What can be computed?
- Anything that can be described by a step-by-step
process that can be translated into a program - Algorithm a step-by-step process for achieving
some desired result - Techniques design, analysis, experimentation
13Computing Science Life Science
- Describe life science processes for computability
14Six Logical Units
- Central processing unit
- Arithmetic and logic unit
- Memory unit
- Secondary storage unit
- Input unit
- Output unit
15Central Processing Unit
- CPU (lingo)
- Coordinates activities of the other units
16Arithmetic and Logic Unit
- ALU (lingo)
- Performs calculations (, -, , /)
- Decisions (compare two items in memory and decide
if they are the same)
17Memory Unit
- Fast-access, low capacity (relatively), storage
- RAM, memory, primary memory, core memory, main
memory are other terms used - Volatile memory
18Secondary Storage Unit
- Slower access, more capacity, storage
- Not volatile
- Hard drives
- CD, DVD
- Memory stick
- Floppy disks (old technology)
19Input Unit
- Gets data and computer programs into the system
- Input devices
- Keyboard
- Mouse
- Scanner
- Microphone
- Etc.
20Output Unit
- Takes info from computer and transfers it to
output devices - Output devices
- Monitor
- Printer
- Network
21When You Start Software
- Instructions that comprise the program are copied
from secondary storage into main memory (RAM) - CPU begins running the program following a
process of fetch-decode-execute - Fetch get the next instruction from RAM
- Decode translate into machine actions
- Execute perform the action
22What is a Computer? Web Resources
- http//en.wikipedia.org/wiki/Computer
23Early Computing
- Before 1960
- Batch processing computers performing one task
at a time - Submit a job on punched cards, get output
(printout) the next day - Computer fills a room
- No PCs
24Early Operating Systems
- Before 1960
- Operating system software to make a computer
easier to use - Made computers able to do more jobs
- Multiprogramming
- Computers handle more than one job at a time
25Timesharing
- During the 1960s
- Multiple users access one large computer in
another room through a terminal - Keyboard and screen
- OS directs computer to handle one users job for
a few seconds, then another, etc.
26Personal Computing
- 1970s
- Silicon chip technology
- Smaller computers
- Apple (1977)
- IBM (1981)
- Stand-alone computers on your desk
- Boot from floppy disk with OS on floppy
- Store work on floppy disks
- Share work by sharing floppy disks
27Distributed Computing
- Network stand-alone units together to facilitate
sharing of work - Local area networks (LAN)
28Client/Server Computing
- Server provides a common data store for multiple
users - File server
- Application server
- Web server
- Database server
- Client desktop computer uses data from the
common data store on the server
29Hardware Trends
- Computer hardware costs have steadily decreased
in relation to the capability of the devices
purchased - Moores Law Every year or two you can buy twice
as much computing power for the same amount of
money
30Microsofts Windows OS
- A number existed prior to the 1980s
- 1981 DOS (Disk Operating System)
- User types commands at a prompt telling OS what
to tell the computer to do - Doesnt need a mouse, just a keyboard
- 1990 Windows 3.0
- Graphical user interface (GUI)
- Not an OS, ran on top of DOS OS
- 1993 Windows NT OS
- Windows XP is based on Windows NT
31Other OS
- LINUX
- Free
- Open-source the source code is freely available
to users who can modify it to suit their needs - UNIX
- Proprietary (Bell Labs)
- Written in C programming language
32The Internet
- Global network of computers
- Started by DOD to connect computers of research
universities - E-mail was a popular technology on the early
text-only internet
33World Wide Web
- Servers connected via the Internet can supply
multimedia files to users - Created in 1989
- Tim Berners-Lee of CERN invented HTML and
communication protocols - Computing and communication are combined via WWW
and the Internet
34W3C
- World Wide Web Consortium
- Devoted to development of nonproprietary,
interoperable technologies for the WWW - Make WWW accessible to everyone regardless of
disabilities, language, or culture - Create standards called Recommendations
- www.w3.org
35XML
- Extensible Markup Language
- Separate content from presentation (markup with
HTML) - XML documents describe the meaning or purpose of
data, not how it is supposed to look when you see
it - They are text documents, thus they can be
processed by software on any hardware platform
36Types of Programming Languages
- Machine language
- Assembly language
- High-level language
37Machine Language
- The natural language of a specific machine
- Determined by the hardware design of the machine
- Machine dependent any given machine language can
be used on only one type of computer - Cumbersome for humans
38Machine Language Program Example
- Adds overtime pay to base pay
- Stores the result in gross pay
1300042774 1400593419 1200274027
39Assembly Language
- Use English-like abbreviations for strings of
numbers - Assembler a translator program that translates
English-like assembly language statements into
machine language
40Assembly Language Program Example
- Adds overtime pay to base pay
- Stores the result in gross pay
- More understandable, more like English
Load basepay Add overpay Store grosspay
41High-Level Language
- Single statements accomplish substantial tasks
- Instructions look almost like everyday English
and/or math - Syntax Precise form required for each statement
- Semantics precise meaning of each statement
- No ambiguity
42High-Level Language Statement Example
grossPay basePay overTimePay
- Adds overtime pay to base pay
- Stores the result in gross pay
- Understandable
- Looks like Algebra
43Popular High-Level Languages
44Other High-Level Languages
- Fortran (FORmula TRANslator)
- COBOL (Common Business Oriented Language)
- Pascal
- Ada
- Python
45Translator Program
- Converts from a high-level language or into
machine language in one of two ways - Compiling
- Interpreting
46Compiler versus Interpreter
- Compiler a translator program that converts
high-level language into machine language - Interpreter a program that executes high-level
language directly one line at time - Execution is slower than with a compiled program
- Scripting languages for the web are executed by
an interpreter that is part of the browser
47Python
- Created in 1990s
- All Python releases are Open Source
- Go to http//www.opensource.org/ for the
definition of Open Source - Python Interpreter
- Interprets code written in Python syntax
- Saves time during development phase
48Python IDLE
- Integrated Development Environment
- Software to facilitate development of
applications
49Summary
- Computers are versatile because they are
programmable - 40 years of development have led to where we are
today
50End of Slides for Lesson 1
- HI5100 Data Structures for BioInformatics
- Lesson 1