CSc 1253 section 3 - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

CSc 1253 section 3

Description:

Fun stuff - Games, Photos, etc. 4. Introduction to Computers. Computer System ... news.thomasnet.com/ fullstory/454230/264. Physical Components. Input Devices ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 42
Provided by: core96
Category:
Tags: csc | section

less

Transcript and Presenter's Notes

Title: CSc 1253 section 3


1
CSc 1253 section 3
  • Computer Science I with
  • INSTRUCTOR Dr. Douglas
  • www.austinlinks.com/ CPlusPlus/

2
First Day- CSC 1253
  • Welcome
  • Syllabus
  • Introduction to Computers Background before the
    Programming!
  • include ltiostreamgt
  • main()
  • cout ltlt "Hello World!"
  • return 0

3
Introduction to Computers
  • the Internet and the WWW
  • Email
  • Network/networking/networked Connected
    computers
  • Operating Systems Microsoft, Unix
  • Software - Word, PowerPoint, Excel, etc.
  • Fun stuff - Games, Photos, etc.

4
Introduction to Computers
  • Computer System Hardware
    Software news.thomasnet.com/
    fullstory/454230/264
  • Physical Components
  • Input Devices
  • Output Devices
  • Primary Memory
  • Auxiliary Storage
  • CPU

Software Collection of programs usually in
executable form. ProgramA finite sequence of
instructions that the computer follows to
perform a specific task or solve a problem.
5
Introduction to ComputersHardware
  • (1) Input Devices Receiving section of the
    computerAccepts data(?) from the outside
    worldStores data to memory
  • Ex. keyboard, mouse, camera, microphone
  • www.primidi.com/ 2004/11/29.html

6
Introduction to ComputersHardware
  • (2) Output DevicesShipping section of the
    computerTakes info from memory and places
    that info on various output devices.Allows
    people to view/hear the results of
    processing. Printer (hard
    copy) Monitor
  • (soft copy)
  • Speaker

7
Introduction to ComputersHardware
  • (3) Memory or RAM (Primary Memory)Provides rapid
    access fast retrieval
  • of data (could be software instructions)Random
    ly Accessible Memory

www.computermemoryupgrade.net/ computer-memory...
? Memory components Plug into slots
? Connected to the
Systemboard (Motherboard)
8
Introduction to ComputersHardware
  • (3) Memory continued www.fotosearch.com/
    ART158/tot008/ Temporary storage of data
    Volatile will lose it if not saved!Purpose
  • 1. Holds info received from an input device.
    (Data is waiting to be processed.)
  • 2. Holds software for execution.
  • 3. Holds intermediate results from processing.
  • 4. Holds data for output.
  • The von Newmann Architecture

9
Introduction to ComputersHardware
  • (3) Memory continuedMemory is divided into
    storage locations called memory
    cells.Associated with each memory location are
    1. Address - position of a cell in memory
  • 2. Contents - info stored
  • www.jegsworks.com/Lessons/ lesson4/lesson4-5.htm

10
Introduction to ComputersHardware
  • (3) Memory continued
    www.kbcc.cuny.edu/
    propre/math/Math_13/
  • Everything is manipulated as 0s and 1s
  • stored using two-state devices switches,
    transistors, vacuum tubes.
  • On/Off states easily compare to the binary
    numbering system, Base 2.
  • On 1, Off 0 Binary Digit Bit

11
Introduction to ComputersHardware
Data stored in 1 byte
  • (3) Memory continuedBits are grouped into
    bytes ( 8 bits 1 byte)Each Memory Cell is
    1 byte Bytes are grouped into words (length
    is dependent on the machine)
  • The computer handles data in multiples
  • of bit chunks (bytes)
  • Jpeg www.geog.ucsb.edu/kclarke/
    G128/Lecture05.html

12
Introduction to ComputersHardware
  • (3) Memory continued
  • How data
  • is stored
  • Numbering
  • Systems
  • claymore.engineer.gvsu.edu/.../ html/plcs.html

13
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored Integers
  • Convert Any Base to Base 10
  • --- EXPAND ---
  • Using
  • Exponential Notation

1110012 _?_10 1 25 32 1 24
16 1 23 8 0 22 0 0 21 0 1 2
0 1 -------
5710
14
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored Integers
  • Convert Any Base to Base 10
  • --- EXPAND ---

