WHAT'S NEW?
Loading...

Overview of computers and programming


This chapter will introduce about computer, and its component, and major category of programming languages. We will discuss how C programs are processed by computer, and also describe a systematic approach to solving programming problems called software developed method.

Computer Hardware

Althought there are so many variation at price, size, and capabilities, Modern computer are similar each other in the basic. Basically, almost all computer components are same, it is:
  • Main memory
  • Secondary memory(Harddisk, CD, DVD, and Flash drives.)
  • CPU(Central Processing Unit)
  • Input devices(Mouse, keyboard, touchpad, scanner, joystick)
  • Output devices(Monitor, printer, speaker)

Memory

Memory is an essential component in any computer. Look at the picture below:




Memory of a computer as an ordered sequence of storage locations called memory cells.

Main Memory

Main memory stores programs, data and results. Mot computers have two types of main memory. That is Random Access Memory(RAM) and Read Only Memory. RAM temporarily stores programs while they are being executed by the computer. it also temporarily stores such data as numbers, names, and even pictures while a program manipulating them. RAM is usually volatile memory, it means everything in RAM will lost when the computer is switched off.  ROM stores programs or data permanently. Computer can retrieve, but can't store information in ROM. ROM is not volatile Data stored there do not disappear when the computer is switched off.

Secondary  Storage Devices

Computer systems provide storage in addition to main memory for two reasons. First, computers need storage that is permanent or semi-permanent so that nformation can be retained during a power loss or when the computer is turned off. Second, systems typically store more information than will fit in memory. Secondary storage device are: CD, Flash drive, Harddisk.

Secondary storage devices

Central Processing Unit(CPU)

The CPU has two roles:
  • Coordinating all computer operations and performing arithmetic and logical operations on data.
  • Follow the instructions contained in a program to determine which operations should be carried out and in what order.
To process a program stored in main memory, the CPU retrieves each instruction in sequence (called fetching an instruction ),

Input/Output(I/O) Devices

(I/O) devices be used to communicate with the computer.

Input devices: 
  • Keyboard: This device has keys for letters, numbers, and punctuation marks plus some extra keys for performing special functions. When you press a letter or digit key on a keyboard, that character is sent
    to main memory and is also displayed on the monitor at the position of the cursor. Cursor is a moving place marker.
  • Mouse: is a handheld device used to select an operation. Moving the mouse around on your desktop moves the mouse cursor displayed on the monitor’s screen.
  • Printer: A device that make a hard copy of some information that displayed on the monitor.

Computer Software

Operating System

A set of computer programs that control the interaction of the user and the computer hardware is called the operating system (OS) . Usually part of the operating system is stored permanently in a read-only memory (ROM) chip so that it is available as soon as the computer is turned on. Loading the operating system into memory is called booting the computer.
Here is a list of some of the operating system’s many responsibilities:
  1. Communicating with the computer user: receiving commands and carrying them out or rejecting them with an error message.
  2. Managing allocation of memory, of processor time, and of other resources for various tasks.
  3. Collecting input from the keyboard, mouse, and other input devices, and providing this data to the currently running program.
  4. Conveying program output to the screen, printer, or other output device.
  5. Accessing data from secondary storage.
  6. Writing data to secondary storage.

Application Software

Application programs are developed to assist a computer user in accomplishing specific tasks.
Example:


  • Microsoft Word or OpenOffice.org , A word-processing application.
  • Microsoft Office Excel, help to create a document, a spreadsheet,.to automate tedious numerical calculations and to generate charts that depict data.
  • Microsoft Office Access or dBASE, a database management application assists in data storage and quick keyword-based access to large collections of records.
  •  
  •  
  •  
  • Computer Language
  • Software developers rarely write in the language directly understood by a computer, since this machine language is a collection of binary numbers. There are many high-level languages available. Table 1.4 lists some of the most widely used ones along with the origin of their names and the application areas that first popularized them. Although programmers find it far easier to express problem solutions in high-level languages, there remains the problem that computers do NOT understand these languages. Thus, before a high-level language program can be executed, it must first be translated into the target computer’s machine language. The program that does this translation is called a compiler

    Executing Program

    To execute a machine language program, the CPU must examine each program instruction in memory and send out the command signals required to carry out the instruction. Special program instructions are used for entering or scanning a program’s data (called input data ) into memory. After the input data have been processed, instructions for displaying or printing values in memory can be executed to display the program results. The lines displayed by a program are called the program output.




0 komentar:

Posting Komentar