Computer Principles and Components 1

Similar documents
An Introduc+on to Computers and Java CSC 121 Spring 2017 Howard Rosenthal

Topics. Hardware and Software. Introduction. Main Memory. The CPU 9/21/2014. Introduction to Computers and Programming

Computer Basics 1/24/13. Computer Organization. Computer systems consist of hardware and software.

Computer Fundamentals

Simple Java Programming Constructs 4

An Introduction to Computers and Java CSC 121 Spring 2015 Howard Rosenthal

0 Introduction: Computer systems and program development

Computer Basics 1/6/16. Computer Organization. Computer systems consist of hardware and software.

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

The Programming Process Summer 2010 Margaret Reid-Miller

C H A P T E R 1. Introduction to Computers and Programming

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Java and Software Design

Week 0: Intro to Computers and Programming. 1.1 Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components

Chapter 1 Introduction to Computers and C++ Programming

! Learn how to think like a computer scientist. ! Learn problem solving. ! Read and write code. ! Understand object oriented programming

Chapter 1: Introduction to Computers and Programming

HARDWARE. There are a number of factors that effect the speed of the processor. Explain how these factors affect the speed of the computer s CPU.

SSRVM Content Creation Template

Machine Architecture and Number Systems

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Chapter 1: Why Program? Main Hardware Component Categories 8/23/2014. Main Hardware Component Categories: Why Program?

An Overview of the Computer System. Kafui A. Prebbie 24

I1100 E Introduction to computer.

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Computer Fundamentals

Elements of Computers and Programming Dr. William C. Bulko. What is a Computer?

Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400, AIX, z/os, etc.

Fundamentals of Programming Session 1

Introduction to Computers and Programming Languages. CS 180 Sunil Prabhakar Department of Computer Science Purdue University

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

User. Application program. Interfaces. Operating system. Hardware

Introduction to Java Programming

Q1. Describe the characteristic features of input and output devices of a computer system. [10]

Question Bank. Fundamentals Of Computer FYBCA (SEM - I)

SUBJECT COMPUTER APPLICATION PAGE 1

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

C++ Programming Language Lecture 1 Introduction

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

1.The First Instrument known in the history of computers was. a) Pascal s adding machine b) Napier s bones c) Abacus d) Analytical Engine

Gagan. Site : Youtube :

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

Introduction to Computers and Java

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Introduction to Computers, the Internet and the Web Pearson Education, Inc. All rights reserved.

Software Development 2

ST. MARY S COLLEGE FORM 4

Chapter 3: Operating-System Structures

v.m.g.rajasekaran ramani sri sarada sakthi mat. Hr. sec. school

Fundamentals of Programming Session 1

Introduction to Computers and Java

Exercise 2 : Complete each sentence or statement. 1. data consists of numbers that might be used in arithmetic operations.

CHAPTER 1: INTRODUCTION TO COMPUTERS AND PROGRAMMING. 1 Muhalim Mohamed Amin Faculty of

Memory Addressing, Binary, and Hexadecimal Review

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Ch. 1: Computer System part I

Lecture 2 Winter 2006 Essentials of Computing

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

(0) introduction to the course. how to learn a programming language. (0) course structure

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Module 1: Introduction

Computer Systems. Communication (networks, radio links) Meatware (people, users don t forget them)

Programming 1. Lecture 1 COP 3014 Fall August 28, 2017

Computer ANAMIKA ACADEMY. Mo Which function has the ability to move from one web page to another Hyper link

Terminology & Basic Concepts

Chapter 1 Introduction to Computers and Programming

Geographic Information Systems (GIS) - Hardware and software in GIS

Chapter 1. Hardware. Introduction to Computers and Programming. Chapter 1.2

8/16/12. Computer Organization. Architecture. Computer Organization. Computer Basics

UNIQUE IAS ACADEMY- COMPUTER QUIZ 2

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 2: SEP. 8TH INSTRUCTOR: JIAYIN WANG

Module 1: Introduction. What is an Operating System?

