Upload
bryan-gallego
View
218
Download
0
Embed Size (px)
Citation preview
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 1/25
CSC 101.
INTRODUCTION TO
COMPUTER SCIENCEAY 2014-2015 (Term 2)
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 2/25
Grading System
Exam 60 %Laboratory Exercise/Quiz 25HW/SW 10Attendance 5
Main References:• JAVA TM Programming: From Problem Analysis to Program Design by D. S. Mali• JAVA TM How to Program, 7 th ed by Deitel
Passing Rate: 60%No Removal Exam
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 3/25
LECTURE 1
INTRODUCTION TO COMPUTERSYSTEMS
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 4/25
Lecture OutlineWhat is a computer?
Hardware and SoftwareComponents of a Computer SystemStarting a ProgramNetworksLanguage of a ComputerEvolution of Computer LanguageProgrammingProgramming Methodologies
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 5/25
What is a computer?a general purpose device that can beprogrammed to carry out a set of arithmeticor logical operations automatically
a complex system consisting of bothhardware and software components
Variations:
embedded computers
calculator, ATM, printer, videogame console
personal computer (aka desktop and homecomputer), laptop, portable, notebookcomputer
PDA
Mainframe or Supercomputer
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 6/25
Hardware vs Software
Hardware Software
Definition
• Devices that are required to storeand execute (or run) thesoftware.
• collection of instructions thenables a user to interact wcomputer
• a program that enables acomputer to perform a spectask, as opposed to the phy
components of the system
Types • Input, storage, processing,
control, and output devices.
• System software, Utility soand Application software.
Examples
• CD-ROM, monitor, printer, videocard, scanners , label makers,routers , and modems.
• Operating systems, driversAcrobat, Internet Explorer Microsoft Word , Microsof
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 7/25
Components of a Computer System
I/O CPU
Memory
System
Bus
Computer
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 8/25
Components of a Computer System
Registers AL
ControlUnit
Internal
Bus
CPU
I/O CPU
Memory
SystemBus
Computer
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 9/25
Components of a Computer System
MemoryMain/Primary Secondary• closely connected to the
processor.• stored data are quickly and
easily changed.• holds the programs and data
that the processor is activelyworking with.
• interacts with the processormillions of times per second.
• needs constant electric powerto keep its information.
• connected to main memorythrough the bus and acontroller.
• stored data are easily changed,but changes are slowcompared to main memory.
• used for long-term storage ofprograms and data.
• before data and programs canbe used, they must be copiedfrom secondary memory intomain memory.
• does not need electric powerto keep its information.
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 10/25
Starting a Program1. The user asks to run an application.
2. The OS determines the name of the application.
3. The OS finds the files on the hard disk where the application and its data arestored.
4. The OS finds an unused section of main memory that is large enough for theapplication.
5. The OS makes a copy of the application and its data in that section of mainmemory.
6. The OS sets up resources for the application.
7. Finally, the OS starts the application running.
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 11/25
Computer Networks
Network
consists of two or more computers connected so that they canexchange data and programs
through network interface card
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 12/25
Computer NetworksInternet
a global system of interconnected computer networks that use thestandard Internet protocol suite (TCP/IP) to link several billion deviceworldwide
carries an extremely large number of network services, including theWorld Wide Web, electronic mail, Internet phone, audio, video and fil
transfer servicesWorld Wide Web
a global set of documents, images and other resources, logicallyinterrelated by hyperlinks
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 13/25
Language of a Computer
Electrical SignalsAnalog
continuous waveforms used to represent things, such as sound
Digitalrepresent information with a sequence of 0s and 1s
more reliable carriers of information than analog signals and can be copied froone device to another with exact precision
Machine Language is digital.
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 14/25
Language of a Computer
binary digit or bit
digit 0 or 1
binary code or binary number
sequence of 0’s and 1’s
byte
8 bits
American Standard Code forInformation Interchange (ASCII)
most commonly used
encoding scheme on personalcomputers
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 15/25
Evolution of Programming LanguagesMachine Language
provides program instructions in bitseven though most computers perform the same kinds of operations, the designers of differCPUs sometimes choose different sets of binary codes to perform those operations
Ex: user wants to use the equation c = a + b
100100 010001
100101 010010
100010 010011
a 010001
b 010010
c 010011
load 100100
addition 100101
store 100010
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 16/25
Assembly Language
developed to make the programmer’s job easieran instruction is an easy-to-remember form called a mnemonic
LOAD a
ADD b
STOR c
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 17/25
High-Level Language
closer to spoken languages
Basic, FORTRAN, COBOL, Pascal, C, C++, and Java
Ex:
c = a + b;
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 18/25
Processing a JAVA
program
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 19/25
Programming
a process of problem solving1. analyzing a problem
2. outlining the problem requirements
3. designing steps (algorithm)
Algorithm
a step-by-step problem-solving process in which a solution is arrived at infinite amount of time
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 20/25
programming process
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 21/25
Ex: Design an algorithm to find the perimeter and area of arectangle
1. Get the length of the rectangle.
2. Get the width of the rectangle.
3. Find the perimeter using the following equation:
perimeter = 2*(length + width)
4. Find the area using the following equation:
area = length*width
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 22/25
Programming Methodologies
Structured Programming
problem is divided into smaller subproblems then each subprobis analyzed and a solution for the subproblem is obtained.solutions to all the subproblems are then combined to solveoverall problem
also known as top-down design, bottom-up design, steprefinement, and modular programming
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 23/25
Programming Methodologies
Object-Oriented Programming
first step in the problem-solving process is to identifycomponents called objects , which form the basis of the sand to determine how these objects interact with one another
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 24/25
ReviewTrue or False:
1. Assembly language is the language that uses mnemonics for its instructions.
2. The arithmetic operations are performed inside CPU and, if an error is found, it outputs logical errors.
3. A Java compiler is a program that translates a Java program into bytecode.
4. Bytecode is the machine language of the JVM.
5. The CPU stands for command performing unit.
6. RAM stands for readily available memory.7. A program written in a high-level programming language is called a source program.
8. The operating system is the first program loaded into the computer when the power is tuon.
9. The first step in the problem-solving process is to analyze the problem.
8/9/2019 CSC101_L1 - Intro to Computer Systems
http://slidepdf.com/reader/full/csc101l1-intro-to-computer-systems 25/25
References JAVATM Programming: From Problem Analysis to Program Design by D. S. Malik
JAVATM How to Program, 7th ed by Deitel
Computer. http://www.computerhope.com/jargon/c/computer.htm
Top 10 Most Popular Programming Languages. http://www.english4it.com/readin
Introduction to Computer Science using Java.http://chortle.ccsu.ed u/CS151/cs151java.html
Introduction to Computer Science.
http ://en.wikiversity.org/wiki/Introduction_to_Computer_ScienceHardware vs Software. http://www.diffen .com/difference/Hardware_vs_Software