Chapter 1 Getting Acquainted With Computers, Programs, and C - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 1 Getting Acquainted With Computers, Programs, and C

Description:

Chapter 1. Primary Memory. Primary memory often is called main working memory. ... Chapter 1. Output. Output is what comes ... Chapter 1. High-Level Language ... – PowerPoint PPT presentation

Number of Views:40
Avg rating:3.0/5.0
Slides: 25
Provided by: andrewst3
Category:

less

Transcript and Presenter's Notes

Title: Chapter 1 Getting Acquainted With Computers, Programs, and C


1
Chapter 1Getting Acquainted With Computers,
Programs, and C
2
Chapter 1
  • A Typical PC

3
Chapter 1
  • The Hardware

4
Chapter 1
  • The Central Processing Unit (CPU)The central
    processing unit (CPU) is the brain and nerve
    center of the entire system. This is where all of
    the calculations and decisions are made. In a PC
    system, the entire CPU is contained within a
    single integrated circuit (IC) chip called a
    microprocessor.

5
Chapter 1
6
Chapter 1
  • Typical Operations Performed by the
    ALU Addition
  • Subtraction ?
  • Multiplication
  • Division /
  • Modulus (Remainder)
  • Equal to
  • Not equal to !
  • Less than lt
  • Less than or equal to lt
  • Greater than gt
  • Greater than or equal to gt

7
Chapter 1
  • Primary MemoryPrimary memory often is called
    main working memory. The reason for this is that
    primary, or main, memory is used to store
    programs and data while they are being worked,
    or executed, by the CPU.

8
Chapter 1
  • Binary Values bit 0 or 1
  • byte 8 bits
  • kilobyte(KB) 1024 bytes
  • megabyte(MB) 1,048,576 bytes
  • gigabyte(GB) 1,073,741,824 bytes

9
Chapter 1
10
Chapter 1
  • Secondary MemorySecondary memory, sometimes
    called bulk or mass storage, is used to hold
    programs and data on a semi-permanent basis. The
    most common types of secondary memory used in PC
    systems are magnetic disks and CDs.

11
Chapter 1
  • InputInput is what goes into the system. Input
    devices are hardware devices that provide a means
    of entering programs and data into the system.
    The major input devices for a PC system are the
    keyboard, mouse, and disk drive.

12
Chapter 1
  • OutputOutput is what comes out of the system.
    Output devices are hardware devices that provide
    a means of getting data out of the system. The
    four major output devices with which you will be
    concerned are the display monitor, printer, disk
    drive, and modem.

13
Chapter 1
  • Loading and Saving Your C Programs

14
Chapter 1
  • The Fetch/Execute CycleThe fetch/execute cycle
    is what takes place when you run a program.

15
Chapter 1
  • The SoftwareComputer software can be likened to
    the driver of an automobile. Without the driver,
    nothing happens. In other words, the computer
    hardware by itself can do nothing. A set of
    software instructions that tells the computer
    what to do is called a computer program.

16
Chapter 1
  • Machine LanguageAll of the hardware components
    in a computer system, including the CPU, operate
    on a language made up of binary 1s and 0s. A
    CPU does not understand any other language.

17
Chapter 1
  • Assembly LanguageAssembly language employs
    alphabetic abbreviations called mnemonics that
    are easily remembered by you, the programmer. For
    instance, the mnemonic for addition is ADD, the
    mnemonic for move is MOV, and so forth.

18
Chapter 1
  • Operating SystemsAn operating system, or OS, is
    the glue that binds the hardware to the
    application software. Actually, an operating
    system is a collection of software programs
    dedicated to managing the resources of the
    system.

19
Chapter 1
  • High-Level LanguageA high-level language
    consists of instructions, or statements, that are
    similar to English and common mathematical
    notation. When programming in a high-level
    language, you do not have to concern yourself
    with the specific instruction set of the CPU.
    Rather, you can concentrate on solving the
    problem at hand.

20
Chapter 1
  • Language TranslationA source program is the one
    that you write in the C language and that
    normally has a file extension of .cpp. An object
    program is the binary machine language program
    generated by the C compiler, which always has a
    file extension of .obj.

21
Chapter 1
  • C Translation

22
Chapter 1
  • Structured vs. Object-Oriented LanguagesThe C
    language is a structured language that allows
    complex problems to be solved using a modular,
    top/down, approach. The C language contains the
    C language for structured programming, but in
    addition extends the C language to provide for
    object-oriented programming (OOP).

23
Chapter 1
  • Object-oriented programming (OOP) allows complex
    problems to be solved using more natural objects
    that model the way we humans think about things.

24
Chapter 1
  • Hello World /
  • NAME ANDREW C. STAUGAARD JR.
  • CLASS CS1
  • PROGRAM TITLE HELLO WORLD
  • DATE 5/16/01
  • THIS PROGRAM WILL DISPLAY THE MESSAGE "Hello
    World" TO THE SYSTEM MONITOR
  • /
  • //PREPROCESSOR SECTION
  • include ltiostream.hgt //FOR cout
  • //MAIN FUNCTION SECTION
  • int main()
  • //BEGIN MAIN FUNCTION BLOCK
  • cout ltlt "Hello World" //DISPLAY MESSAGE TO
    MONITOR
  • return 0
  • //END MAIN FUNCTION BLOCK
Write a Comment
User Comments (0)
About PowerShow.com