Total Pageviews

Tuesday, February 15, 2011

Computer program

A computer program (also a software program, or just a program) is a sequence of instructions written to perform a specified task for a computer.[1] A computer requires programs to function, typically executing the program's instructions in a central processor.[2] The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled), enables a programmer to study and develop its algorithms.
Computer source code is often written by computer programmers. Source code is written in a programming language that usually follows one of two main paradigms: imperative or declarative programming. Source code may be converted into an executable file (sometimes called an executable program or a binary) by a compiler and later executed by a central processing unit. Alternatively, computer programs may be executed with the aid of an interpreter, or may be embedded directly into hardware.
Computer programs may be categorized along functional lines: system software and application software. Two or more computer programs may run simultaneously on one computer, a process known as multitasking

Any hardware device that sends data to the computer, without any input devices, a computer would only be a display device and not allow users to interact with it, much like a TV. To the right is a Logitech trackball mouse, an example of an input device. Below is a full listing of all the different computer input devices found on a computer.

Output device

An output device is any piece of computer hardware equipment used to communicate the results of data processing carried out by an information processing system (such as a computer) to the outside world.
In computing, input/output, or I/O, refers to the communication between an information processing system (such as a computer), and the outside world. Inputs are the signals or data sent to the system, and outputs are the signals or data sent by the system to the outside.
Examples of output devices:
 

THE COMPONENTS OF SYSTEM UNIT


