Unit 1: Introduction to Computer



Introduction to Computer

A computer is an electronic machine that receives data (input), processes it using a set of instructions (programs), and produces meaningful information (output).
It works on the principles of:

  1. Input
  2. Processing
  3. Output
  4. Storage

A computer follows the IPO cycle and executes tasks at very high speed with accuracy.

Characteristics of Computers

  • Speed: Millions of operations per second.
  • Accuracy: Very low error rate.
  • Automation: Works automatically after instructions are given.
  • Storage: Can store vast amounts of data.
  • Versatility: Used in various fields (banking, education, defense, etc.).

Computer Hardware & Software

1. Computer Hardware

Hardware refers to the physical parts of a computer system that you can touch and see.

Examples: Keyboard, Mouse, Monitor, CPU, Hard Disk, RAM, Motherboard, Printer, etc.

Major Hardware Components

A. Input Devices

These allow the user to enter data into the system.

Common Input Devices

DeviceFunction
KeyboardEnters text and commands
MouseControls cursor, selects items
ScannerConverts physical documents into digital form
MicrophoneInputs audio/sound
WebcamInputs video/images
Barcode ReaderReads barcodes
Touch ScreenActs as both input and output

B. Output Devices

These devices display the processed information to the user.

Common Output Devices

DeviceDescription
Monitor (LED/LCD)Displays text, images, videos
PrinterProduces hard copies of documents
Speaker/HeadphonesProduces sound output
ProjectorDisplays output on large screens

C. Central Processing Unit (CPU)

CPU is the brain of the computer. It performs all calculations, processing, and decision-making.

CPU Components

  1. Arithmetic and Logic Unit (ALU) - Performs mathematical operations (add, subtract) and logical operations (AND, OR, NOT).
  2. Control Unit (CU) - Manages and controls all activities of the computer., Acts like a supervisor.
  3. Registers - High-speed small memory used for quick data access.

D. Memory

Memory stores data, instructions, and output temporarily or permanently.

1. Primary Memory (Main Memory)

Directly accessed by CPU. Fast but limited.

Types of Primary Memory:

  • RAM (Random Access Memory):
    Temporary memory; data erased when power goes off.
    Types: DRAM, SRAM.

  • ROM (Read Only Memory):
    Permanent memory; stores booting instructions.
    Types: PROM, EPROM, EEPROM.

2. Secondary Memory

Used for long-term storage. Large capacity but slower than primary memory.

Examples:

  • Hard Disk Drive (HDD)
  • Solid State Drive (SSD)
  • CD/DVD
  • Pen Drive
  • Memory Card
  • External HDD

Computer Software

Software is a set of programs, instructions, and procedures that tell the hardware how to operate.

Software cannot be touched physically; it provides functionality to the system.

Types of Software

A. System Software

Controls and manages computer hardware. Works as an interface between hardware and user.

Components of System Software:

  1. Operating System (OS)
    Examples: Windows, Linux, macOS, Android, iOS
    Functions:

    • Manages files

    • Manages memory

    • Manages hardware

    • Manages processes

  2. Device Drivers - Special programs that allow OS to communicate with hardware. Example: Printer driver, audio driver, graphics driver.

  3. Utility Software- Helps in maintenance and optimization.
    Examples:

    • Antivirus

    • Disk Cleanup

    • Backup tools

    • File compression (WinRAR)

B. Application Software

Programs created for the user to perform specific tasks.

Types:

  1. General Purpose

    • MS Office (Word, Excel, PowerPoint)

    • Web browsers (Chrome, Firefox)

    • Media players

  2. Special-Purpose Applications

    • Tally (Accounting)

    • AutoCAD (Designing)

    • SAP (ERP)

    • Hospital Management Software

  3. Web & Mobile Applications

    • Instagram

    • WhatsApp

    • Online banking apps

Summary Table for Quick Revision

CategoryDescriptionExamples
HardwarePhysical parts of computerKeyboard, CPU, Monitor
Input DevicesEnter data into computerMouse, Scanner
Output DevicesDisplay outputMonitor, Printer
CPUBrain of computerALU, CU, Registers
Primary MemoryFast, temporaryRAM, ROM
Secondary MemoryPermanent storageHDD, SSD
System SoftwareManages hardwareOS, Drivers
Application SoftwarePerforms user tasksMS Office, Tally

