CS 1102 Introduction to Computer Studies Computer Science

  • Slides: 42
Download presentation
CS 1102 - Introduction to Computer Studies Computer Science Department City University of Hong

CS 1102 - Introduction to Computer Studies Computer Science Department City University of Hong Kong

Course General Info (1) : Teaching Team 8 Lecture: Dr. Helena WONG (Coordinator), Prof.

Course General Info (1) : Teaching Team 8 Lecture: Dr. Helena WONG (Coordinator), Prof. Xiaohua Jia, Dr. Jianping Wang 8 Labs: Prof. Xiaohua JIA, Dr. Jianping WANG, Dr. Helena WONG Dr. Jean WANG, Dr. Kenneth LEE 8 Contact info on Blackboard : Reference Book 8 Discovering Computers 2014 (1 st Edition), by Misty E. Vermaat, Cengage Learning Ltd. : Blackboard-based course 8 It is your own responsibility to check Blackboard and University e-mail account regularly for announcements and updates 2 Jean Wang / CS 1102 – Lec 01

Course General Info (2) : Online Resources 8 Textbook Course. Mate (access code will

Course General Info (2) : Online Resources 8 Textbook Course. Mate (access code will be given when purchasing the book) 7 access. cengage. com 8 Textbook companion site (free) 7 http: //www. cengagebrain. com/cgiwadsworth/course_products_wp. pl? fid=M 20 b&product_isbn_issn=97812 85161761&token= 8 Howstuffworks. com 7 http: //computer. howstuffworks. com/ 8 Wikipedia 7 http: //en. wikipedia. org/wiki/Main_Page (English) 7 http: //zh. wikipedia. org/wiki/Main_Page (Chinese) 8 Always use search engines to find out more Jean Wang / CS 1102 – Lec 01 3

Course General Info (3) : Teaching pattern 8 Lectures (2 hours per week) 7

Course General Info (3) : Teaching pattern 8 Lectures (2 hours per week) 7 Explain the terminologies, concepts, methodologies… 8 Labs (2 hour per week) 7 Hands-on programming activities and discovery exercises : Assessment 8 Course work (40%) 7 Weekly homework (10%) þ Answer questions on Blackboard after lectures (deadline announced on Blackboard) þ Attempt programming exercises within labs 7 Midterm quiz (20%) 7 Group presentation (10%) 8 Examination (60%) Jean Wang / CS 1102 – Lec 01 4

You Are Expected To … : University Guide 8 1 credit unit = 40

You Are Expected To … : University Guide 8 1 credit unit = 40 to 50 hours (including lecture, tutorial, self study) 8 3 credit units ~ 120 to 150 hours per semester ~ 10 hours per week ~ 6 hours self-study and practice : You are expected to take ownership of your learning 8 Be prepared to the class (try to read the materials before hand) 8 Attend and participate in all classes (lec & lab) 8 Submit assignments on time 8 Don't be afraid of asking questions (inside or outside classroom) 8 Use online resources as much as possible 8 No academic dishonesty Jean Wang / CS 1102 – Lec 01 5

Course Intended Learning Outcomes 1. Describe the basic principles of computer systems, networks, Internet

Course Intended Learning Outcomes 1. Describe the basic principles of computer systems, networks, Internet and information security; 2. Inquire and evaluate the social, ethical, and safety issues of emerging technologies and innovations; 3. Demonstrate the use of software tools and the ability to write simple programs using a scripting language; 4. Apply basic programming concepts and trace the execution of simple computer programs. * For other details, check out the course syllabus in Blackboard Jean Wang / CS 1102 – Lec 01 6

Objectives for Today : Identify the basic parts of a computer and how they

Objectives for Today : Identify the basic parts of a computer and how they work together : Describe what are hardware and software using examples, and explain the relationship between them : Describe the major types of computers in use today and their principal uses : Discuss how World Wide Web and emails work : List common computer security risks and ways of protection Jean Wang / CS 1102 – Lec 01 7

Computers Change Our Life Jean Wang / CS 1102 – Lec 01 8

Computers Change Our Life Jean Wang / CS 1102 – Lec 01 8

What Is a Computer? : "An automatic electronic device for performing mathematical or logical

What Is a Computer? : "An automatic electronic device for performing mathematical or logical operations" - from Oxford English Dictionary : "A device that receives, processes, and presents information. " - from Science and Technology Encyclopedia : "A computer is a machine designed for manipulating data according to a list of instructions known as a program. " from Wikipedia : "Programmable machine that can store, retrieve, and process data. " - from Encyclopædia Britannica (大英百科全书) Jean Wang / CS 1102 – Lec 01 9

What Is a Computer? Speed + Stupidity : A computer is a multipurpose device

What Is a Computer? Speed + Stupidity : A computer is a multipurpose device that takes input, processes data, stores data, and produces output, according to a series of stored instructions Jean Wang / CS 1102 – Lec 01 10

Components of a Computer : Hardware - the physical components of a computer 8

Components of a Computer : Hardware - the physical components of a computer 8 System unit 8 Peripherals 8 8 8 Input Processing Storage Output Communication : Software - a set of instructions that tells the computer what to do (program) Jean Wang / CS 1102 – Lec 01 11

System Unit (1) Jean Wang / CS 1102 – Lec 01 12

System Unit (1) Jean Wang / CS 1102 – Lec 01 12

System Unit (2) : System unit - the case containing electronic components used to

System Unit (2) : System unit - the case containing electronic components used to process data 8 Central processing unit (CPU or processor) 7"The brain of the computer" 7 Carry out the instructions that operate the computer 8 Memory 7 Temporarily stores instructions waiting to be executed and data needed by those instructions 7 CPU uses memory for instant access to information 8 Hard Disk 7 Stores a large volume of information 7 Serves as a longer-term storage device 8 Motherboard, CD-ROM/DVD drive, adapter cards, ports … Jean Wang / CS 1102 – Lec 01 13

Peripherals (I) : A peripheral device is any piece of hardware attached to a

Peripherals (I) : A peripheral device is any piece of hardware attached to a computer (external device) 8 Input devices - hardware used to enter data and instructions 7 E. g. , 8 Output devices - hardware that conveys information to users 7 E. g. , 8 Storage devices - hardware holds data and instructions for future use 7 E. g. , 8 Communication devices - hardware enable a computer to send and receive information from other computers/devices 7 E. g. , Jean Wang / CS 1102 – Lec 01 14

Peripherals (II) Jean Wang / CS 1102 – Lec 01 15

Peripherals (II) Jean Wang / CS 1102 – Lec 01 15

Software : CPU is controlled by software - instructions that tell it what to

Software : CPU is controlled by software - instructions that tell it what to do : System software 8 Programs that control or maintain the operations of the computer and its devices 7 Including the operating system (OS), which is a set of programs that coordinates all activities among computer hardware devices and allows uses to run other software : Application software 8 Programs that perform specific tasks for users, including 7 Word processing, Web browser, media player, games, … Jean Wang / CS 1102 – Lec 01 16

Computer Programming : What is computer programming? 8 Process of creating software (writing instructions

Computer Programming : What is computer programming? 8 Process of creating software (writing instructions to direct computers process data) Programming in C++ Running Application Jean Wang / CS 1102 – Lec 01 17

Documents and Files : Files have two types: Applications (called program files) and Documents

Documents and Files : Files have two types: Applications (called program files) and Documents (called data files) 8 Applications contain instructions that can be executed by the computer 7 Sometimes called executable files 8 Documents contain passive data rather than instructions 7 Sometimes called data files Jean Wang / CS 1102 – Lec 01 18

File Management In PCs : In Windows, a file is represented by a name

File Management In PCs : In Windows, a file is represented by a name and an icon 8 Extension - a string of (usually) three characters 7 Follows a period (. ) at the end of file name 7 Gives more information about the file's origin or use 8 Files can be organized into collections using folders (directories) 7 The operating system (OS) allows you to do: þ Create folders þ Give them meaningful names þ and store files inside them 7 Folders can be organized hierarchically - a folder can contain other folders Jean Wang / CS 1102 – Lec 01 19

File Path : A path is the general form of a file or directory

File Path : A path is the general form of a file or directory name, giving a file's name and its unique location in a computer system 8 A full path or absolute path is a path that points to the same location on one file system regardless of the working directory. It is usually written in reference to a root directory 7 E. g. , C: WPDataMyfile. txt Drive letter Folder Subfolder Filename Extension 8 A relative path is a path relative to the current working directory, so the full absolute path may not need to be given 7 Files in the same working directory are listed without any preceding slashes 7 A single dot (“. ”) refers to the current directory 7 Double dots (“. . ”) refer to the parent directory 7 To refer to a location which is more than one directory level up, use a combination of double dots Jean Wang / CS 1102 – Lec 01 20

File Path Example Question: 1) what is the absolute path of Myfile. txt file?

File Path Example Question: 1) what is the absolute path of Myfile. txt file? 2) Suppose you are now in C: WPBackup (i. e. , it is your working directory), what is the relative path of Myfile. txt file? Jean Wang / CS 1102 – Lec 01 21

