Download presentation
Presentation is loading. Please wait.
Published byElvin Parks Modified over 9 years ago
1
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach by M. Guzdial and B. Ericson, and instructor materials prepared by B. Ericson.
2
Outline What is Computer Science Some of the roles of Computer Science in our society What is in a computer What is programming What is a program What a compiler does Some specificities of Java 2
3
What is Computer Science? 3 The design, analysis, implementation, … of algorithms, that solve problems. Why study Computer Science? computing is part of everything we do develops your problem solving skills Lots of jobs! Network and data analysts, software engineers are projected to be some of the fastest growing professions, 2006-2016
4
Roles of Computer Science Maintaining the technical infrastructure network, software But also many algorithmic challenges AI for games search or auction algorithms (Google, Bing) medical imaging cryptology (RIM) low-power chips 4
5
CPU and RAM 5 Central Processing Unit (CPU) (processor) executes instructions Main Memory (RAM) Internal storage that holds the programs (instructions and data) currently executed Made of switches, each of which represents 0 or 1 and is called a bit (binary digit) Information is lost when power is turned off
6
External memory and I/O 6 Secondary Memory: hard disks, CDs, DVDs, USB sticks Provide long-term storage Organized as files, each of which has a file name and a folder (directory) that contains it. Input/Output (I/O) units: keyboard, mouse, screen, printer, webcam, etc. Used for communications with the user
7
What is programming? 7 Programming is the process of creating detailed instructions that a computer can execute to accomplish some task It is much like: writing a recipe for your favorite dish giving someone directions to your house making a robot do what you want
8
What is a program? 8 Programs consist of Instructions to perform a task Data values used in performing the task Programs are written in a language that a computer can understand System.out.println(…) prints to the screen public class HelloWorld { public static void main(String[ ] args) { System.out.println("Hello World!"); }
9
High-level languages 9 Programmers usually write programs in high-level languages Java, C, C++, C#, Visual Basic, Python, Scheme, Lisp, Pascal, Fortran, etc. etc. People-oriented: created to make it easier for programmers to write complicated programs Machine independent: not written for any particular kind of computer (Intel, Mac, etc.) But computers do not understand high-level languages directly
10
Machine language 10 The machine language consists of the set of instructions that the CPU can execute directly Instructions to the CPU (to add, subtract, read, store, etc) are made up of 0’s and 1’s Machine dependent: each type of computer has its own machine language 000100111000010100100110101111001
11
High-level to machine language 11 High-Level Language Program (source code) Compiler Machine Language Program (executable code) CPU
12
Java 12 A high-level language developed by Sun Microsystems in the early 1990s Cross-platform Object-oriented (later) Widely used in business, science and education One of the fastest-adopted technologies of all time! Different from previous high-level languages
13
From program to execution 13 Java Compiler CPU Java source code Bytecode Java Virtual Machine
14
Summary 14 Terminology introduced: CPU, RAM Bit Program High-Level Language Machine Language Compiler Bytecode Java Virtual Machine
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.