MH State Board All Notes Free5th to 12th & BA, BSc, B.Com 🔍

Computer Science संगणकशास्त्र

BSc Semester 1 · 9 chapters · 9 with notes

Chapters

  1. 1Fundamentals of ComputersNotes
  2. 2Input and Output DevicesNotes
  3. 3Computer Memory and Storage DevicesNotes
  4. 4Number SystemsNotes
  5. 5Boolean Algebra and Logic GatesNotes
  6. 6Computer Software and Programming LanguagesNotes
  7. 7Operating System BasicsNotes
  8. 8Internet and Its ApplicationsNotes
  9. 9Algorithms and FlowchartsNotes

BSc Semester 1 · Computer Science · Chapter 1

Fundamentals of Computers

Quick summary

A computer is an electronic device that accepts data, processes it under the control of a program, stores it and gives output. This topic covers characteristics of computers, generations, classification, the block diagram (input, CPU, memory, output), types of memory, and hardware versus software.

Key points

  • A computer works on the IPO cycle: Input → Process → Output, with Storage.
  • Characteristics: speed, accuracy, diligence (no tiredness), versatility, huge storage. A computer has no IQ (cannot think on its own) and no feelings.
  • Generations: 1st – vacuum tubes (ENIAC, UNIVAC); 2nd – transistors; 3rd – integrated circuits (ICs); 4th – microprocessors (VLSI); 5th – artificial intelligence, parallel processing.
  • Classification by size/power: microcomputer (PC, laptop), minicomputer, mainframe, supercomputer. India's PARAM series of supercomputers was built by C-DAC, Pune.
  • Classification by type of data: analog, digital and hybrid computers.
  • Block diagram: Input unit, Central Processing Unit (CPU), Output unit and Memory/Storage unit.
  • The CPU has three parts: ALU (arithmetic and logic operations), CU (control unit, directs all operations) and registers (very fast small storage).
  • Primary memory: RAM (volatile, read/write) and ROM (non-volatile, read-only; PROM, EPROM, EEPROM).
  • Cache memory is a very fast memory between the CPU and RAM.
  • Secondary memory: hard disk, SSD, pen drive, CD/DVD, magnetic tape. It is non-volatile and large.
  • Memory hierarchy (fast and costly → slow and cheap): registers → cache → RAM → secondary storage.
  • Software types: system software (operating system, compilers, utilities) and application software (MS Word, Tally, browsers).
  • Language translators: compiler (translates whole program at once), interpreter (line by line), assembler (assembly to machine language).

Important terms

  • Hardware – physical parts of a computer you can touch.
  • Software (सॉफ्टवेअर / प्रणाली) – set of programs that tell the hardware what to do.
  • Bit – smallest unit of data, 0 or 1. Byte – 8 bits.
  • Volatile memory – loses its data when power goes off (RAM).
  • Firmware – software stored permanently in ROM, like BIOS.
  • Peripheral – external device attached to the computer (printer, scanner).

Formulas

Memory units (binary):

UnitSize
1 Nibble4 bits
1 Byte8 bits
1 KB1024 bytes
1 MB1024 KB
1 GB1024 MB
1 TB1024 GB
  • Input devices: keyboard, mouse, scanner, microphone, webcam, barcode reader, OMR, MICR (used in bank cheques).
  • Output devices: monitor, printer (impact: dot-matrix; non-impact: inkjet, laser), speaker, plotter, projector.

5 important questions

Q1. Differentiate between RAM and ROM.

RAM is volatile, read-write memory used to hold programs currently running. ROM is non-volatile, mostly read-only memory that stores permanent instructions like the BIOS. RAM is larger; ROM is small.

Q2. What is the difference between a compiler and an interpreter?

A compiler translates the whole program into machine code at once and shows all errors together; execution is fast. An interpreter translates and runs one line at a time and stops at the first error; it is slower. C uses a compiler; Python normally uses an interpreter.

Q3. Draw and explain the block diagram of a computer.

  • Input unit: accepts data and converts it into machine form (keyboard, mouse).
  • Memory unit: stores data and instructions (primary and secondary).
  • CPU: ALU does calculations and comparisons; CU fetches, decodes and controls; registers hold data in use.
  • Output unit: converts results into human-readable form (monitor, printer).
  • Arrows show data flow from input to memory to CPU to output, and control signals from CU to all units.

Q4. Explain the generations of computers.

  • First (about 1940s–1950s): vacuum tubes, machine language, very large, much heat.
  • Second: transistors, assembly language, smaller and more reliable.
  • Third: integrated circuits, keyboards and monitors, operating systems.
  • Fourth: microprocessors (VLSI), personal computers, GUIs, networks.
  • Fifth: AI, parallel processing, natural language, ULSI.

Q5. Explain the memory hierarchy.

  • Registers: inside CPU, fastest, smallest.
  • Cache: between CPU and RAM, stores frequently used data.
  • Main memory (RAM): holds running programs.
  • Secondary storage: HDD/SSD, large, permanent, slower.
  • As we go down: speed and cost per bit decrease, capacity increases.

