Program

  • Why? -> Prepare & run program to solve problems
  •  Sequence of instructions
  • Each instruction specifies an operation to be performed. 
  • Eg:
Add A, B
Operation Operands 
  • Computer interprets each instruction & executes specified operations

Basic Computer Structure

ALU

  • Electronic circuits 
  • Performs Arithmetic (+,_, x, /) and logical (compare, <<, rotate, &&, ||) 

Control Unit (CU) 

  • Analyses each instruction in program
  • Sends relevant control signals to all other units

Internal communication in computer:

Program = Instructions + Data

Program ->i/o-> computer ->memory

  • Program – fed to computer through I/P unit
  • Stored in Memory
  • Executes instruction fetch from memory by Control unit
  • Control unit decodes instruction & issues signal to other units 
  • Result is stored in memory or temply in CU/ALU for use in next instruction 
  • Results taken out through O/P unit

CPU= CU + ALU

Hardware & Software: 

Binary System 

Digital Computer ->binary system ( data & inst converted to 0’s & 1’s -> machine language) 

Machine Language

  • All computer work in machine language
  •  Difficult for human to understand requires training & intelligence 
  •  To remove this -> Special Program -> Compiler

Compiler

  • It’s a software 
  • Accepts program in high level language & translate into machine language 

Hardware -> CPU, Memory, Input/ Output

Software -> Gives life to hardware i.e. h/w works as dictated by software

OS

  • manages h/w & s/w
  • interface between the user and hardware

Instruction Cycle

  • Sequence involved for fetch of one instruction & its execution 
  • Instruction are fetched & executed by Control Unit (CU)

Input Output Units

Input Units:

Keyboard, floppy disk, hard disk, magnetic tape, mouse, light pen, scanner, optical disk, etc. 

Output Units:

Display terminal, printer, plotter, floppy disk drive, hard disk drive, magnetic tape drive, optical disk 

Disk drive & tape drives are storage devices (for prog   & data). Known as secondary memory.