💻

Introduction to Computer and Programming Notes

Sep 16, 2024

Lecture Notes: Introduction to Computer and Programming

Instructor Information

  • Name: Ritesh Sohan
  • Position: Assistant Professor
  • Department: Computer Engineering, Mahatma Gandhi Institute of Technical Education and Research Center, Nausari
  • Subject Code: 3110003

Course Overview

  • Total Units: 10 in the subject Programming for Problem Solving.
  • Recommended Textbook: Programming in ANSYS C by Bala Gurusamy.

Unit 1: Introduction to Computer and Programming

Topics Covered:

  1. Introduction to Computers and Programming Languages
  2. Basic Block Diagram of a Computer
  3. Functions of Various Components of Computer
  4. Concept of Hardware and Software
  5. Differences Between Hardware and Software
  6. Types of Software
  7. Compilers and Interpreters

What is a Computer?

  • A machine that accepts data as input, processes it using programs, and outputs the processed data as information.
  • Capable of storing and retrieving information.
  • Can be connected to form networks for communication.
  • Modern computers serve various purposes: browsing the web, writing documents, editing videos, etc.

What is a Programming Language?

  • A formal language consisting of a set of instructions producing various outputs.
  • Used to implement algorithms in computer programming.
  • Allows translation of binary (1s and 0s) into understandable instructions for computers.

Basic Block Diagram of Computer

  • Key Components:
    1. CPU (Central Processing Unit):
      • Contains: ALU (Arithmetic Logic Unit), Control Unit (CU), Primary Memory
      • Main part of the computer that processes data and controls data flow.
    2. Input Section:
      • Devices such as keyboard, mouse, touchscreen, etc.
    3. Output Section:
      • Devices like monitors, printers, speakers, etc.
    4. Secondary Memory:
      • Storage devices (hard disks, pen drives) that retain data permanently.

Components of CPU

  • ALU (Arithmetic Logic Unit):
    • Performs mathematical calculations and logical operations.
  • Control Unit (CU):
    • Manages all operations and reads instructions from memory.
  • Primary Memory:
    • Also known as main memory; volatile storage for currently executing programs.
    • Types: RAM (volatile), ROM (non-volatile), PROM, EPROM.

Input and Output Devices

  • Input Devices:
    • Convert human-readable input into computer-controllable data (e.g., mouse, keyboard).
  • Output Devices:
    • Convert data stored in binary form to human-understandable format (e.g., monitors, printers).

Secondary Memory

  • Non-volatile memory for permanent data storage (e.g., hard disk, CDs, DVDs).

Advantages and Limitations of Computers

Advantages:

  1. Speed:
    • Executes millions of calculations in microseconds/nanoseconds.
  2. Storage:
    • Can store vast amounts of data efficiently.
  3. Accuracy:
    • Performs calculations with 100% accuracy when given correct input.
  4. Reliability:
    • Data remains intact after years, can operate continuously.
  5. Automation:
    • Tasks can be repeated with a single command.

Limitations:

  1. Lack of Intelligence:
    • Cannot think or make decisions; relies entirely on provided instructions.
  2. Unable to Correct Mistakes:
    • Cannot rectify errors in input; outputs are solely based on the input given.

Concept of Hardware and Software

Software:

  • A set of instructions (programs) designed to perform tasks.
  • Types of Software:
    1. System Software:
      • Operates hardware and provides a platform for application software (e.g., operating systems like Windows, Linux).
    2. Application Software:
      • Helps users perform specific tasks (e.g., word processors, web browsers).

Differences Between Hardware and Software:

  • Software is intangible and consists of instructions; hardware is tangible and includes physical components.
  • Hardware cannot function without software and vice versa.
  • Software can be debugged; hardware can only be repaired or replaced.

Compilers and Interpreters

Compiler:

  • Translates entire high-level language programs to machine language at once.
  • Detects errors after the entire program has been compiled.

Interpreter:

  • Translates high-level language programs line by line.
  • Stops execution on encountering errors, displaying them in real-time.

Key Differences:

  • Compiler:
    • Compiles the whole program, requires more memory.
  • Interpreter:
    • Compiles line by line, requires less memory.

Conclusion

  • The session covered the introduction to computers, programming languages, components of computers, advantages and limitations, hardware vs software, and compilers vs interpreters.
  • Next Session Topics:
    • Machine level language, assembly level language, high-level programming language, flowcharts, and algorithms.
  • Contact for Queries:
    • Students can reach out for any questions regarding the topics discussed.