Kĩ thuật lập trình - An introduction to hardware, software, and the internet

Host a computer connected to a network Server a computer on a network that provides a particular service (e.g., e-mail server) URL Uniform Resource Locator, an address of a document or a resource on the Internet

ppt28 trang | Chia sẻ: huyhoang44 | Lượt xem: 609 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Kĩ thuật lập trình - An introduction to hardware, software, and the internet, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
An Introduction to Hardware, Software, and the InternetJava MethodsObject-Oriented Programmingand Data StructuresMaria Litvin ● Gary LitvinCopyright © 2011 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved.ch 0012nd AP edition  with GridWorld1Objectives:Get an overview of the main hardware components and terms: CPU, memory, peripheral devicesLearn about software: operating system and application softwareGet an idea of how information is stored in computer memoryLearn basic facts about the Internet2The text for this chapter is online at:www.skylit.com/javamethods3HardwareThe CPU (Central Processing Unit) is made of millions of semiconductor devices, called transistors, etched into a silicon chip.Transistors are combined to form logical devices called gates.All digital electronics is basically made up of gates.4GatesAND gateOR gateNOT gate5Example: XOR CircuitA AND (NOT B)OR(NOT A) AND B6RAM, CPU, BusCPUMemory (RAM)Data busAddress busRegistersMemory (ROM)7CPURAM (SIMMs)Extension slots ROMMotherboard8Hardware TermsCPU — Central Processing UnitRAM — Random-Access Memory“random-access” means the CPU can read directly from and write to any memory locationholds both data and CPU instructionsROM — Read-Only Memoryholds initialization and hardware diagnostic programsPeripheral devices (secondary storage, input/output)9CPUIn personal computers, the CPU is a microprocessor, contained on one chip.The CPU speed is measured in GHz (gigahertz, billions of clock cycles per second) or, in older computers, in MHz (megahertz, millions of cycles).A CPU instruction takes one or several clock cycles.Heinrich Rudolf Hertz10RAM1 KB (kilobyte) = 1024 bytes1 MB (megabyte) = 1024 · 1024 bytes1 GB (gigabyte) = 1024 · 1024 · 1024 bytes1 TB (terabyte) = 1024 gigabyes1 PB (petabyte) = 1024 terabyes0 0 1 0 1 1 0 1bit 0bit 7220  106, a million230  109, a billion2101 byte = 8 bits11Secondary StorageHard disk:100 - 1000 GBCD-ROM: 700 MBA file is asoftware conceptFlash drive:1 - 8 GB12I/O DevicesMonitor and video adapterKeyboard, mouse or touch padSound card, speakers, microphoneInternet adapter, wi-fi (wireless) adapterD/A (digital-to-analog) and A/D (analog-to-digital) convertersScanners, digital cameras, printers13Software LayersDevice driversOperating systemApplicationsBIOS, firmware14Software TermsOperating systema program that maintains the file system, dispatches applications, and provides other system-level servicesConsole applicationa program with simple text user interface GUI — Graphical User Interfacegraphics, menus, buttons, icons, etc.OOP — Object-Oriented Programming15Software Engineers are Able To:Absorb and use emerging technical informationCreate sound software system architecturesUnderstand and devise effective algorithmsBe proficient with the syntax and style of programming languagesDiagnose and correct programming errorsContinued...16Software Engineers are Able To:Use software development tools and documentationFind and utilize reusable software componentsDesign and implement friendly user interfacesUphold the highest standards of professional ethics 17Integers are represented in binary (base 2)Java uses 4 bytes for an integer (int data type)Numbers In Memory0 000000001 000000012 000000103 00000011... ...255 1111111118For signed numbers, the most significant bit indicates the sign:Negative numbers are represented in two’s-complement form00000000 00000000 00000000 00010001Numbers In Memory (cont’d)Sign bit11617+11111111 11111111 11111111 11101111Sign bit-1717 + (-17) = 232 = 019Numbers in Memory (cont’d)Real numbers are represented as floating-point numbers (similar to scientific notation) with a sign, binary mantissa (fractional part), and binary exponent.Java uses 8 bytes (64 bits) for a “double” (that is, double-precision) floating-point number.double’s range is from -1.8  10308 to 1.8  10308(but precision is only 14 significant digits)20CharactersUnicode associates characters with numbers (2 bytes represent a character).ASCII (American Standard Code for Information Interchange) is a subset comprising the first 128 codes of Unicode: 32  ‘A’ - ‘Z’ 65 - 90 ‘0’ - ‘9’ 48 - 57  ‘a’ - ‘z’ 97 - 122The first 32 codes are control codes (Carriage Return, Newline, Tab, etc.).21The InternetA network of interconnected computers that share common communication protocols, TCP/IPTCP: Transmission Control ProtocolIP: Internet Protocol22The Internet LayersInternetworking: routing and forwarding data (IP)Transport: delivering data reliably and securely (TCP)Applications: telnet, www, e-mail, IM, FTP, VoiceNetwork technology (switches, adapters, routers)23The Internet TermsBrowserprovides convenient way to download and display information from the InternetSearch engineindexes and helps find the Internet documents that contain specified keywords and phrasesPortala large popular web site that has a collection of links arranged by category24The Internet Terms (cont’d)Hosta computer connected to a networkServera computer on a network that provides a particular service (e.g., e-mail server)URLUniform Resource Locator, an address of a document or a resource on the Internet25Review:Describe the outputs of an AND gate for all possible combinations of the two inputs.What are CPU, RAM, and ROM?Approximately how many bytes are in a megabyte? In a gigabyte? In a terabyte?Name six I/O devices.26Review (cont’d):Is a device driver a hardware or a software entity? Is a file a hardware or a software concept?Describe the main difference between a console and a GUI application.Name several skills needed for software development.27Review (cont’d):What is the 8-bit binary representation for 6?In Java, how many bytes are used to represent an integer (type int)?Name several applications that run on the Internet.What does TCP/IP stand for?What is a search engine?28

Các file đính kèm theo tài liệu này:

  • pptch01_0096.ppt