Exam tip

The block diagram question comes almost every year. Draw neat boxes with arrows and label ALU, CU and memory clearly.

BSc Semester 1 · Computer Science · Chapter 2

Input and Output Devices

Quick summary

Input devices send data and instructions into the computer, and output devices show or give the results back to the user. This topic covers common input devices (keyboard, mouse, scanner, MICR, OCR, OMR, barcode reader, touch screen, microphone, webcam), output devices (monitor, printer, plotter, speaker, projector), how they differ, and devices that do both jobs.

Key points

  • Input device: converts data from the human (or the real world) into a binary form the computer understands.
  • Keyboard: most common input device. Keys: alphanumeric, function keys (F1–F12), cursor keys, numeric keypad, modifier keys (Shift, Ctrl, Alt).
  • Mouse: pointing device. Types: mechanical (ball), optical (LED light), wireless. Actions: click, double-click, right-click, drag, scroll.
  • Other pointing devices: trackball, touchpad, joystick, light pen, stylus.
  • Scanner: converts a printed page or photo into a digital image. Flatbed and handheld types.
  • MICR (Magnetic Ink Character Recognition): reads cheque numbers printed in magnetic ink. Used by banks.
  • OCR (Optical Character Recognition): converts scanned text into editable text.
  • OMR (Optical Mark Reader): reads pencil/pen marks in fixed boxes. Used to check MCQ answer sheets.
  • Barcode reader: reads the black-and-white bar pattern on products in shops. A QR code is a 2-D barcode.
  • Output device: converts binary results into a form humans can understand (text, picture, sound, print).
  • Monitor (VDU): soft-copy output. Types: CRT (old), LCD, LED, OLED. Quality depends on resolution, pixel size and refresh rate.
  • Printer: hard-copy output. Impact printers (dot-matrix, line printer) strike the paper; non-impact printers (inkjet, laser, thermal) do not.
  • Plotter: draws large, accurate drawings like maps and building plans.
  • I/O (both) devices: touch screen, modem, network card, headset with mic.

Important terms

  • Soft copy – output seen on screen; it is temporary.
  • Hard copy – output printed on paper; it is permanent.
  • Pixel – the smallest dot of a screen picture.
  • Resolution – number of pixels shown, e.g. 1920 × 1080.
  • DPI – dots per inch; measures printer quality.
  • PPM – pages per minute; measures printer speed.

Formulas

  • Total pixels = horizontal pixels × vertical pixels
  • Memory for one screen image (bytes) = total pixels × bits per pixel ÷ 8
  • Number of colours possible = 2ⁿ, where n = bits per pixel
FeatureImpact printerNon-impact printer
MethodStrikes ribbon on paperInk spray, laser or heat
NoiseNoisyQuiet
QualityLowerHigh
Multiple copies (carbon)PossibleNot possible
ExampleDot-matrixLaser, inkjet

5 important questions

Q1. Differentiate between OCR and OMR.

OCR reads printed or typed letters and converts them into editable text. OMR only detects the presence of a mark in a fixed position, such as a filled circle on an MCQ answer sheet. OCR is used to digitise books; OMR is used in exams and surveys.

Q2. A monitor has a resolution of 1024 × 768 and uses 24 bits per pixel. How much memory is needed for one screen image?

  • Total pixels = 1024 × 768 = 786,432
  • Bits = 786,432 × 24 = 18,874,368 bits
  • Bytes = 18,874,368 ÷ 8 = 2,359,296 bytes = 2304 KB = 2.25 MB
  • Colours possible = 2²⁴ = 16,777,216 (about 16.7 million)

Q3. What is an input device? Explain any five input devices.

Outline: define input device → keyboard (types of keys) → mouse (types, actions) → scanner (flatbed, handheld) → MICR (banks, cheques) → barcode reader (shops, billing). Give one use for each.

Q4. Explain different types of printers.

  • Classify into impact and non-impact.
  • Dot-matrix: pins strike ribbon; cheap, noisy, used for bills.
  • Line printer: prints a whole line at a time; fast, for bulk output.
  • Inkjet: sprays tiny ink drops; good colour quality, home use.
  • Laser: uses a laser, drum and toner powder; fast, sharp, office use.
  • Thermal: uses heat-sensitive paper; ATM slips and receipts.
  • End with the comparison table.

Q5. Compare CRT, LCD and LED monitors.

CRT uses an electron gun and a picture tube; it is bulky and uses more power. LCD uses liquid crystals with a backlight; it is thin and uses less power. LED monitors are LCD panels with an LED backlight; they are brighter, thinner and save more power. OLED pixels give their own light, so there is no backlight and blacks are deeper.

Exam tip

Always give one real-life use for each device (MICR in banks, OMR in exams, barcode in shops). Examiners like a neat comparison table for impact vs non-impact printers.