Padasalai s - VIRUDHUNAGAR DISTRICT COMMON FIRST MID TERM TEST, JULY 2018 STANDARD 11 COMPUTER APPLICATION

Programming Languages and Program Development

EXPERIMENT 1. FAMILIARITY WITH DEBUG, x86 REGISTERS and MACHINE INSTRUCTIONS

Chapter 3: Operating-System Structures

INFORMATION TECHNOLOGY PRINCIPLES

1 Digital tools. 1.1 Introduction

Chapter 2: Computers: The Machines Behind Computing.

OS and Computer Architecture. Chapter 3: Operating-System Structures. Common System Components. Process Management

Unit 2 : Computer and Operating System Structure

CHAPTER 1 Introduction to Computers and Java

SCSP Programming Technique C

Fundamentals of Programming (Python) Basic Concepts. Ali Taheri Sharif University of Technology Spring 2018

COMPUTER SYSTEMS. Section 1

Chapter Three. Hardware Basics: Peripherals

last time in cs recitations. computer commands. today s topics.

Administration Computers Software Algorithms Programming Languages

History. 3rd Generation- Integrated Circuits, Transistors (Integrated Circuit form) for Memory ( memory is now volatile), Terminal/Keyboard for I/O

Chapter 3: Operating-System Structures

Chapter 1: Why Program? Computers and Programming. Why Program?

Angel International School - Manipay 1 st Term Examination November, 2015 ICT

Basic Computer Hardware Notes in PDF

1. A folder inside a folder is called. a) Mini Directory b) Sub Directory c) Root Folder d) Child Folder e) None of these

Chapter 2. Operating-System Structures

Transcription:

Computer Principles and Components 1 Course Map This module provides an overview of the hardware and software environment being used throughout the course. Introduction Computer Principles and Components Software Development Language Rules and Constructs The Java Language Rules and Tools Simple Java Programming Constructs Advanced Java Programming Constructs Objects, Arrays, and Methods Object Orientation Methods Arrays Advanced Object Orientation 1-1

Relevance Discussion This module provides a very simple perspective of computer hardware and software. The Java programming language requires you to run your programs inside another program called the Java Virtual Machine (JVM). The JVM was designed to be a software version of a computer, so understanding the basic components of any computer and how they interact will help you to understand more of the Java programming language. What systems have you worked on? What types of applications or programs have you used? This chapter is our chance to introduce the environment of the classroom. Remember that many students may not have used a computer for more than the occasional game or company package. The chapter does not contain any OS-specific commands or details. It is the instructor s job to provide the local environment-specific information. There may be a little confusion - why are we learning something as basic as computer hardware, and in very general terms as well. First, all computer scientists benefit from some hardware knowledge. Second (and this is the best selling point) the Java programming language requires a JVM to run, which is a software implementation of a machine. Emphasize this and the students will realize it is directly pertinent to the course. 1-2 Java Programming for Non-Programmers

Objectives Upon completion of this module, you should be able to: List the main logical and physical components of a computer system Describe how computers store data Explain the different ways of writing and executing programs Navigate the computer system being used during the course Identify, load, and use the software packages available in this class for software development Computer Principles and Components 1-3

The Logical Components of a Computer A computer can be considered to consist of two parts hardware and software. Hardware As the name suggests, describes the physical parts of the computer, including the keyboard, screen, mouse, and so on. Software A general term referring to the programs running on the computer. 1-4 Java Programming for Non-Programmers

Hardware Simple Hardware Components Hardware components fall into four categories: Components for data input (mouse, keyboard, trackerball, digitizing tablet, scanner, touch-screen, punched-card reader, and so on) Components for data output (screen, printer, plotter, light-array, robot mechanisms, and so on) Components for permanent data storage (magnetic tape, harddisk, diskette, compact disc read-only memory (CD-ROM), optical disk, and so on) Components for data processing and manipulation: the inner workings of the computer that perform the actual tasks The first three of these groups should be familiar to most people. The next section discusses the fourth group in more detail. Computer Principles and Components 1-5

