hardware bits and bytes Java

Slides:



Advertisements
Similar presentations
Computer Parts There are many parts that work together to make a computer work.
Advertisements

Computer Bits and Parts Parts of the computer system.
Computer Components.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
ECE122 L2: Program Development February 1, 2007 ECE 122 Engineering Problem Solving with Java Lecture 2 Program Development.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition by Tony Gaddis, Judy Walters,
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
CS 0008 Day 2 1. Today Hardware and Software How computers store data How a program works Operators, types, input Print function Running the debugger.
CS102 Introduction to Computer Programming
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Computer Systems. Note to the student Please make brief notes on the following computer hardware + software components After each section research the.
What is Information Technology?
How Computers Work. A computer is a machine f or the storage and processing of information. Computers consist of hardware (what you can touch) and software.
Outline Character Strings Variables and Assignment Primitive Data Types Expressions Data Conversion Interactive Programs Graphics Applets Drawing Shapes.
Topics Introduction Hardware and Software How Computers Store Data
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
COP1220/CGS2423 Introduction to C++/ C for Engineers Professor: Dr. Miguel Alonso Jr. Fall 2008.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Seventh Edition by Tony Gaddis, Judy.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
1 Introduction to Computers Prof. Sokol Computer and Information Science Brooklyn College.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 1 Introduction to Computers and Programming.
Intro to Computers Computer Apps 1.
Program Statements Primitive Data Types and Strings.
Introduction to Computer Systems and the Java Programming Language.
Internal Computer Parts Desiree Robinson. Input Devices Getting information onto the computer Keyboard Microphone Scanner Mouse Video Camera Webcam Touch.
Mrs. Ulshafer August, 2013 Java Programming Chapter 1.
Computers Are Your Future Chapter 1 Slide 1 Introduction to the Computers & Internet Chapter 1 Concepts of Information Technology IT.
Tolo-e-aftab higher education 1 th semester Bcs 1/2/1392 MINISTRY OF HIGHER EDUCATION.
© 2006 Pearson Education Chapter 1: Computer Systems.
 There are many parts that work together to make a computer work.
The Computer System CS 103: Computers and Application Software.
Computer Parts There are many parts that work together to make a computer work.
A.Abhari CPS1251 Topic 1: Introduction to Computers Computer Hardware Computer components Connecting Computers Computer Software Operating System (OS)
Chapter 1 Introduction to Computers, the Internet and the Web.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
Computer Parts There are many parts that work together to make a computer work.
Chapter 1: Introduction to Computers and Programming
Basic Computer Fundamentals
Computer Science.
Java Programming: From the Ground Up
BASIC PROGRAMMING C SCP1103 (02)
Computer Science II Chapter 1.
Chapter 1: An Overview of Computers and Programming Languages
Topics Introduction Hardware and Software How Computers Store Data
Computer Basics 1 Computer Basics.
Lecture 1: Introduction to JAVA
BASIC PROGRAMMING C SCP1103 (02)
Introduction to Computers and Java
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Introduction to Computers
Computer Parts There are many parts that work together to make a computer work.
Condensed Lesson Plan*
Chapter 1: Computer Systems
Computer Parts There are four main equipment functions of a computer system: Input, Processing, Storage and Output. Input: the transferring of information.
Introduction to Computers
Topics Introduction Hardware and Software How Computers Store Data
Computer Parts There are four main equipment functions of a computer system: Input, Processing, Storage and Output. Input: the transferring of information.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Parts There are many parts that work together to make a computer work.
Computer Programming-1 CSC 111
CSC 1051 – Data Structures and Algorithms I
Chapter 1: Introduction to Computers and Programming
Presentation transcript:

hardware bits and bytes Java Introduction hardware bits and bytes Java

What we will do in this class Understand how to control a computer with a programming language. Learn (and practice) strategies and techniques for programming. Learn and use Java.

Hardware and Software Hardware is the machine CPU, monitor, keyboard, speakers, disks, chips Software is the programs that make the machine do things.

Memory the CPU is the chip that does the computation RAM (processor memory) is the storage for programs and data that are in active use.

Input and output devices Input devices: keyboard, mouse, touch part of touch screen, microphone,camera, hard drive, instruments like thermometers... Output devices: monitor, speakers, printer, hard drive, controllers ...

Analogue vs Digital Analogue - old record players, film cameras, speech Digital - audio CDs, digital cameras, written words

Binary Numbers How high can you count on your fingers? (Assuming 10 fingers)

How to count to 1023 on your fingers, (and why you will snicker at the number 4) 128 256 4 8 64 2 512 1 32 16 credit: http://www.hannahsnailsdsm.webs.com/

Bits and Bytes How many bits it takes to represent the days of the week the months of a year one million different colors A byte is 8 bits. How many bytes would it take...

Storing Information 9278 9279 9280 9281 9282 9283 9284 9285 9286 Each memory cell stores a set number of bits (usually 8 bits, or one byte) 10011010 Large values are stored in consecutive memory locations Copyright © 2012 Pearson Education, Inc.

From program to execution Each CPU has its own machine language. Typically, a compiler converts a program to machine language. Different versions of the compiler for different machines.

From program to execution: Java A Java compiler converts the program to bytecode - the same for all machines. An interpreter translates the bytecode to machine code and executes it.

Java Introduced in 1995 by Sun Goal: programs that could be run on any computer, run over the web. Includes its own graphics, including GUIs. Object oriented language.

Program Example: Facts.java credit: Lewis and Loftus

Comments

Comments // A single line comment /* This comment can be on many lines */

class class body Class header

main method main method body main method header

printing System.out.println semicolon ends each statement a string literal between the quotes

concatenation + to put two strings together, concatenation

concatenation a number gets converted to a string for concatenation

skipping a line no parameter, just prints a line

oops! Go from start to end, one command at a time. output: We present the following facts foryour extracurricular edification: Letters in the Hawaiian alphabet: 12 Dialing Code for Antarctica: 672 Year in which Leonardo da Vinci invented the parachute: 1515 Speed of ketchup: 40 km per year Go from start to end, one command at a time.

Escape Sequences Special characters as part of a string: \n newline \t tab \" quote \' single quote \\ backslash