BSc Semester 1 · Computer Science · Chapter 3

Computer Memory and Storage Devices

Quick summary

Memory is the part of a computer that stores data and programs. Primary memory (RAM, ROM, cache, registers) is fast and directly used by the CPU; secondary storage (hard disk, SSD, pen drive, optical disc) is slower but large and permanent. This topic covers the types of memory, units of storage, how a hard disk works, and how to calculate capacity and access time.

Key points

  • Primary memory is directly accessed by the CPU. Secondary memory is accessed through I/O and must be loaded into RAM first.
  • RAM (Random Access Memory) is volatile: data is lost when power goes off.
  • SRAM uses flip-flops; fast, costly, no refresh needed; used for cache. DRAM uses capacitors; cheaper, needs refreshing; used as main memory.
  • ROM is non-volatile and holds firmware such as the BIOS. Types: PROM (written once), EPROM (erased by UV light), EEPROM (erased electrically), flash memory.
  • Cache memory sits between CPU and RAM and keeps the most-used data. A cache hit means the data was found in cache; a miss means it must come from RAM.
  • Registers are the fastest storage, inside the CPU (accumulator, program counter, instruction register, MAR, MDR).
  • Memory hierarchy (fastest and costliest to slowest and cheapest): registers → cache → RAM → SSD/HDD → optical disc/tape.
  • Hard disk (HDD): magnetic platters divided into tracks and sectors; a read/write head on an arm moves over them. Tracks at the same position on all surfaces form a cylinder.
  • SSD uses flash memory with no moving parts, so it is faster, quieter and more shock-proof than an HDD.
  • Optical discs: CD (about 700 MB), DVD (4.7 GB single layer), Blu-ray (25 GB single layer). Data is read by a laser.
  • Access methods: random (RAM, disk), sequential (magnetic tape).

Important terms

  • Volatile – loses data without power.
  • Bit / Byte – 1 binary digit / 8 bits.
  • Seek time – time to move the head to the correct track.
  • Rotational latency – time for the sector to come under the head.
  • Firmware – permanent software stored in ROM.
  • Virtual memory – disk space used as an extension of RAM.

Formulas

  • 1 KB = 1024 bytes; 1 MB = 1024 KB; 1 GB = 1024 MB; 1 TB = 1024 GB
  • Disk capacity = surfaces × tracks per surface × sectors per track × bytes per sector
  • Average rotational latency = ½ × time for one rotation; one rotation (ms) = 60,000 ÷ RPM
  • Access time = seek time + rotational latency + transfer time
  • Average memory access time = hit ratio × cache time + (1 − hit ratio) × (cache time + RAM time)

5 important questions

Q1. Differentiate SRAM and DRAM.

SRAM stores each bit in a flip-flop, needs no refresh, is faster and costlier, and is used for cache. DRAM stores each bit as charge in a capacitor, must be refreshed thousands of times a second, is slower and cheaper, and is used as main memory.

Q2. What is cache memory? Why is it used?

Cache is a small, very fast memory between the CPU and RAM. It keeps copies of the data and instructions the CPU uses most often, so the CPU waits less. It works because programs tend to reuse nearby and recent data (locality of reference).

Q3. A disk has 4 platters (8 surfaces), 1000 tracks per surface, 50 sectors per track and 512 bytes per sector. Find its capacity.

  • Capacity = 8 × 1000 × 50 × 512
  • = 8 × 1000 = 8000; 8000 × 50 = 400,000 sectors
  • 400,000 × 512 = 204,800,000 bytes
  • In MB = 204,800,000 ÷ (1024 × 1024) ≈ 195.3 MB

Q4. A disk rotates at 6000 RPM and has an average seek time of 5 ms. Find the average access time, ignoring transfer time.

  • One rotation = 60,000 ÷ 6000 = 10 ms
  • Average rotational latency = 10 ÷ 2 = 5 ms
  • Access time = 5 + 5 = 10 ms

Q5. Explain the memory hierarchy with a diagram (in words).

Outline: draw a pyramid with registers at the top, then cache, main memory (RAM), secondary storage (SSD/HDD) and backup storage (optical disc, tape) at the bottom. Moving down, capacity increases, while speed and cost per bit decrease. Explain why a hierarchy gives speed close to the top level at a cost close to the bottom level. Give an example size for each level.

Exam tip

Write the capacity formula first, then substitute values, and always state the unit (bytes, KB, MB). Remember 1 KB = 1024 bytes in memory questions.

BSc Semester 1 · Computer Science · Chapter 4

Number Systems

Quick summary

A number system is a way of representing numbers using a set of symbols. Computers use the binary system because electronic circuits have two states, ON and OFF. This topic covers decimal, binary, octal and hexadecimal systems, conversions between them, binary arithmetic, complements and codes like BCD, ASCII and Gray code.