Hardware The Inner Workings The most important box of your computer is the processor, the one all the others plug into. The other devices are called peripherals. It is the unit which coordinates the flow and processing of information between the other devices. Inside this unit there are many very important computer chips. This section attempts to describe some of them and how they interact. While there are variations between computer manufacturers and the types of machine being used, the following is correct in basic principle. CPU The central processing unit (CPU) is the primary chip in the computer. In simple computer designs the CPU is responsible for all processing tasks, while modern computers also incorporate support chips. The CPU coordinates information between these. 1-6 Java Programming for Non-Programmers

Hardware The Inner Workings (Continued) ALU Most of the tasks required of a computer involve arithmetic or logic processing. The Arithmetic Logic Unit (ALU) is a dedicated chip that improves the overall performance of the computer. Graphics Accelerators Windows operating systems put an enormous strain on the CPU because so much processing is required just to drive the user interface. Graphics support chips improve this situation. RAM Programs need to store data where it can be retrieved quickly. Random access memory (RAM) is used for this. Data does not persist after the computer is powered down. Computer Principles and Components 1-7

Software Any sequence of commands that a computer executes from memory or other storage device falls under the title of software. This section lists some of the better-known types of software. Operating System (OS) The operating system is the program which runs on a computer all the time and acts as a user interface. When you type an operating system command such as dir on DOS (or ls in the UNIX environment, and so on) the operating system runs the corresponding program for that command. Windows operating systems work in the same way but use the mouse for user input. Application An application is a stand-alone program that can be run by the operating system. Most operating systems allow you to run applications in different ways, in real time at the command line, or as a batch process (not interacting with the user at all, and usually only when the operating system is not busy doing something else), or as a background task (similar to batch but active rather than inactive). 1-8 Java Programming for Non-Programmers

Software Client/Server This refers to two of the previous applications interacting in a specific way. A server is a program that runs in the background and is always active, waiting for clients to connect to it. Clients are real-time programs that users interact with. Web browsers, for example, are clients while the sites you visit with them are accessed via a server. If a server fails then those Web sites are unavailable. Applet A Java technology term for a program that runs inside a Web browser. Applets are embedded in Web pages and run on the same machine as the browser that is viewing the page. Servlet A program (written in any programming language) that is used by a server to provide extra processing outside the scope of the server. CGI (common gateway interface) scripts on Web server programs are servlets. Computer Principles and Components 1-9

Binary All software and data are stored and manipulated within the computer in bits. In early computers a bit was represented by a valve that was either on or off. Modern computers use chip-based bits but the effect is the same a bit is either on or off. Because a bit can store one of two values the computer counts in base 2 or binary. Humans use base 10 (decimal). This section briefly explains the primary principles of binary. Humans think in terms of 10s and powers of 10 (100 centimeters to a meter, 1000 grams to a kilogram, and so on). Computers think in terms of 2s and powers of 2. 1-10 Java Programming for Non-Programmers

Notes It would be impossible to adequately cover and explain binary within these notes. Consider running a session here which covers the concepts of binary to a level acceptable to your group. I have yet to meet a class where no one was interested or already knew all of the following: 1 & 2 s complement Taking 3- and 4-byte groups to count in octal and hexadecimal (use UNIX file permissions to explain octal), how a byte can be expressed as two hex digits, and so on. Why graphics packages use the range 0-255 for RGB values, and how one pixel is expressed as a 32-bit ARGB combination Why 1k is not 1000, but 2 to the power of 10 = 1024 How to switch between upper and lower case English letters by adding 32 (switching one bit) There are many others. This session CAN go on for a couple of hours. Computer Principles and Components 1-11

Creating Programs Machine Code Humans communicate with each other in many different languages English people understanding English, French people understanding French, and so on. It would not matter if they were talking or writing to each other, but two people wishing to talk who do not have a common language will require a translator (usually for written text) or interpreter (for verbal communication). Computers have their own languages, as well. While the medium is always binary, each will understand a binary sequence differently. The binary language that a computer understands is called machine code. 1-12 Java Programming for Non-Programmers

