2-1 Hardware CPU Memory - 2 kinds Network Graphics Input and Output Devices.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

Designing a Program & the Java Programming Language
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
COMPUTER TECHNOLOGY Computers Are Your Future Chapter 1.
The Binary Machine Modern high-level programming languages are designed to make programming easier. On the other end, the low level, all modern digital.
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 1, Lab.
Course: Introduction to Computers
Chapter 1: Introduction To Computer | SCP1103 Programming Technique C | Jumail, FSKSM, UTM, 2005 | Last Updated: July 2005 Slide 1 Introduction To Computers.
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
COMP Computer Basics Yi Hong May 13, 2015.
IB Computer Science II Paul Bui
1 Chapter-01 Introduction to Computers and C++ Programming.
History of Programming Languages
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
1 TOPIC 1 INTRODUCTION TO COMPUTER SCIENCE AND PROGRAMMING Topic 1 Introduction to Computer Science and Programming Notes adapted from Introduction to.
COMP 110: Introduction to Programming Tyler Johnson January 14, 2009 MWF 11:00AM-12:15PM Sitterson 014.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
HERY H AZWIR Computer Software. Computer Software Outline Software and Programming Languages  Software  Programming  Programming language development.
CISC105 General Computer Science Class 1 – 6/5/2006.
Computer system overview1 The Effects of Computers Pervasive in all professions How have computers affected my life? How have computers affected my life?
Generations Of Computer Copyright(c)2011 Presentation Point( om)
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
Introduction to Computer Systems and the Java Programming Language.
An Introduction to Software Development Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006.
2-1 Hardware CPU Memory - 2 kinds Network Graphics Input and Output Devices.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
What is Programming? A program is a list of instructions that is executed by a computer to accomplish a particular task. Creating those instructions is.
Creating Your First Computer Program in Java Margaret Yau.
A Look at Java. Categorize Java Which paradigm? Which paradigm? Scripting? Scripting? Declarative or procedural? Declarative or procedural? Which generation?
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Computer Programming Languages HOW COMPUTERS WORK èCIRCUITS èBINARY DIGIT èBIT (0 OR 1) èBYTE - 8 BITS èASCII.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
 Programming - the process of creating computer programs.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Introduction to Computer and Programing Thanachat Thanomkulabut.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
ITP 109 Week 2 Trina Gregory Introduction to Java.
Chapter 1 An Overview of Computers and Programming Languages.
Introduction to Computer Programming using Fortran 77.
An Introduction to Software Development JavaMethods An Introduction to Object-Oriented Programming Maria Litvin Gary Litvin Copyright © 2003 by Maria Litvin,
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Software Engineering Algorithms, Compilers, & Lifecycle.
Topic 2: Hardware and Software
Java Programming: From the Ground Up
Programming Language Hierarchy, Phases of a Java Program
CSCI-235 Micro-Computer Applications
Introduction to.
Microprocessor and Assembly Language
Computer System and Programming
A451 Theory – 7 Programming 7A, B - Algorithms.
Mobile Development Workshop
Computers Are Your Future Chapter 1
Programming Languages
Introduction CSC 111.
CMP 131 Introduction to Computer Programming
IB Computer Science II Paul Bui
Computer Programming-1 CSC 111
Programming language translators
Presentation transcript:

2-1 Hardware CPU Memory - 2 kinds Network Graphics Input and Output Devices

Everything is Binary Eniac 1950 Eniac contained 17,468 vacuum tubes, 7,200 crystal diodes, 1,500 relays, 70,000 resistors, 10,000 capacitors and around 5 million hand- soldered joints. It weighed more than 30 short tons (27 t), was roughly 8 by 3 by 100 feet (2.4 m × 0.9 m × 30 m), took up 1800 square feet (167 m2), and consumed 150 kW of power 2-2

Bits and Bytes KB MB GB TB PB HB? 1-3

Numbers and Letters Numbers are represented in base Keystrokes are represented with ASCII ‘A’ = 65 = ‘B’ = 66 ‘C’ = 67 ‘a’ = 97 ‘b’ =

1-5 Gates AND gateOR gateNOT gate

1-6 Example: XOR Circuit A AND (NOT B) OR (NOT A) AND B

2-7 Software Instructions to CPU / Hardware Binary Assembly Language High Level Languages

2-8

2-9 Programming Languages Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80 C# Logo Python

2-10 Software Development Emphasis on efficiency  fast algorithms  small program size  limited memory use Often cryptic code Not user-friendly Emphasis on  programmer’s productivity  team development  reusability of code  easier maintenance  portability Better documented User-friendly 's:Now:

2-11 Software Development Tools Editor  programmer writes source code Compiler  translates the source into object code (instructions specific to a particular CPU) Linker  converts one or several object modules into an executable program Debugger  steps through the program “in slow motion” and helps find logical mistakes (“bugs”)

2-12 The First “Bug” “(moth) in relay” Mark II Aiken Relay Calculator (Harvard University, 1945)

2-13 Compiled Languages: Edit-Compile-Link-Run Editor Source code Compiler Object code Linker Executable program Editor Source code Compiler Object code Editor Source code Compiler Object code

2-14 Interpreted Languages: Edit-Run Editor Source code Interpreter

2-15 Compiler vs. Interpreter Compiler:  checks syntax  generates machine-code instructions  not needed to run the executable program  the executable runs faster Interpreter:  checks syntax  executes appropriate instructions while interpreting the program statements  must remain installed while the program is interpreted  the interpreted program is slower

2-16 Java’s Hybrid Approach: Compiler + Interpreter A Java compiler converts Java source code into instructions for the Java Virtual Machine. These instructions, called bytecodes, are the same for any computer / operating system. A CPU-specific Java interpreter interprets bytecodes on a particular computer.

2-17 Java’s Compiler + Interpreter Editor    Hello.java  Compiler  Hello.class   Interpreter Hello, World !   Interpreter

2-18 Why Bytecodes? Platform-independent Load from the Internet faster than source code Interpreter is faster and smaller than it would be for Java source Source code is not revealed to end users Interpreter performs additional security checks, screens out malicious code

2-19 // Mike Bollhorst // Aug 19, 2013 // Hello: my first program - prints hello world on screen public class Hello { public static void main (String[] args) { System.out.println(“Hello world!”); }