Key points

  • Base (radix) = number of digits used. Decimal = 10 (0–9), Binary = 2 (0, 1), Octal = 8 (0–7), Hexadecimal = 16 (0–9, A–F where A = 10 … F = 15).
  • Each position has a place value = base raised to the position (starting at 0 from the right of the point).
  • Decimal to any base: divide repeatedly by the base and read the remainders from bottom to top. For a fraction, multiply repeatedly by the base and read the integer parts from top to bottom.
  • Any base to decimal: multiply each digit by its place value and add.
  • Binary to octal: group 3 bits from the right. Binary to hex: group 4 bits.
  • Binary addition: 0+0 = 0, 0+1 = 1, 1+1 = 10 (sum 0, carry 1), 1+1+1 = 11.
  • 1's complement: change every 0 to 1 and 1 to 0.
  • 2's complement = 1's complement + 1. Computers use 2's complement to subtract by adding.
  • In signed 8-bit 2's complement, the range is −128 to +127.
  • BCD (8421 code): each decimal digit is written as a 4-bit binary number. 59 = 0101 1001.
  • ASCII: 7-bit code for characters. 'A' = 65, 'a' = 97, '0' = 48. Unicode covers all world scripts, including Devanagari.
  • Gray code: only one bit changes between two consecutive numbers. Used in encoders.

Important terms

  • Radix – base of a number system.
  • MSB / LSB – most significant bit (leftmost) / least significant bit (rightmost).
  • Nibble – group of 4 bits.
  • Complement – value used to represent negative numbers and to do subtraction.
  • Weighted code – each bit position has a fixed weight (BCD 8421).

Formulas

  • Value = Σ dᵢ × bⁱ (dᵢ = digit, b = base, i = position)
  • r's complement of N (n digits) = rⁿ − N; (r − 1)'s complement = (rⁿ − 1) − N
  • Binary to Gray: G₁ = B₁ (MSB same); Gᵢ = Bᵢ₋₁ XOR Bᵢ
  • Range of n-bit unsigned = 0 to 2ⁿ − 1; signed 2's complement = −2ⁿ⁻¹ to 2ⁿ⁻¹ − 1
DecimalBinaryOctalHex
10101012A
15111117F
16100002010

5 important questions

Q1. Convert (45)₁₀ to binary.

45 ÷ 2 = 22 r 1; 22 ÷ 2 = 11 r 0; 11 ÷ 2 = 5 r 1; 5 ÷ 2 = 2 r 1; 2 ÷ 2 = 1 r 0; 1 ÷ 2 = 0 r 1. Reading bottom to top: (45)₁₀ = (101101)₂.

Q2. Convert (2AF)₁₆ to decimal.

2 × 16² + A(10) × 16¹ + F(15) × 16⁰ = 512 + 160 + 15 = (687)₁₀.

Q3. Convert (110101.101)₂ to decimal.

  • Integer: 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 53
  • Fraction: 1×½ + 0×¼ + 1×⅛ = 0.5 + 0.125 = 0.625
  • Answer: (53.625)₁₀
  • Check with octal: 110 101 . 101 = (65.5)₈ = 6×8 + 5 + 5/8 = 53.625 ✓

Q4. Subtract 9 from 5 using 8-bit 2's complement (5 − 9).

  • 5 = 00000101; 9 = 00001001
  • 1's complement of 9 = 11110110; 2's complement = 11110111
  • Add: 00000101 + 11110111 = 11111100 (no carry out)
  • No carry → result is negative; take 2's complement of 11111100 = 00000100 = 4
  • Answer = −4 ✓

Q5. Explain BCD, ASCII and Gray code with examples.

  • BCD: each decimal digit in 4 bits; 92 = 1001 0010. Codes 1010–1111 are invalid.
  • ASCII: 7-bit character code (128 characters); 'B' = 66 = 1000010.
  • Gray: unit-distance code; binary 0111 (7) → Gray 0100; 1000 (8) → Gray 1100.
  • Uses: BCD in calculators and digital displays, ASCII in text files, Gray in rotary encoders.

Exam tip

Show every division or multiplication step in conversions. In 2's complement problems, state clearly whether a carry came out and what it means.

BSc Semester 1 · Computer Science · Chapter 5

Boolean Algebra and Logic Gates

Quick summary