Best for MCA Notes (Extra Explanation)

  • Hardware = body of the computer
  • Software = mind of the computer
  • Without software, hardware is useless
  • Without hardware, software cannot run
  • Together, they make the computer functional

Computer Languages

A computer language is a system of communication used to write instructions that a computer can understand and execute.
Humans speak natural languages (English, Hindi), while computers understand binary (0s and 1s).

Computer languages act as a bridge between humans and computers.

Types of Computer Languages

A. Machine Language (Low-Level)

  • The lowest-level language.
  • Written in binary (0 and 1).
  • Directly understood by the CPU.
  • Very fast but difficult for humans.

Example:

10110100 00000011

B. Assembly Language

  • Uses mnemonic codes (short words) instead of binary.
  • Easier than machine language.
  • Requires an Assembler to convert to machine code.

Example:

MOV A, B ADD A, 05

C. High-Level Languages (HLL)

  • Human-readable languages like C, Java, Python.
  • Portable (can run on different machines).
  • Requires Compiler or Interpreter.

Examples:

  • C, C++, Java
  • Python, PHP
  • C#, JavaScript

Translator Programs

Translators convert high-level or assembly code into machine code.

A. Compiler

  • Converts the entire program into machine code at once.
  • Shows errors after full compilation.
  • Faster execution because full code is already converted.

Examples: GCC for C, javac for Java.

Features

  • Translates whole program
  • Creates an executable (.exe)
  • Faster at runtime

B. Interpreter

  • Converts and executes code line-by-line.
  • Stops at the first error.
  • Slower overall, but useful for beginners/testing.

Examples: Python interpreter, JavaScript engine.

Features

  • Line-by-line execution
  • No separate executable
  • Slower but easier for debugging

C. Assembler

  • Converts Assembly Language → Machine Language.
  • Works with mnemonics like MOV, ADD, SUB.

Used for embedded systems and hardware-level programming.

Problem-Solving Concepts

Problem solving means breaking down a task into smaller steps to reach a solution.
In programming, this is done using:

  1. Algorithms
  2. Flowcharts
  3. Pseudocode

Algorithms

An algorithm is a step-by-step procedure to solve a problem.

Example: Algorithm to add two numbers:

  1. Start
  2. Input A and B
  3. Add A and B → Sum
  4. Display Sum
  5. Stop

Characteristics of a Good Algorithm

CharacteristicMeaning
Clear & UnambiguousEach step must have one meaning
Input SpecifiedAlgorithm may take zero or more inputs
Output SpecifiedMust produce at least one output
Finite StepsMust end after limited steps
EffectiveSteps must be simple and executable
Language IndependentNot tied to any programming language

Limitations of Algorithms

  • Not suitable for problems requiring AI/judgment/creativity
  • Complex algorithms can become lengthy
  • Cannot handle ambiguous or emotional problems
  • Some real-world issues cannot be broken into finite steps

Conditions in Pseudocode

Pseudocode uses simple English-like statements to represent logic.

Decision/Conditional Statements

If Statement

IF condition THEN statement END IF

Example:

IF age >= 18 THEN PRINT "Eligible to vote" END IF

If–Else

IF condition THEN statement1 ELSE statement2 END IF

Nested If

IF condition1 THEN statement ELSE IF condition2 THEN statement END IF END IF

Switch/Case

SWITCH(choice) CASE 1: PRINT "Start" CASE 2: PRINT "Stop" DEFAULT: PRINT "Invalid" END SWITCH

Loops in Pseudocode

Loops repeat steps until a condition is met.

A. While Loop

Used when the number of repetitions is unknown.

WHILE condition DO statements END WHILE

Example:

WHILE i <= 10 DO PRINT i i = i + 1 END WHILE

B. For Loop

Used when the number of repetitions is known.

FOR i = start TO end DO statements END FOR

Example:

FOR i = 1 TO 5 DO PRINT i END FOR

C. Repeat…Until Loop

Executes the loop at least once.

REPEAT statements UNTIL condition

Example:

REPEAT PRINT i i = i + 1 UNTIL i > 5

Summary Table

ConceptExplanation
Computer LanguagesMachine, Assembly, High-level
CompilerConverts whole program at once
InterpreterLine-by-line execution
AssemblerConverts assembly to machine code
AlgorithmStep-by-step solution
CharacteristicsClear, finite, effective
Pseudocode ConditionsIF, IF-ELSE, SWITCH
LoopsFOR, WHILE, REPEAT