Categories of Computers : What are the categories of computers nowadays? 8 8 8

Categories of Computers : What are the categories of computers nowadays? 8 8 8 Super-computers Mainframes Servers Personal computers Mobile computers and mobile devices Embedded computers Jean Wang / CS 1102 – Lec 01 22

Supercomputers : Supercomputers 8 The fastest, most powerful, most expensive computers at the time

Supercomputers : Supercomputers 8 The fastest, most powerful, most expensive computers at the time of its construction 8 Used for specialized application that require huge amounts of mathematical calculations such as weather maps, construction of atom bombs, finding oil, earthquake prediction, etc. 8 Example: 7 http: //www. top 500. org/ 7 http: //www. graph 500. org/ Jean Wang / CS 1102 – Lec 01 23

Mainframes : Mainframes 8 Very large and expensive computers capable of supporting thousands users

Mainframes : Mainframes 8 Very large and expensive computers capable of supporting thousands users at the same time 8 Used by large organizations, such as banks and airlines, for big computing jobs Jean Wang / CS 1102 – Lec 01 24

Servers : A server controls access to the hardware, software, and other resources on

Servers : A server controls access to the hardware, software, and other resources on a network 8 Provides a centralized storage area for programs, data, and information 8 Some servers are mainframes Jean Wang / CS 1101 - Lec 01 25