Boolean algebra is the algebra of two values, 0 (false) and 1 (true), developed by George Boole. It is the mathematics of digital circuits. This topic covers basic operations, laws and theorems (including De Morgan's), logic gates, universal gates, simplification by K-map, and simple combinational circuits like adders.

Key points

  • Three basic operations: AND (A·B), OR (A + B), NOT (A′ or Ā).
  • Logic gates are electronic circuits that perform Boolean operations: AND, OR, NOT, NAND, NOR, XOR, XNOR.
  • NAND and NOR are universal gates: any other gate can be built using only NAND gates or only NOR gates.
  • XOR gives 1 when the inputs are different; XNOR gives 1 when the inputs are the same.
  • De Morgan's theorems: (A + B)′ = A′·B′ and (A·B)′ = A′ + B′.
  • A truth table lists the output for every input combination. n inputs give 2ⁿ rows.
  • Boolean expressions are written in SOP (sum of products, from minterms) or POS (product of sums, from maxterms) form.
  • Karnaugh map (K-map): a grid method to simplify expressions of 2, 3 or 4 variables. Adjacent cells differ by one variable (Gray code order). Group 1s in pairs, quads, octets.
  • Half adder: adds two bits. Sum = A ⊕ B, Carry = A·B.
  • Full adder: adds three bits (A, B, carry-in). Sum = A ⊕ B ⊕ C, Carry = AB + BC + CA. It can be made from two half adders and an OR gate.
  • Duality principle: interchanging AND ↔ OR and 0 ↔ 1 in a valid identity gives another valid identity.

Important terms

  • Boolean variable – variable that can take only 0 or 1.
  • Minterm – product term containing all variables (gives 1 for one input combination).
  • Maxterm – sum term containing all variables (gives 0 for one combination).
  • Universal gate – gate that can implement any Boolean function alone.
  • Combinational circuit (संयोजी परिपथ) – circuit whose output depends only on present inputs.

Formulas

Laws of Boolean algebra:

  • Identity: A + 0 = A; A·1 = A
  • Null: A + 1 = 1; A·0 = 0
  • Idempotent: A + A = A; A·A = A
  • Complement: A + A′ = 1; A·A′ = 0
  • Involution: (A′)′ = A
  • Commutative, associative and distributive: A(B + C) = AB + AC; A + BC = (A + B)(A + C)
  • Absorption: A + AB = A; A(A + B) = A
  • A + A′B = A + B
  • XOR: A ⊕ B = A′B + AB′
ABANDORNANDNORXOR
0000110
0101101
1001101
1111000

5 important questions

Q1. Why are NAND and NOR called universal gates?

Because every basic gate (NOT, AND, OR) and so every Boolean function can be built using only NAND gates or only NOR gates. Example: NOT A = A NAND A.

Q2. State and prove one of De Morgan's theorems using a truth table.

(A + B)′ = A′·B′. For inputs 00, 01, 10, 11, (A + B)′ gives 1, 0, 0, 0 and A′·B′ gives 1, 0, 0, 0. Both columns match, so the theorem is proved.

Q3. Simplify Y = AB + AB′ + A′B using Boolean laws.

  • Y = A(B + B′) + A′B
  • = A·1 + A′B = A + A′B
  • = (A + A′)(A + B) (distributive law)
  • = 1·(A + B)
  • Y = A + B

Q4. Simplify F(A, B, C) = Σm(1, 3, 5, 7) using a K-map.

  • Minterms 1 (001), 3 (011), 5 (101), 7 (111) all have C = 1.
  • In the 3-variable K-map the four 1s lie in the C = 1 column/row and form one quad.
  • In the quad, A and B change, C stays 1.
  • F = C

Q5. Explain the full adder with truth table and logic diagram.

  • Inputs A, B, Cin; outputs Sum, Cout.
  • Sum = A ⊕ B ⊕ Cin; Cout = AB + Cin(A ⊕ B), which simplifies to AB + BCin + ACin.
  • Truth table has 8 rows; e.g. 1, 1, 1 → Sum 1, Cout 1; 1, 1, 0 → Sum 0, Cout 1.
  • Built using two half adders and one OR gate.
  • Used in ALUs to add multi-bit numbers (ripple carry adder).

Exam tip

Always draw the truth table to check your simplified answer. In K-map, make groups as large as possible and wrap around the edges.

BSc Semester 1 · Computer Science · Chapter 6

Computer Software and Programming Languages

Quick summary

Software is the set of programs that tells the hardware what to do. This topic covers the types of software (system, application, utility), open-source and proprietary software, the generations of programming languages from machine language to 4GL, language translators (assembler, compiler, interpreter), and the linker and loader that prepare a program to run.

Key points

  • System software controls the hardware and gives a platform for other programs: operating system, device drivers, translators, utilities.
  • Application software does a user's task: word processor, spreadsheet, browser, Tally, games.
  • Utility software maintains the computer: antivirus, disk cleanup, backup, compression (zip).
  • Proprietary software is owned by a company; source code is closed (MS Windows, MS Office). Open-source software gives free access to source code (Linux, LibreOffice, Python). Freeware is free to use but may be closed source.
  • 1GL – Machine language: binary 0s and 1s; runs directly, very fast, but hard to write and machine-dependent.
  • 2GL – Assembly language: uses mnemonics like ADD, MOV, SUB; needs an assembler; still machine-dependent.
  • 3GL – High-level languages: English-like (C, C++, Java, Python); portable; need a compiler or interpreter.
  • 4GL: closer to human language, for databases and reports (SQL). 5GL: based on rules and logic, used in AI (Prolog).
  • Compiler translates the whole program at once into object code and lists all errors together (C, C++).
  • Interpreter translates and runs one line at a time and stops at the first error (Python, BASIC).
  • Linker joins object files and library code into one executable file. Loader places the executable into RAM and starts it.
  • Steps to run a C program: source code (.c) → compiler → object code (.obj/.o) → linker → executable (.exe) → loader → RAM → run.

Important terms

  • Source code – the program written by the programmer in a high-level language.
  • Object code – the machine-code output of a compiler or assembler.
  • Mnemonic – a short word for a machine instruction, e.g. MOV.
  • Syntax error – breaking the grammar rules of a language.
  • Logical error – the program runs but gives a wrong result.
  • Debugging – finding and removing errors.

Formulas

PointCompilerInterpreter
TranslationWhole program at onceOne statement at a time
Object fileCreatedNot created
Error reportAll errors after compilingStops at first error
Execution speedFasterSlower
ExampleC, C++Python, BASIC
GenerationExampleTranslator needed
1GL Machine10110000 01100001None
2GL AssemblyMOV AL, 61hAssembler
3GL High levelprintf("Hi");Compiler / interpreter
4GLSELECT * FROM student;DBMS query processor

5 important questions

Q1. Differentiate system software and application software.

System software runs and manages the computer itself and works in the background (OS, drivers, translators). Application software is used by the user for a particular job (MS Word, browser, billing software). Application software cannot run without system software.

Q2. What is the role of a linker and a loader?

The linker combines the object code of the program with object code of library functions (such as printf) and other modules, and resolves addresses, to make one executable file. The loader copies this executable from disk into main memory, sets the starting address and hands control to the program.

Q3. Explain the generations of programming languages with merits and demerits.

Outline: 1GL machine language (fast, no translation; hard, machine-dependent) → 2GL assembly (mnemonics, easier; still machine-dependent, needs assembler) → 3GL high-level (English-like, portable, easy to debug; slower, needs translator) → 4GL (very little code, non-procedural, e.g. SQL) → 5GL (logic programming for AI). Give one example for each.

Q4. Compare compiler, interpreter and assembler.

All three are language translators. An assembler converts assembly language into machine code. A compiler converts a whole high-level program into machine code before running. An interpreter converts and runs a high-level program line by line. Add the comparison table above.

Q5. Explain open-source and proprietary software with examples. Which is better for a college lab?

Open-source: source code available, free to modify and share, community support (Linux, LibreOffice, Python, GIMP). Proprietary: licence fee, closed code, vendor support (Windows, MS Office, Photoshop). For a college lab, open source cuts cost and lets students study the code, but some subjects need specific proprietary tools; many labs use a mix.

Exam tip

Learn the compiler vs interpreter table by heart; it is asked almost every year. In "steps to run a program" draw the flow with arrows and name the file at each stage.

BSc Semester 1 · Computer Science · Chapter 7

Operating System Basics

Quick summary

An operating system (OS) is system software that manages the computer's hardware and provides services to programs and users. It acts as an interface between the user and the hardware. This topic covers OS functions, types of OS, booting, and an introduction to Windows, Linux and common commands.

Key points

  • An OS is the first program loaded at start-up; all other programs run on top of it. Examples: Windows, Linux, macOS, Android, iOS.
  • Functions of OS: process management, memory management, file management, device (I/O) management, security and protection, user interface, error detection.
  • User interface: CLI (command line, e.g. MS-DOS, Linux terminal) or GUI (graphical, icons and windows, e.g. Windows).
  • Types of OS:
  • Batch OS – similar jobs are grouped and run without user interaction.
  • Multiprogramming – several programs in memory; CPU switches when one waits for I/O.
  • Time-sharing (multitasking) – CPU time divided in small slices among users or tasks.
  • Multiprocessing – more than one CPU.
  • Real-time OS – gives response within a fixed time (traffic control, medical devices).
  • Distributed and network OS – manage many connected computers.
  • Mobile OS – Android, iOS.
  • Booting: process of starting the computer. Cold boot (power on) and warm boot (restart). BIOS/UEFI runs POST, then the boot loader loads the OS kernel.
  • Kernel is the core part of the OS that always stays in memory.
  • Linux is open-source and free; it is widely used on servers. Windows is proprietary.
  • File systems organise files into directories (folders) in a tree. Windows uses NTFS; Linux commonly uses ext4.

Important terms

  • Kernel – core of the OS that controls hardware and resources.
  • Shell – program that takes user commands and passes them to the kernel.
  • Process – a program in execution.
  • Booting (संगणक सुरू करणे) – loading the OS into memory at start-up.
  • Device driver – small program that lets the OS talk to a hardware device.
  • Open-source software – software whose source code is freely available (Linux).

Formulas

Common commands (no formulas in this topic):

TaskMS-DOS / WindowsLinux
List filesdirls
Change directorycdcd
Make directorymd / mkdirmkdir
Copy filecopycp
Delete filedelrm
Rename / moverenmv
Show file contenttypecat
Clear screenclsclear

5 important questions

Q1. Define operating system. Give two examples.

An operating system is system software that manages hardware resources and provides an environment for running programs. It is an interface between user and computer. Examples: Windows 11 and Linux (Ubuntu).

Q2. Differentiate CLI and GUI.

In a CLI the user types text commands; it needs memorising commands but uses few resources. In a GUI the user clicks icons, menus and windows with a mouse; it is easy for beginners but needs more memory.

Q3. Explain the functions of an operating system.

  • Process management: creating, scheduling and ending processes.
  • Memory management: allocating and freeing RAM.
  • File management: creating, deleting and organising files and folders.
  • Device management: controlling I/O devices through drivers.
  • Security: passwords, permissions; user interface; error handling.

Q4. Explain different types of operating systems.

  • Batch: jobs grouped, no interaction (old mainframes).
  • Time-sharing: many users share CPU through time slices.
  • Real-time: strict time limits (hard and soft real-time).
  • Distributed: many computers appear as one system.
  • Mobile/embedded: Android, iOS; designed for low power and touch.

Q5. What is booting? Explain the booting process.

  • Booting is loading the OS into main memory when the computer starts.
  • Power on → BIOS/UEFI in ROM runs.
  • POST (power-on self-test) checks hardware.
  • Boot loader is found on the boot device and loaded.
  • Boot loader loads the kernel; OS starts services and shows the login screen.
  • Cold boot vs warm boot.

Exam tip

Learn the list of OS functions and OS types with one example each; these are asked as both short and long questions.

BSc Semester 1 · Computer Science · Chapter 8

Internet and Its Applications

Quick summary

The Internet is a worldwide network of networks that uses the TCP/IP protocols to connect millions of computers. This topic covers its history, how one connects to it, the World Wide Web, URLs and domain names, web browsers and search engines, e-mail, and everyday uses such as e-commerce, net banking and e-learning, with basic safety rules.

Key points

  • The Internet began with ARPANET (1969) in the USA. The World Wide Web was invented by Tim Berners-Lee at CERN (proposed in 1989).
  • The Internet is the hardware network; the WWW is a service on it made of linked web pages.
  • ISP (Internet Service Provider) gives Internet access, e.g. BSNL, Jio, Airtel.
  • Ways to connect: dial-up (old), DSL/broadband, fibre (FTTH), cable, mobile data (4G/5G), Wi-Fi, satellite.
  • Web page is written in HTML; a website is a group of related pages; the first page is the home page.
  • Web browser displays web pages: Chrome, Firefox, Edge, Safari.
  • Search engine finds pages using keywords: Google, Bing, DuckDuckGo.
  • URL (Uniform Resource Locator) is the full address of a resource, e.g. https://www.example.com/notes/index.html.
  • DNS (Domain Name System) converts a domain name into an IP address.
  • E-mail address format: username@domain. Parts of a mail: To, Cc, Bcc, Subject, body, attachment.
  • Protocols: HTTP/HTTPS (web), SMTP (sending mail), POP3/IMAP (receiving mail), FTP (file transfer).
  • Applications: e-commerce, net banking, UPI payments, e-governance (DigiLocker, online forms), e-learning, social media, video calls.
  • Safety: strong passwords, check for HTTPS, avoid unknown links (phishing), never share OTP.

Important terms

  • Hyperlink – clickable text or image that opens another page.
  • IP address – unique number of a device on a network, e.g. 192.168.1.1 (IPv4).
  • Domain name – easy name of a website, e.g. example.com.
  • Bandwidth – amount of data that can be sent per second (Mbps).
  • Cookie – small data file a website stores in the browser.
  • Intranet – private network inside an organisation using Internet technology.

Formulas

Parts of the URL https://www.example.com:443/notes/page.html:

PartMeaning
httpsProtocol (secure HTTP)
www.example.comHost / domain name
443Port number (optional)
/notes/page.htmlPath of the file on the server
Top-level domainUsed for
.comCommercial
.eduEducation
.gov / .gov.inGovernment
.orgOrganisations
.inIndia (country code)
  • Download time (s) = file size (bits) ÷ speed (bits per second)

5 important questions

Q1. Differentiate Internet and WWW.

The Internet is the global network of connected computers, cables and routers. The WWW is one service that runs on the Internet, made of web pages linked by hyperlinks and accessed with HTTP through a browser. E-mail and FTP use the Internet but are not part of the WWW.

Q2. How long will a 40 MB file take to download at 8 Mbps? (Take 1 MB = 8 Mb, decimal units.)

  • File size = 40 × 8 = 320 megabits
  • Time = 320 ÷ 8 = 40 seconds

Q3. Explain e-mail: its parts, working and advantages.

Outline: define e-mail → address format → parts (To, Cc, Bcc, Subject, body, attachment, signature) → working (client sends with SMTP to the mail server, receiver's server stores it, receiver reads with POP3/IMAP) → advantages (fast, cheap, attachments, record kept) → limitations (spam, phishing, needs Internet).

Q4. What is a search engine? Explain how it works.

A search engine is a website that finds information on the WWW. It works in three steps: crawling (programs called spiders visit pages and follow links), indexing (words of each page are stored in a huge index), and ranking (when you type keywords, matching pages are sorted by relevance and shown). Tips: use exact words in quotes and site: to search one website.

Q5. Explain any five applications of the Internet.

E-commerce (Amazon, Flipkart), net banking and UPI, e-learning (SWAYAM, YouTube lectures), e-governance (online scholarship and admission forms, DigiLocker), communication (e-mail, video calls, social media), and entertainment. Write 2 lines on each with one example.

Exam tip

Write a URL and label its parts in Q&A on the Internet; it earns easy marks. Know the full forms: HTTP, HTTPS, URL, DNS, ISP, SMTP, FTP.

BSc Semester 1 · Computer Science · Chapter 9

Algorithms and Flowcharts

Quick summary

Before writing a program, a programmer plans the solution. An algorithm is a step-by-step method to solve a problem, and a flowchart is a diagram of that method. This topic covers characteristics of algorithms, flowchart symbols, pseudocode, and examples like finding the largest number, factorial and prime check.

Key points

  • Algorithm: a finite set of clear, ordered steps that solves a problem. The word comes from the Persian mathematician al-Khwarizmi.
  • Characteristics (by Knuth): input (zero or more), output (at least one), definiteness (each step clear), finiteness (ends after finite steps), effectiveness (each step basic and doable).
  • Flowchart (प्रवाह आकृती): a graphical representation of an algorithm using standard symbols joined by arrows.
  • Pseudocode: algorithm written in simple English-like statements close to program code.
  • Three basic control structures: sequence, selection (decision: if–else) and iteration (repetition: loops).
  • Advantages of flowcharts: easy to understand, good for communication, help in debugging and documentation.
  • Limitations: difficult for large programs; changes need redrawing.
  • Complexity of an algorithm: time complexity (how steps grow with input size n) and space complexity (memory used). Written with Big-O notation, e.g. O(n), O(n²), O(log n).
  • Program development steps: define problem → analyse → design algorithm/flowchart → code → test and debug → document → maintain.

Important terms

  • Terminal – start or end of a flowchart.
  • Decision box – diamond shape with a yes/no question.
  • Connector – small circle to join parts of a flowchart.
  • Dry run – checking an algorithm by hand with sample values.
  • Big-O – upper bound on growth of running time.

Formulas

Flowchart symbols:

SymbolShapeUse
Terminaloval / rounded rectanglestart, stop
Input/Outputparallelogramread, print
Processrectanglecalculation, assignment
Decisiondiamondcondition, yes/no
Flow linearrowdirection of flow
Connectorsmall circlejoin parts

Common complexities: linear search O(n); binary search O(log n); bubble sort O(n²).

5 important questions

Q1. Define algorithm. State its characteristics.

An algorithm is a finite sequence of clear steps for solving a problem. Characteristics: input, output, definiteness, finiteness and effectiveness.

Q2. Differentiate between an algorithm and a flowchart.

An algorithm is written in steps using words; a flowchart is a diagram using symbols and arrows. Algorithms are easier to write for big problems; flowcharts are easier to understand visually.

Q3. Write an algorithm and describe the flowchart to find the largest of three numbers.

  1. Start.
  2. Read A, B, C.
  3. If A > B and A > C, print A is largest.
  4. Else if B > C, print B is largest.
  5. Else print C is largest.
  6. Stop.
  • Flowchart: oval Start → parallelogram Read A, B, C → diamond "A > B and A > C?" → Yes: print A; No: diamond "B > C?" → Yes: print B; No: print C → oval Stop.

Q4. Write an algorithm to find the factorial of a number N and dry-run it for N = 4.

  1. Start. Read N.
  2. Set F = 1, I = 1.
  3. While I ≤ N: F = F × I; I = I + 1.
  4. Print F. Stop.
  • Dry run: I=1, F=1; I=2, F=2; I=3, F=6; I=4, F=24; I=5 stops loop. Output 24.

Q5. Write an algorithm to check whether a number is prime.

  1. Start. Read N.
  2. If N < 2, print "Not prime" and stop.
  3. Set I = 2, flag = 0.
  4. While I × I ≤ N: if N mod I = 0, set flag = 1 and exit loop; else I = I + 1.
  5. If flag = 0 print "Prime", else print "Not prime".
  6. Stop. (Checking up to √N is enough.)

Exam tip

Draw flowcharts with correct shapes — examiners deduct marks for a wrong symbol. Always include Start and Stop.