FB416 _?_10 F 15, 15 162 3840 B
11, 11 161 176 4 4, 4 160
4 -------
402010
15
Introduction to ComputersHardware
  • (3) Memory continued How data is stored
    Integers
  • Convert Base 10 to Any Base
  • ---- DIVIDE BY THE BASE ----
  • Example 5710 _?_2
  • 57/2 28 r 1 ? 1
  • 28/2 14 r 0 ? 0114/2
    7 r 0 ? 001
  • 7/2 3 r 1 ? 1001
  • 3/2 1 r 1 ? 11001
  • 1/2 0 r 1 ? 1110012

16
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored Integers
  • Convert Base 10 to Any Base
  • ---- DIVIDE BY THE BASE ----
  • Example 5710 _?_8
  • 57/8 7 r 1 ? 1
  • 7/8 0 r 7 ? 718

17
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored Integers
  • Convert Base 10 to Any Base
  • ---- DIVIDE BY THE BASE ----
  • Example 6010 _?_16
  • 60/16 3 r 12 1210 C16 ? C
  • 3/16 0 r 3 3 316 ? 3C16

18
Introduction to ComputersHardware
  • 3) Memory continued How data is stored
  • Base 2 to Base 8 Base 16 Neat Trick!

Base 2 to Base 8 1001101112
4 6 7 4678
Base 2 to Base 16 1110110112
1 D B 1DB16
19
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored Real
  • Cannot represent exactly!
  • 0.7 0.10110011001100112
  • and that leads to Roundoff or Truncation
    http//wofford.info/ecs/ScientificProgramming/Erro
    r/images/Sec3Pic2.gif

20
Introduction to ComputersHardware
  • (3) Memory continued
  • How data is stored characters
  • (a, b, c, d, e, , A, B, C,, 1, 2, 3, !, _at_,
    , )
  • Cannot be stored directly as a character. Remembe
    r 0s and 1s only.
  • A code system is used ASCII, EPCDIC, UNICODE
  • Each character is assigned a
  • unique numeric value A ? 6510, y ? 12110

21
Introduction to ComputersHardware
  • Where are we?
  • Physical Components
  • Input Devices
  • Output Devices
  • Primary Memory
  • Auxiliary Storage
  • CPU

22
Introduction to ComputersHardware
  • (4) Auxiliary Storage
  • http//www.infopackets.com/graphics/harddriveex
    posed2.gif, http//www.spygadgets.com/images/CD2
    0drive202.jpg, http//www.sthcross-c.schools.nsw.
    edu.au/students/assets2/memory20stick.jpg,/www.nu
    ggetlab.com/comptia_files/equipment/multimedia_Iom
    ega20Zip20Drive.jpg
  • Stores data for permanent(?) keeping.Slower
    access for retrieval and storage than for
    primary memory. unlimited quantity -- Virtual
    Memory

23
Introduction to ComputersHardware
  • (5) Central Processing Unit CPUThe Brain,
    the microprocessor, the chip
  • Controls the fetch/execute cycle fetch
    instruction, decode the instruction, executes
    the instruction.
  • Contains Registers for storage
  • inside the CPU fasssst access
  • http//www.gamepc.com/images/labs/rev-tigermpx-768
    LG.jpg www.cs.sun.ac.za/ museum/gen4.html,

24
Introduction to ComputersHardware
  • (5) Central Processing Unit CPU continued
  • Contains the Arithmetic Logic Unit (ALU)
  • performs
  • calculations, comparisons
  • or makes decisions.
  • http//www.cse.dmu.ac.uk/bb/Teaching/ComputerSyst
    ems/WorkStations/CPU.gif

Registers
25
Introduction to Computers
  • Computer System Hardware
    Software
  • Physical Components
  • Input Devices
  • Output Devices
  • Primary Memory
  • Auxiliary Storage
  • CPU

Software Collection of programs usually in
executable form. ProgramA finite sequence of
instructions that the computer follows to
perform a specific task or solve a problem.
26
Introduction to ComputersSoftware
  • 2 Types of Software (executable program(s) )1.
    Application Software software that performs
    tasks
    for a computer user. Two types General-Purpos
    e Software purchased from a software
    developer ex. Excel, Word, Oracle
  • Application-Specific Software Used only for
    its intended purpose and http//images.goog
    le.com/images?hlenlrqturbotax perhaps for
    a single user.
  • www.ccatech.com/ ccatech/reviews/

27
Introduction to ComputersSoftware
  • Types of Software (executable program(s) )
    continued
  • 2. Systems Software software that performs
    tasks required for operations of the computer
    system.
  • Three Types
  • Operating System provides services such as
    a user interface,
  • file and database access, provides
    communication interfaces, manages programs in
    execution, directs low-level control of
    devices.
  • System Support Software provides system
    utilities Ex. sort programs, disk format
    programs, provides operating
    statistics.
  • System Development Software Convert
    programs into machine language form for
    execution.
  •  

