1 / 102

Introduction to Programming

Introduction to Programming. Instructor: Yong- nian Tang Brookhaven National Laboratory Working on accelerator control 631-344-7022 (BNL Phone #) yntang@bnl.gov tangy@sunysuffolk.edu. Text Book: Introduction to Java Programming by Daniel Liang

chul
Download Presentation

Introduction to Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Programming Instructor: Yong-nian Tang Brookhaven National Laboratory Working on accelerator control 631-344-7022 (BNL Phone #) yntang@bnl.gov tangy@sunysuffolk.edu

  2. Text Book: Introduction to Java Programming by Daniel Liang How expensive is it? Introductionto Programming 2

  3. Do we need to buy the text book? It is recommended because we’ll do many excises in the book. Having the book will make your life much easier. However, you can survive (barely?) without the book. Introduction to Programming 3

  4. Supply: USB drives to save files and transfer data. Very cheap when they are on sale. About $0.50 to $1 per GB, or even less. Every one should have one or two. Introduction to Programming 4

  5. Course Web Pages: www2.sunysuffolk.edu/tangy/cst112 Outline Announcements Slides Projects Data files for projects and exercises Answers to some exercises Attendance and project status Introduction to Computing 5

  6. Objective Introduction to computer concepts, Windows XP, network security and protection. Basic concepts and usage of Office 2010, Word, Excel, Access, and PowerPoint. In addition to the contents of the text book, some advanced topics will be introduced. Introduction to Computing 6

  7. Attendance Policy Attending classes is very important Firm but flexible policy If you can not attend a class, call 344-7022 or email tangy@sunysuffolk.edu Attendance Grades: 10% goes to the final grade. Introduction to Programming 7

  8. Fail or Withdrawal One should go to registrar to formally withdraw from the class if quitting attending the class after some date. For example, one quits the class after the midterm exam. If you forget to formally withdraw, I usually assign W as your final grade if the College permits. However, if you need to get an F in order to get financial aid, please send me an email. If the College does not allow professors to assign W, I will assign F for lack of choices. Introduction to Programming 8

  9. Grading Policy Specified in the outline In general, if one attends the classes, finishes lab work, exams and projects, one gets a relatively good grade. Do not worry about grades, to learn something is more important. Introduction to Programming 9

  10. Topics The language we use is Java However, we use a language called “processing” in the first several classes. Processing is based on java but on a higher level. We’ll use processing to draw colored balls (or other objects) and move them on the screen. Introduction to Programming 10

  11. Topics In the remaining classes we use Java!!! Our goal is to be able to write medium size programs at the end of the class. I enjoy to answer questions from you and discuss them with you. Please be actively involved in the class activities. Introduction to Programming 11

  12. Defining Computers • A computer is an electronic device • accepts input • processes and stores data • produces output

  13. Types of Computers • Personal computers • Desktop • Notebook (Laptop) • Tablet PC • Hand-helds:PDAs, MP3 players, Cell phones • Mainframes • Supercomputers • Other computers (at home, in car…)

  14. Types of Computers • Personalcomputersare used for general computing tasks. • Hand-heldcomputersfit in the palm of your hand and run on batteries. • Mainframes are used by companies to provide centralized storage, processing, and management for large amounts of data. • Supercomputers are the largest and fastest of computers, and can process an enormous volume of data.

  15. Types of Computers • Desktop: (HP, Dell, IBM…) • Usually more powerful and cheaper than laptops • Needs separate monitor, not easy to move around • Could be replaced by laptops and tablets in the near future?

  16. Types of Computers • Notebook, Netbook & iPad • Small & lightweight. • Portable • Netbook: browsing • Internet • Tablets (7” and 10”)

  17. Types of Computers • Supercomputers are the largest and fastest computers. BNL Bluegene • Mainframe s are very powerful computers, but not as powerful as supercomputers. • Clusters: consists of hundreds and more processors.

  18. Computer Systems A computer system is made up of: • Hardware — the physical components. Can be touched. If kicking it, your toe will get hurt. • Software — the programs or lists of instructions. Can not be touched. • Software could be more expensive than hardware. Why do most people KEEP using Windows system?

  19. Can we reduce the weight of a computer by deleting its software (files). No!!! Software has no weight.

  20. Hardware: major components • Motherboard • CPU (Central Processing Unit) • Memory • Storage devices • I/O (Input/Output) devices • Network devices • Power supply, case, video card, sound card…

  21. Hardware: Motherboard • Also called mainboard • Located inside the computer case • Holds and connects all essential components

  22. Hardware: CPU • CPU - micro processor • A silicon chip designed to manipulate data • The brain of a computer. • 64-bit CPUs and 32-bit CPUs

  23. Hardware: CPU (cont.) • Intel, AMD, Apple, IBM… make CPUs. • Its speed is determined by: • Clock speed (Hz) • Word size (32-bit and 64-bit) • Processor type • Usually, motherboard and CPU are the most expensive components in a computer. High-end video cards are not cheap either.

  24. Question 1. What are the two most expensive components in a computer?

  25. Hardware: Units of Memory and Storage • Computer understands 0 and 1 only: on/off state, N/S pole, 0/5 volts… • 1 (“on”) and 0 (“off”) are referred to as bits. • Eight bits is a byte. Two bytes represent a unique character (Unicode) • Decimal numbers and binary numbers.

  26. Hardware: Units of Memory and Storage • Everything in the computer memory and storage devices is a number! A computer understands only numbers. • Number  number • Character  number (ASCII code) • Grey level  number ( usually 0 – 255) • Color  three numbers (R/G/B)

  27. Question 2. A byte can store 256 different numbers, why do we need two bytes to store an English character?

  28. Hardware: units of Memory and Storage • Kilobyte (KB) = one thousand (1024) bytes • Megabyte (MB) = one million (1024 KB) bytes • Gigabyte (GB) = one billion bytes • Terabyte (TB) = one trillion bytes

  29. Hardware: Memory • Computer memory is a set of storage locations. • Five types of memory: • Random access memory (RAM) • Cache memory • Virtual memory • Read-only memory (ROM) • Complementary metal oxide semiconductor memory (CMOS)

  30. Hardware: Memory • RAM --- Random Access Memory • Sits on motherboard and closes to CPU • Also called volatile memory, primary memory, and main memory. • Most important memory type. • 256 MB to many GBs. • Fast CPU + big memory + (fast graphical card) a fast computer.

  31. Hardware: Memory • Cache memory • Special high-speed memory chip on the motherboard or CPU • Stores frequently and recently accessed data and commands. • Usually 1 to ??? MB. • The bigger, the better, also more expensive.

  32. Hardware: Memory • Virtual memory is extra memory that simulates RAM if more is needed. Limited by the memory space (word size). • Read-only memory (ROM) is the permanent storage location for a set of instructions the computer uses. • CMOS memory is semi-permanent information about where essential software is stored.

  33. Hardware: Storage Media • Magnetic storage devices • Hard disks—several magnetic oxide covered metal platters usually sealed in a case inside the computer • Tape—inexpensive, slow, archival storage for large companies who need to back up large quantities of data. • Floppy disks: (almost) obsolete

  34. Hardware: Storage Media • Optical storage devices • CD-R - store 700 MB of data • CD-RW: not reliable • DVD—can store between 4.7 and 15.9 GB of data; Blue-ray discs and HD-DVD can store between 15 and 50 GB of data

  35. Hardware: Storage Media • Flash memory cards • Small, portable cards: rewritable • Used in digital cameras, handheld computers, video game controllers, and other devices • Most commonly-used: SD (HDSD) cards – Secure Digital.

  36. Hardware: Storage Media • USB drive, USB flash drive • from 32 MB to 16 GB and more • Plug directly into the USB port (hot operation) • Rewritable • Best portable storage • Small and inexpensive: $1.50/GB

  37. Hardware: Differences between memory & storage

  38. Question 3. When we talk about memory and storage, how do you compare computers and people?

  39. Hardware: Input/Output • Input: • Data you type • Data by reading files • Data through Internet. • Data from sensors…… • Other sources • Output: The result of computer processing.

  40. Hardware: Input/Output • Peripheral devices • Accomplish the input, output, and storage functions. • Not on the motherboard  slow • I/O always is the slowest part of any program execution

  41. Hardware: I/O Devices Input devices: • Keyboard • Mouse • Others

  42. Hardware: I/O Devices • Output devices: • Monitors • CRT monitors (almost obsolete) • LCD and LED • Printers • Others

  43. Hardware: I/O Devices Monitor’s quality • Screen Size (diagonal in inches) • Resolution (in pixels) • Setting the screen resolution.

  44. Hardware: I/O Devices • Types of printers • Laser • Inkjet • B/W printing: • buy laser printers • Color laser printer: very expensive cartridges. Inkjetprinter

  45. Hardware: Printer • Turn OFF the printer when not printing to prevent the heat from drying the cartridges. • Use the power button to turn off the printer in order to make cartridges stay in the proper housing. Do not pull the power cord.

  46. Hardware: Video Card • Integrated (on-board) and dedicated video cards • Gaming: needs high-end video cards. • High-end computers have dedicated video-cards • Usually, a video card has its own memory; on-board video shares main memory. Microsoft Office 2007-Illustrated Introductory, Premium Video Edition 46

  47. Hardware: Network Devices • Network cables (Ethernet cables) • Modems and routers • Wireless cards and adapters • Building a home wireless network: Not as hard as one thinks. Just follow the instructions.

  48. A Desktop Computer

  49. Motherboard and others

  50. The Back of a Computer Power connection Computer ports and connections Mouse port Keyboard port Audio connection Monitor port FireWire port USB ports Network port Speaker and microphone connections Phone line connection

More Related