Understanding Computer Programs: File Structure, Interaction, and Programming, Slides of Information and Computer Technology

An introduction to computer programs, explaining what they are, the different types, and how they are stored in various files. It also covers hardware/software interaction, writing code, and the use of machine code and programming languages. Additionally, it discusses the importance of planning a computer program and the role of compilers and interpreters.

Typology: Slides

2011/2012

Uploaded on 07/30/2012

pariyat
pariyat 🇮🇳

3.9

(7)

97 documents

1 / 46

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Chapter 12A
Creating Computer Programs
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e

Partial preview of the text

Download Understanding Computer Programs: File Structure, Interaction, and Programming and more Slides Information and Computer Technology in PDF only on Docsity!

Chapter 12A

Creating Computer Programs

What Is a Computer Program?

  • Computer programs
    • Also called software
    • Are a list of instructions
    • Instructions are called code
    • CPU performs the instructions
    • Three types
      • Operating system
      • Utility
      • Application 13A-

Software Is Stored In Many Files

  • Dynamic link libraries
    • Partial executable file
    • Used to support executable files
    • Have .dll extensions 13A-

Software Is Stored In Many Files

  • Initialization files
    • Contain configuration settings for software
    • Have a .ini extension
    • Modern programs use the registry 13A-

Software Is Stored In Many Files

  • Batch files
    • Used to automate tasks
    • Hold a series of OS commands
    • Have a .bat extension 13A-

Hardware/Software Interaction

  • Program execution
    • Software executes at the CPU level
    • Code to play a sound
      • Code generates an interrupt
      • CPU tells the sound card to play
      • Sound card plays the file
    • Programmer creates the code 13A-

Writing Code

13A-

Hardware/Software Interaction

  • Machine code
    • Recall that computers think in binary
    • Code is translated into machine code
      • CPU executes the machine code
    • CPUs have a unique machine code 13A-

Hardware/Software Interaction

  • Compilers and interpreters
    • Converts source code into binary
      • Allows code to execute
    • Checks source code for correctness 13A-

Hardware/Software Interaction

  • Compiler
    • Creates an executable file
      • Contents are called object code
    • Executable can run on its own
    • Each language has its own compiler
    • C++ and Java are compiled languages 13A-

Planning a Computer Program

  • Plans
    • The steps to solve a problem
    • Describe the expected results
    • Programming without a plan is difficult 13A-

Planning Tools

  • Pseudo code
    • Natural language statements that resemble code
    • Describes what must be done
    • Can be written by non programmers
    • Programmers develop unique versions 13A-

IPO Chart

13A-

How Programs Solve Problems

  • Program control flow
    • Order program statements are executed
    • Typically executed in order
    • Constructs can change the flow
      • Decision statements
      • Loops 13A-