28
Introduction to ComputersSoftware
  • Programming Language
  • A formal definition of a language that consists
    of both1. Syntax rules to determine how the
    symbols of the language
  • may be combined.2. Semantics the meaning of
    the constructs.

29
Introduction to ComputersSoftware
3 Types of Programming Languages
  • Machine Language
  •     Coded in 0s or 1s only Bit patterns
    represent command codes such as
  • 0100 0000 0000 0101
  • 1000 0000 0000 0110
  • Machine dependent (platform dependent) because
    the patterns of the 0s and 1s have meaning
    only for a particular machine or type of
    computer.
  • Programming is difficult and tedious
  • May be printed in hexadecimal (Hex) or octal
    to be easily read.

30
Introduction to ComputersSoftware
3 Types of Programming Languages continued
  • Symbolic Language (Assembly Languages )
  •   English-like abbreviations are substituted for
    the machine language.
  • Load A
  • Add B
  •    Requires a translator to convert to
    machine language (ML).

31
Introduction to ComputersSoftware
3 Types of Programming Languages continued
  • High Level LanguageMay combine many of the ML
    steps into one.Some memory details hidden.
    Descriptive names for memory use.Uses common
    English and math notations.Language is
    portable.Requires a compiler to convert to
    MLEx. FORTRAN, C, PASCAL, COBOL, JAVA

32
Introduction to ComputersSoftware
  • Compiler
  • software which translates a program written
    in a higher-level language (source program)
  • into a program written in
  • machine language (object program).

33
Introduction to ComputersSoftware
  • How Instructions are Stored in Memory
  • End Hardware and Software Overview

0100 0000 0000 0101 1000 0000 0000 0110 1001 0000
0000 1000 0100 0100 0000 0100
LOAD A ADD B MULT C STORE X
X (A B) C
High Level Language
Machine Language
Assembly Language
Translator
Compiler
34
Introduction to ComputersTerms
  • Networking - Time Sharing EnvironmentIn the old
    days, a large computer called a mainframe was
    connected to dumb terminals. The mainframe
    possessed all the computing capabilities.
    Terminals were used like typewriters.

  • www.microsoft.com/.../ unix/usecdirw/01wsdsu.mspx

The Central Computer
35
Introduction to ComputersTerms
  • Networking - Client/Server Environment
    Work is shared (or removed) between the
    central computer and the workstation. The central
    computer is called a server.

36
Introduction to ComputersTerms
  • MSC
  • Multiprogramming several programs are in memory
    at one time. Allows
  • computer resources to be used more efficiently.
    Programs may be halted
  • while resources are accessed and other programs
    in memory may then execute.
  • Multiprocessors computers that have more than
    one CPU. Allows more than
  • one program to execute simultaneously.
  • Execution CPU executes program instructions
    on input data to generate
  • program output.
  • File data or code or whatever stored for
    access using a name.
  • Ex. a data file for input Employee.dat
    (not executable)
  • Ex. a report file that is the result of
    processing Report.out (not executable)
  • Ex. an assembler for translating to machine
    code tasm.exe (executable)
  • Ex. my granddaughters picture - birthdaypic.jpg
    (not executable)
  • Ex. a program ready to be compiled
    prog1.c (not executable)
  • End Terms

37
Introduction to ComputersCreating Software for
Execution
  • Step 1 Write and edit the program by creating a
    file using an ASCII text editor.A text
    editor is an executable program (software)!
  • Text editors store character data only and a
    very few control characters like new line
    control.
  • Ex. pico, or notepad
  • This is called the source file.

38
Introduction to ComputersCreating Software for
Execution
  • Step 2 Compilation. Convert source file to
    another file into low level format (the object
    code) necessary for execution. The object code
    file is created using a Compiler.
  • Step 3 Linking. Combine other object code with
    my object code. The linker program combines or
    links the separate files together to create a
    single executable file in ML form!

39
Introduction to ComputersCreating Software for
Execution
  • Step 4 Load ML file into memoryThe loader is
    system OS software that loads the program to be
    executed into primary memory.
  • Step 5 Execution. Operating System gives the go-
    ahead and off we go. Program is now running.

40
Introduction to ComputersCreating Software for
Execution
  • Work Review
  • Step 1 Write and Edit
  • Step 2 Compilation
  • Step 3 Linking
  • Step 4 Load into Memory
  • Step 5 Execution
  • All files ?

41
Introduction to Computers
  • The End
  • Next, the Software Development Method
Write a Comment
User Comments (0)
About PowerShow.com