The System Unit
·          Box-like case that contains computer’s electronic components
·          Sometimes called the chassis
What are common components inside the system unit?
·          Processor
·          Memory module
·          Expansion cards
o   Sound card
o   Modem card
o   Video card
o   Network interface card
·          Ports and Connectors
What is the motherboard?
·          Main circuit board in system unit
·          Contains chips, integrated circuits, and transistors
·          Also called system board
What chip packages are available?
·          single edge contact (SEC) cartridge
·          dual inline package (DIP)
·          flip chip-PGA  (FC-PGA) package
·          pin grid array (PGA
Central Processing Unit
What is the central processing unit (CPU) ?
·          Interprets and carries out basic instructions that operate a computer
·          Also called the processor
What are the components of the CPU?
·          Control Unit
·          Arithmetic/Logic Unit (ALU)
What is the control unit?
·          Directs and coordinates operations in computer
·          Control unit repeats four basic operations:
  • Fetch - obtain program instruction or data item from memory
  • Decode - translate instruction into commands
  • Execute - carry out command
  • Store - write result to memory
What is a machine cycle?
·          Four operations of the CPU comprise a machine cycle
·          Also called instruction cycle
  • Instruction time (i-time) - time taken to fetch and decode
  • Execution time (e-time) - time taken to execute and store
An example of a machine cycle
·          Student enters math problem (100 x 52) into computer’s memory
·          Result in memory displays on monitor’s screen
How is the CPU’s speed measured?
·          According to how many millions of instructions per second (MIPS) it can process
What are two designs used for the CPU?
·          CISC (complex instruction set computing)
o   Supports large number of instructions
o   CPU executes complex instructions more quickly
·          RISC (reduced instruction set computing)
o   Supports smaller number of instructions
o   CPU executes simple instructions more quickly
What is the arithmetic/logic unit (ALU) ?
·          CPU component that performs execution part of the machine cycle
o   Arithmetic  (addition, subtraction, multiplication, and division)
o   Comparison (greater than, equal to, or less than)
o   Logical  (AND, OR, NOT)
What is pipelining?
·          CPU begins executing second instruction before completing first instruction
·          Results in faster processing
What is a register?
·          Temporary storage area that holds data and instructions
o   Stores location from where instruction was fetched
o   Stores instruction while it is being decoded
o   Stores data while ALU processes it
o   Stores results of calculation
What is the system clock?
·          Synchronizes all computer operations
·          Each tick is clock cycle
·          MHz megahertz (millions)
·          GHz gigahertz (billions)
What is a microprocessor?
·          Single processor chip found in personal computers
How do personal computer processors compare?
·          Intel - PC
·          AMD - PC
·          Motorola - Mac
What is a coprocessor?
·          Chip that assists processor in performing specific tasks
·          One type is a floating-point coprocessor, also known as a math or numeric  coprocessor
What is parallel processing?
·          Using multiple processors simultaneously to execute program faster
·          Requires special software to divide problem and bring results together
Data Representation
How do computers represent data?
·          Most computers are digital
·          Recognize only two discrete states: on or off
What is the binary system?
·          Number system with two unique digits: 0 and 1
What is a byte?
·          Eight bits grouped together
·          256 characters
What are three popular coding systems to represent data?
·          ASCII - American Standard Code for Information Interchange
·          EBCDIC - Extended Binary Coded Decimal Interchange Code
·          Unicode - coding scheme capable of representing all world’s languages
How is a character sent from keyboard to computer?
·          Step 1: Press letter T
·          Step 2: Electronic signal for letter T sent to system unit
·          Step 3: Signal changed to its ASCII code (01010100) and stored in memory
·          Step 4: After processing, binary code for letter T is converted to image on output device
Memory
What is memory?
·          Temporary storage area for operating system, application programs, and data
·          Consists of one or more chips on motherboard
·          Each byte stored in unique address
How is memory measured?
·          By number of bytes available
o   KB
o   MB
o   GB
o   TB
What are two types of system unit memory?
·          volatile memory
o   Loses its contents when computer's power
is turned off
·          nonvolatile memory
o   Does NOT lose its contents when computer’s power is turned off
What is random access memory (RAM)?
·          Memory chips that can be read from and written to by processor
·          Most RAM is volatile
·          The more RAM a computer has, the faster it operates
What are two basic types of RAM chips?
·          Dynamic RAM (DRAM)
o    Most common type
o    Also called main memory
·          Static RAM (SRAM)
o     Used for special applications such as cache
o    Faster and more reliable than DRAM chips
How much RAM is needed?
·          Software package usually indicates RAM requirements
How much RAM is needed?
·          Depends on type of applications you intend to run on your computer
What is cache
·          Helps speed computer processes by storing frequently used instructions and data
·          Also called memory cache, cache store, or RAM cache
·          L1 cache built in processor
·          L2 and L3 cache not built in processor
·          L2 advanced transfer cache most common
What is read-only memory (ROM)?
·          Memory chips that contain data, instructions, or information that is recorded permanently
·          Data can only be read; cannot be modified in ROM
·          ROM is nonvolatile — Contents not lost when computer is turned off
o   BIOS  (basic input/output system)
o   Stored on ROM
·          Sequence of instructions computer follows to load operating system and other files when you turn on the computer
Types of ROM
·          Firmware
·          ROM chips manufactured with permanently written data, instructions, or information
·          PROM (programmable read-only memory)
o   Blank ROM on which you can place items permanently
·          EEPROM (electrically erasable programmable read-only memory)
o   Type of PROM containing microcode programmer can erase
What is flash memory?
·          Nonvolatile memory that can be erased electronically and reprogrammed
·          Used with handheld computers and digital cameras, cellular phones, and automobile
What is CMOS?
·          Complementary metal-oxide semiconductor memory
·          Stores information about the computer
o   type of disk drives
o   keyboard
o   monitor
o   current time and date
·          Uses battery to retain information when computer is turned off
What is memory access time?
·          Speed at which processor can access data from memory directly
·          Measured in nanoseconds (ns), which is one billionth of a second
·          It takes 1/10 of a second to blink your eye; a computer can perform up to 10 million operations in same amount of time
Expansion Slots and Expansion Cards
What is an expansion slot?
·          An opening, or socket, where circuit board is inserted into motherboard
·          Expansion card inserted in expansion slot
How are expansion cards used?
What is Plug and Play?
·          Computer automatically can configure cards and other devices as you install them
What is a PC card?
·          Credit card-sized device used to add capabilities to notebook computers
·          PCMCIA - Personal Computer Memory Card International Association
·          Uses include modem, additional memory, and storage
o   Memory – Type I
o   Modem – Type II
o   Hard Drive – Type III
What is a flash memory card?
·          Adds memory to handheld computers, digital music players,  cellular telephones,
and similar devices
Ports
What is a port?
·          Connects external devices to system unit
o   keyboard port
o   USB port
o   serial port
o   monitor port
o   game port
o   network port
o   mouse port
o   parallel port
o   speaker port
o   microphone port
What are different types of connectors?
What is a serial port?
·          Transmits one bit of data at a time
·          Used to connect slow-speed devices, such as mouse, keyboard, mode
What is a parallel port?
·          Connects devices that can transfer more than one bit at a time, such as a printer
What is a universal serial bus port (USB) ?
·          Connector that supports newer peripherals and plug and play
·          Can connect 127 devices
·          Other popular ports include 1394, MIDI, SCSI, and IrDA
Buses
What is a bus?
·          Channel that allows devices inside computer to communicate with each other
·          On the motherboard
·          System bus connects processor and RAM
·          Bus width determines number of bits transmitted at one time
·          Word size determines number of bits processor can interpret
and execute at a given time
o   Usually same as bus width
What is an expansion bus?
·          Allows processor to communicate with peripherals
o   ISA – most common, slowest
o   Local Bus – high-speed, connects higher speed devices
o   AGP – designed by Intel to improve 3-D graphics
Bays
What is a bay?
·          Open area inside system unit used to install additional equipment
Power Supply
What is a power supply?
·          Converts alternating current (AC) to direct current (DC)
·          Some peripheral devices have AC adapter
Mobile Computers
What is a mobile computer?
·          Notebook, which weighs between 2.5 and 8 pounds, or handheld
What ports are on a notebook computer?
·          Keyboard/mouse port
·          IrDA port
·          Serial port
·          Parallel Port
·          Video port
·          USB port
How is data transferred from a handheld computer?
·          An IrDA port allows the handheld computer to communicate wirelessly with other computers or devices
·          Handheld computers also can rest in a cradle, so you can transfer data to your desktop computer
Putting It All Together
What are suggested processor, clock speed, and RAM requirements based on the needs of various types of users?
·          Pentium® 4 or Itanium™ or Athlon™ 1 GHz or higher
·          256 MB RAM