Creating Programs Other Languages Machine code is completely different from all human languages. For people to use machine code they must learn to think in exactly the same way as the computer and spend hours manually converting their thoughts into the correct binary sequences before typing them into the computer. Over the years of software development people have invented different sorts of languages to help humans program computers. Machine code was called the 1st generation language. The next language to be invented was assembly-code, where small mnemonics could be typed in that performed the same tasks as several combined machine code statements. This was called the 2nd generation language. 3rd generation languages came next. This set includes famous names such as Pascal, FORTRAN, COBOL, FORTH, Basic, and so on. 4th generation languages, which includes Java, are usually interpreted. A run time environment is responsible for running your program in a portable way across different computers. The portable database Structured Query Language (SQL) is a good example of this; the database environment is the interpreter. 5th generation systems do not exist yet. These could involve computers that understand human speech and can interact directly with us. Plans for 6th and 7th generation systems involve gesture- and thought-driven computers. Computer Principles and Components 1-13

Creating Programs Other Languages (Continued) Each generation of language is farther removed from the original machine code. Talking machine code means you are directly interacting with the machine, so it is fast but only that sort of machine can understand you. Talking in a 4th generation language, for instance, means you are using an interpreter that is itself a program which was compiled for that machine. Each generation away from machine code increases the portability of your program but also slows it down. C crosses one of the generation boundaries. C has the structures you would expect of a 3rd generation language but the programs run almost as fast as those written in 2nd generation languages. 1-14 Java Programming for Non-Programmers

Creating Programs The Java Programming Language If you want to write a program, you must either understand the machine code of your computer or use a higher generation language with a translator (called a compiler in this case). You type your program into a file using a text editor and then convert it into machine code using a compiler. This approach produces fast programs but they can only run on that sort of machine. An alternative approach is to use an interpreter. Some languages read and understand your text file at runtime. This approach is slower than using a compiler but one source code file can be run on any computer which has an interpreter. The Java programming language combines both approaches, using a compiler to convert your source code text files into a special format called bytecode. To run a bytecode file you need a Java programming language interpreter, called the JVM (Java Virtual Machine). Computer Principles and Components 1-15

Exercise: Working in Your Environment Exercise objective The objective of this exercise is to become familiar with the environment you are using in this course. Preparation Your instructor will explain the basic OS commands you will need to list the contents of a directory, change directory, make a new directory, and so on. Please assess the level of your group before starting this exercise. It is possible that it will not be required at all. Tasks Experiment with the environment on which you are training this week. Use a command line window to at least: List the contents of the current directory. Create a new directory called MyApps. Change directory to the new directory. Note It is recommended that you create a new directory for each exercise this week. Each exercise concentrates on a particular aspect of the course, which will be reflected in the structure of your file system. 1-16 Java Programming for Non-Programmers

Exercise: Working in Your Environment Exercise Summary Discussion Take a few minutes to discuss what experiences, issues, or discoveries you had during the lab exercises. Manage the discussion here based on the time allowed for this module, which was given in the About This Course module. If you find you do not have time to spend on discussion, then just highlight the key concepts students should have learned from the lab exercise. Experiences Ask students what their overall experiences with this exercise have been. You may want to go over any trouble spots or especially confusing areas at this time. Interpretations Ask students to interpret what they observed during any aspects of this exercise. Conclusions Have students articulate any conclusions they reached as a result of this exercise experience. Applications Explore with students how they might apply what they learned in this exercise to situations at their work place. Computer Principles and Components 1-17

Check Your Progress Before continuing on to the next module, check that you are able to accomplish or answer the following: List the main logical and physical components of a computer system Describe how computers store data Explain the different ways of writing and executing programs Navigate the computer system being used during the course Identify, load, and use the software packages available in this class for software development 1-18 Java Programming for Non-Programmers

Think Beyond How do you begin writing a program from a problem that is presented to you? Are there major steps in a development cycle? Are there different approaches for designing a program? Computer Principles and Components 1-19

1-20 Java Programming for Non-Programmers