Repetition

Document Sample
Repetition Powered By Docstoc
					Chapter 1 – Computing
    Fundamentals
 History of Electronic Computers
 First   computer
   – ABC (Atanasoff Berry Computer) at Iowa State U.
   – 1930‟s
   – Solved large numbers of simultaneous equations
 First   “all-purpose” computer
   – ENIAC (Electronic Numeric Integrator And
     Calculator)
   – Main idea developed from ABC notes
 Both    had set wiring –data was input to memory

Lesson 1.1
             John von Neumann
 Mathematician
 Proposed  alternative to “hard wiring”
 Introduced concept of stored program
  instructions
   – Both data and instructions were stored
   – Led to development of multipurpose
     computers

Lesson 1.1
             Computer Categories
   Supercomputers
   Mainframe computers
   Workstations
   Personal computers (microcomputers)
   Laptops
      More powerful than ENIAC
   Palmtops
 Speed and size!

Lesson 1.1
                  Architecture
 Four    main parts
   –   CPU (central processing unit)
   –   Main memory
   –   Controllers
   –   Peripheral devices
 Hardware
   – Electronic and mechanical devices integrated or
     connected to computer

Lesson 1.2
                   Schematic

                  CPU                  Motherboard

    Arithmetic    Register   Control
                  Register                  Main
    Logic Unit    Register    Unit         Memory




                                        Controllers
             Peripheral Devices



Lesson 1.2
                 Main Memory
 Stores information to be process or
  instructions to be executed
 Information stored in bits (binary digits)
   –   Two states: on or off
   –   Byte is 8 bits (character of information like „b‟)
   –   Grouped into packets called cells or words
   –   Bit pattern is code

Lesson 1.2
               Memory Sizes
 Represented   by 2 raised to a power

    Trillion     1,099,511,627,776         240 = terabyte

    Billion       1,073,741,824          230 = gigabyte

    Million         1,048,576         220 = megabyte

    Thousand           1,024       210 = kilobyte

                               23 = 8 bits (byte)
Lesson 1.2
               Memory Access
   RAM
     – Random access memory
     – Allows access to cells in no particular order
     – Volatile
   ROM
     – Read only memory
     – Cannot be modified by user
     – Information is permanent (non-volatile)
   Serial   access
     – Sequence of cell followed to extract information

Lesson 1.2
  Central Processing Unit (CPU)
   Control   Unit
     – Controls activities of CPU
     – Directs flow of instructions
     – Communicates with ALU
   Registers
     – Rapid access memory cells
   Arithmetic-Logic     Unit (ALU)
     – Arithmetic operations
     – Logic operations (compares, etc)
Lesson 1.2
              Peripheral Devices
   Two      categories
     – Mass storage
          Disk drives
          Tape drives

          CD drives, etc.

     – Input-output (I/O)
          Monitors
          Keyboards

          Printers

          Speakers, etc.


Lesson 1.2
             Mass Storage Devices
   Store information
   Devices that rotate, write to or read from
    called drives
   On/Off (binary)
     – Magnetic spots on disks or tape
     – Pits or “lands” on CDs (optical disks)


Lesson 1.2
 Major Differences between Main
        and Mass Storage
 Slower access in mass storage than main
 Mass storage portable
 Mass storage usually have greater capacity
  and can hold large amounts of information
 Main memory is volatile and disappears
  when power is off, but mass storage
  permanent (unless deliberately erased)

Lesson 1.2
             Input-Output Devices
 Input
   – Convert information coming in to computer
     compatible form
   – Examples: keyboards, scanners, microphones
 Output
   – Convert computer codes into user
     understandable format
   – Examples: monitors, printers, speakers
Lesson 1.2
                Controllers
 Coordinate   actions of peripheral devices
   with actions of computer
 Constant flow between peripheral
   equipment and controller
   – Need to know what peripheral equipment is
     doing


Lesson 1.2
                    Networks
   Groups  of individual computers and
    peripheral devices linked together to share
    information and resources
   Two      categories
     – Wide area network (WAN)
     – Local area network (LAN)
   Topology      is “shape” of connection
Lesson 1.3
             Network Topologies

                        Bus

         Ring


                                  Tree
       Irregular




Lesson 1.3
             Data Representation
 Each bit is either on or off, 1 or 0
 ASCII code – 8 bits make a byte
 Integers represented by base 2, binary system
   – Each place position is power of 2 (23+22+21+20)
 Two    other number systems used
   – Octal (powers of 8)
   – Hexadecimal (powers of 16)

Lesson 1.4
              Memory Addresses
 Every      memory cell needs to be addressed
 Binary     code represent address of cell
 One cell can contain address of another
   memory cell




Lesson 1.4
       Programming Languages
   Assembly   language
     – One level above machine language
   High-level   language
     – Designed to simplify writing programs
     – Four types
         Procedural (imperative)

         Functional

         Declarative

         Object oriented


Lesson 1.5
                   Software
      of instructions read into computer‟s
   Set
    memory and later executed on demand
   Two types
     – System
         Operating systems

         Utility programs

         Language translators

     – Application

Lesson 1.6
     Operating System Software
 Software    written into memory upon startup
 Interface between user, computer and
   peripherals
 Two    categories
   – Multiple-user computers
   – Single-user computers


Lesson 1.6
             Utility Programs
 Perform  basic operations necessary for
   performance of computer system
   – File operations
       creating, copying, saving

       deleting, merging, sorting

 Encapsulated    with operating systems


Lesson 1.6
             Language Translators
 Convert  programmer-made instructions
  (source code) into machine-language
  instructions (object code)
 Three types
   – Assemblers: Convert assembly language programs
     to object code
   – Interpreters: Converts an instruction to object code
     then executes it
   – Compilers: Converts entire program to object code

Lesson 1.6
         Integrated Development
           Environment (IDE)
 Full   package
   – Compiler
   – Text editor
   – Debugging tools
 Allows  creation, repeated execution and
   modification of a program
   – Helps find violations of language rules

Lesson 1.6
             Application Software
   Manytypes exist
   Examples of common types
     –   Games
     –   Word processing
     –   Database management
     –   Graphics
   Program   solves practical problem or does
    specific tasks

Lesson 1.6
             Software Engineering
 Describes process of software development
 Process involves many steps (Figure 1.10)
   –   Definition of problem
   –   Design scheme (breaking into modules)
   –   Coding modules
   –   Testing
                                Program never “done”
   –   Assemble modules
   –   Test until working correctly

Lesson 1.7
        Structured Programming
 Top-down       design
   – Defines all tasks program is to perform
 Tasks      separated and functions developed
   – Can be designed separately
   – Two types
       Library

         – Included in C++ development environment
       Programmer-defined

         – Custom made by user
Lesson 1.7
  Development of C++ Language
 Middle 1980s at Bell Laboratories
 Bjarne Stroustrup
 Improvement upon C language
 Standardized in 1997
   – American National Standards Institute (ANSI)
   – International Standards Organization (ISO)
 Object-oriented

Lesson 1.7
 C++ Development Environment
 Primary     goal to produce executable file
   – Machine language instructions
 Allows     user to
   –   Create source code
   –   Test it
   –   Modify it
   –   Convert it to executable format

Lesson 1.7
             C++ IDE Operations
 Editing text to create source code
 Preprocessing source code
 Compiling source code and code attached
  by preprocessor
 Linking object code generated in step 3
  with other object code


Lesson 1.7
                 Summary
Learned about:
 Computer  history
 Basic computer architecture
 How bits are stored
 Differences between programming languages
 Software engineering
 C++ language background
 Using IDE to create executable programs


Chapter 1