Personal Computers : Personal computers (PCs) PC (IBM) and compatibles use the Microsoft Windows

Personal Computers : Personal computers (PCs) PC (IBM) and compatibles use the Microsoft Windows OS 8 A type of computers whose price, size, and capabilities make it suitable for personal usage 8 Two most popular kinds 7 PC-compatible or simply PC which often use a Windows operating system 7 Apple (Macintosh) use Apple i. OS operating system Jean Wang / CS 1102 – Lec 01 Apple Macintosh uses i. OS 26

Portable Computers and Mobile Devices : Mobile computers 8 Personal computer that you can

Portable Computers and Mobile Devices : Mobile computers 8 Personal computer that you can carry from place to place 8 Portable, small enough to fit on your lap (laptop) 8 Examples include notebook computers, laptop computers, netbooks, and tablets : Mobile devices 8 Small enough to hold in your hand 8 Examples include smart phones, e-book readers, handheld computers and PDAs Jean Wang / CS 1102 – Lec 01 27

Embedded Computers : Embedded computers 8 A special-purpose computer that functions as a component

Embedded Computers : Embedded computers 8 A special-purpose computer that functions as a component in a larger product 8 The computer is completely encapsulated by the device it controls 8 Examples of embedded systems 7 Automatic Teller Machines (ATMs) 7 Airplanes, automobiles 7 Printers, copy machines, fax machines 7 Microwave ovens, washing machines 7 Videogame consoles, DVD players, mp 3 players 7… Jean Wang / CS 1102 – Lec 01 28

Embedded Computers Jean Wang / CS 1102 – Lec 01 29

Embedded Computers Jean Wang / CS 1102 – Lec 01 29

Computer Networks : Computer communications are 8 The process by which two or more

Computer Networks : Computer communications are 8 The process by which two or more computers or devices transfer data, instructions, and information : Computers can be connected to a network 8 A collection of computers and devices connected via communications devices and transmission media 8 Devices include modem, network card, wireless card, … 8 Transmission media include cables, telephone lines, wireless radio, satellites : Network can be connected to other networks : The Internet - worldwide collection of interconnected networks 8 United yet autonomous: each organization on the Internet is responsible only for maintaining its own network Jean Wang / CS 1102 – Lec 01 30

The Internet : Using the Internet, you can: List Internet services you use. How

The Internet : Using the Internet, you can: List Internet services you use. How often do you use them? Can you recall when you first used each service? Jean Wang / CS 1102 – Lec 01 31

World Wide Web : World Wide Web (WWW) is a most popular service on

World Wide Web : World Wide Web (WWW) is a most popular service on the Internet 8 Made up of millions of interlinked documents called hypertexts or Web pages 8 Web pages are usually written in HTML (hypertext markup language) 8 Web pages are viewed via a simple point-and-click program called Web browser 8 Using a Web browser, you can jump from one Web page to another by clicking hyperlinks (often called just links) 8 A collection of related pages and graphics stored on the same computer is called a Web site; the server program that runs on the web-site to serve web-requests is called a Web server 8 Each Web page has a unique address 7 Referred to as a URL (Uniform Resource Locator) Jean Wang / CS 1102 – Lec 01 32

What is a URL ? : URL is the unique address for a Web

What is a URL ? : URL is the unique address for a Web page http: //www. cityu. edu. hk/cityu/student/index. htm Protocol for Web pages Domain Name Jean Wang / CS 1102 – Lec 01 Path Page File 33

