Chapter 1 introduction to computer and programming


Published on


Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Chapter 1 introduction to computer and programming

  1. 1. In this chapter you will learn:  Basic computer concepts  Computer Software and hardware  Computer classification  The different types of programming languages
  2. 2. What is a computer?  Electronic device that operates under the control of instructions stored in memory units  Computer systems divided into two; hardware and software  Hardware: physical components of computer system  Software refers to a program or set of instructions that instructs a computer to perform some task.
  3. 3.  Software can be divided into two major categories called system software and application software.  Systems software includes operating systems and various device drivers.  Application software are used to perform real-world tasks and solve specific problems.  A program is simply a set of instructions that tells a computer how to perform a particular task.  Programs are developed using programming languages.  A programming language provides a set of rules to develop a program. A person who writes a program using a programming language is called a programmer.
  4. 4. Computer Organization  Input Unit  Output Unit  Memory Unit  Arithmetic and Logic Unit  Central Processing Unit  Secondary Storage Unit
  5. 5. Input and Output Unit  The most common types of I/O in PCs are:  Monitor - The monitor is the primary device for displaying information from the computer.  Keyboard - The keyboard is the primary device for entering information into the computer.  Mouse - The mouse is the primary device for navigating and interacting with the computer
  6. 6. Memory Unit  Memory - This is very fast storage used to hold data. It has to be fast because it connects directly to the microprocessor. There are several specific types of memory in a computer:  Random-access memory (RAM) - Used to temporarily store information that the computer is currently working with  Read-only memory (ROM) - A permanent type of memory storage used by the computer for important data that does not change  Basic input/output system (BIOS) - A type of ROM that is used by the computer to establish basic communication when the computer is first turned on  Caching - The storing of frequently used data in extremely fast RAM that connects directly to the CPU  Virtual memory - Space on a hard disk used to temporarily store data and swap it in and out of RAM as needed
  7. 7. ALU  The arithmetic logic unit (ALU) is a digital circuit that calculates an arithmetic operation (like an addition, subtraction, etc.) and logic operations (like an Exclusive Or) between two numbers  ALU is a fundamental building block of the central processing unit of a computer.
  8. 8. Central Processing Unit  A microprocessor -- also known as a CPU or central processing unit -- is a complete computation engine that is fabricated on a single chip.
  9. 9. Secondary Storage  Removable storage - Removable storage devices allow you to add new information to your computer very easily, as well as save information that you want to carry to a different location. › Floppy disk - The most common form of removable storage, floppy disks are extremely inexpensive and easy to save information to. › CD-ROM - CD-ROM (compact disc, read-only memory) is a popular form of distribution of commercial software. Many systems now offer CD-R (recordable) and CD-RW (rewritable), which can also record.
  10. 10. › Flash memory - Based on a type of ROM called electrically erasable programmable read-only memory (EEPROM), Flash memory provides fast, permanent storage. CompactFlash, SmartMedia and PCMCIA cards are all types of Flash memory. › DVD-ROM - DVD-ROM (digital versatile disc, read-only memory) is similar to CD-ROM but is capable of holding much more information.
  11. 11. Early Operating Systems  Batch processing › Do only one job or task at a time  Operating systems › Manage transitions between jobs › Increased throughput  Amount of work computers process  Multitasking › Computer resources are shared by many jobs or tasks  Timesharing › Computer runs a small portion of one user’s job then moves on to service the next use
  12. 12. Personal Computing, Distributed Computing, and Client/Server Computing  Personal computers › Economical enough for individual  Distributed computing › Computing distributed over networks  Client/server computing › Sharing of information across computer networks between file servers and clients (personal computers)
  13. 13. Programming Languages  Machine Language  Assembly Language  High-Level Languages
  14. 14. 1. Machine languages  Strings of numbers giving machine specific instructions 2. Assembly languages  English-like abbreviations representing elementary computer operations (translated via assemblers)  Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY
  15. 15. 3. High-level languages  Codes similar to everyday English  Use mathematical notations (translated via compilers)  Example: grossPay = basePay + overTimePay
  16. 16. Fortran, COBOL, Pascal and Ada  Fortran › developed by IBM Corporation in the 1950s › used for scientific and engineering applications that require complex mathematical computations  COBOL › developed in 1959 by computer manufacturers, the government and industrial computer users › used for commercial applications that require precise and efficient manipulation of large amounts of data
  17. 17.  Pascal › Developed by Professor Niklaus Wirth in 1971 › Designed for teaching structured programming  Ada › Developed under the sponsorship of the U.S. Department of Defense (DOD) during the 1970s and early 1980s › Able to perform multitasking
  18. 18.  Flowchart › Graphical representation of an algorithm › Drawn using certain special-purpose symbols connected by arrows called flow lines › Rectangle symbol (action symbol):  Indicates any type of action › Oval symbol:  Indicates the beginning or end of a program or a section of code
  19. 19. Flow chart components Start/End Process Input/Output Condition Statement Flow Lines Connector
  20. 20. Pseudo code › Artificial, informal language that helps us develop algorithms › Similar to everyday English › Not actually executed on computers › Helps us “think out” a program before writing it  Easy to convert into a corresponding C++ program  Consists only of executable statements
  21. 21.  /* This is a comment */  /* Name : Lab2.c */  /* Purpose : Prints C Program Example */  /* Author : Diana Kassim */  #include <stdio.h>  int main(void)   {  printf("This is my first programming !!!");  return 0;   } 
  22. 22. Three Types › Syntax Errors  Errors in code construction › Runtime Errors  Detect operations impossible to carry out › Logic Errors  Program does not perform the way it intended it to
  23. 23. Marks > 85 Enter Marks Start Display “GAGAL” Display “LULUS” End
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.