How WWW Works ? : The Web works as a client-server system 8 Your

How WWW Works ? : The Web works as a client-server system 8 Your computer is the client 8 The remote computers that store the Web pages are the servers 1. Your browser connects to a server and requests a page (HTTP cmd) Your machine running a Web browser 2. The server sends back the requested page Question: is server a type of computers like mainframes and PC? Jean Wang / CS 1102 – Lec 01 Server machine running a Web server host program 34

E-mail Basics (I) : Short for "electronic-mail", one of the original services on the

E-mail Basics (I) : Short for "electronic-mail", one of the original services on the Internet : When you sign up for an e-mail account, you receive: 8 A user name (sometimes called a login name or alias) 8 A storage area for messages (usually called a mailbox) : An Email address is in the format of User. Name@Domain. Name e. g. , jia@cs. cityu. edu. hk jia@gmail. com Jean Wang / CS 1102 – Lec 01 35

E-mail Basics (II) : Any user can send a mail message to anyone, regardless

E-mail Basics (II) : Any user can send a mail message to anyone, regardless of whether the recipient is currently logged in — connected to the network 8 The message will be waiting in the recipient’s inbox the next time he or she launches his or her e-mail program and logs in 8 An e-mail message can be addressed to one person or hundreds of people 8 Messages can consist of simple text or can contain attachments, such as documents, graphics, or audio/video clips Jean Wang / CS 1102 – Lec 01 36

How Emails Work ? : Emails work also in a client-server system To: bob@b.

How Emails Work ? : Emails work also in a client-server system To: bob@b. org From: alice@a. org Subject: Meeting Dear Bob, … Alice's PC runs an email client, e. g. , outlooks Bob's machine running an email client program 1. Client A sends the email to server A by SMTP A organization's server machine running an email server program Jean Wang / CS 1102 – Lec 01 2. Server A sends the email to server B (SMTP) 3. Client B fetches the email from server B by POP B organization's server machine running an Email server program 37

Internet Security Basics : The Internet can be a dangerous place. Once you connect

Internet Security Basics : The Internet can be a dangerous place. Once you connect a computer to the Internet, you have risk that your system will be damaged in some way : What risks are you facing ? 8 Virus 8 Phishing website : How can you protect yourself? 8 For virus, a) no open “. exe” files attached to emails; b) no download S/W from untrusted website; c) keep anti-virus S/W upto date 8 For phishing websites: a) check domain name in URL; b) no use of untrusted URL links Jean Wang / CS 1102 – Lec 01 38

Lesson Summary : Computers come in a variety of shapes and sizes, but they’re

Lesson Summary : Computers come in a variety of shapes and sizes, but they’re all made up of two things—the physical parts of the computer, called hardware, and the software instructions that tell the hardware what to do : A computer’s operating system software takes care of details of the computer’s operation; application software provides specific tools for computer users : Computers can be networked to other computers using cables, wireless radio, or other means : The Internet is a global network of computer networks used for education, commerce, and communication Jean Wang / CS 1102 – Lec 01

Lesson Summary : The most popular Internet activities are exploring the World Wide Web

Lesson Summary : The most popular Internet activities are exploring the World Wide Web and communicating with electronic mail : The Web World Wide works as a client-server system, and hyperlinks "glue" the whole Web together : Electronic mails also work in a client-server system : Access to the Internet is not without risks; Internet users must be prepared to deal with unsolicited e-mail, computer viruses, identity theft, and other risks. Ways to protect computer security include restricting access, encrypting data, installing firewall and anti-virus programs and regularly upgrading the system and backing-up data. Jean Wang / CS 1102 – Lec 01

Machine Evolution : Manual calculator: before 16 th century 8 E. g. , abacus,

Machine Evolution : Manual calculator: before 16 th century 8 E. g. , abacus, slide rule : Mechanical calculator: 16 th to 18 th century 8 E. g. , difference engine by Charles Babbage : First generation of computers: 1930 s to mid-1950 s 8 Vacuum tubes : Second generation: mid to late-1950 s 8 Transistors : Third generation: late-1950 s to early-1970 s 8 Integrated circuits : Fourth generation: early-1970 s to present 8 Microprocessor : Fifth generation ? Jean Wang / CS 1102 – Lec 01 41

Moore's Law : Empirical observation made by Gordon Moore in 1965 8 Original prediction:

Moore's Law : Empirical observation made by Gordon Moore in 1965 8 Original prediction: the number of transistors on an integrated circuit for minimum component cost doubles every 24 months 8 Now it is widely associated with the claim that computing power at fixed cost is doubling every 18 months Jean Wang / CS 1102 – Lec 01 42