๐ป Computer Fundamentals & Information Technology (BCA101T)
Detailed Notes โข Unit 1 to Unit 5 โข Worked examples + Mnemonics + Exam Qs
4 CreditsESE 70 + Internal 305 Units
UNIT 1 โ Fundamentals of Computers
1.1 Data vs Information
Data: Data means raw, unorganised facts and figures which have no meaning by themselves. Data is the raw material of any computing system โ it may be numbers, words, images, sounds or any other unprocessed record. Information: Information is processed, organised and meaningful data which is useful for taking decisions. Information is therefore the output of a processing system, whereas data is its input.
Hinglish: Data = kaccha maal ๐ธ, Information = pakka khana ๐. Jaise "45, 78, 90, 33" ye sirf numbers hain (data). Lekin agar likha ho "Class 12 ka average score 61% hai" โ ye information hai, kyunki iska matlab ban gaya. Yaad rakho: processing ke baad hi data "baat karne layak" banta hai.
Real life: (1) WhatsApp chat me type kiye words = data, par usi chat ka "poll result 60% YES" = information. (2) Bank statement ki saari entries = data, par "is mahine โน12,000 kharch hue" = information. (3) Zomato par 10,000 orders ka record = data, par "aapke area me sabse zyada Paneer Tikka order hota hai" = information (jo Zomato apni strategy me use karta hai). (4) Aadhaar me 190+ crore records = data; "desh me kitne voters 18โ25 age ke hain" = information. (5) Ek thermometer ka reading 40ยฐC = data; "aaj heat-wave ka alert hai" = information.
Basis
Data
Information
Meaning
Raw facts, no meaning alone
Processed data, has meaning
Form
Unorganised, scattered
Organised, structured
Use
Input for processing
Output, used in decision making
Dependency
Independent (data apne aap me poora)
Depends on data (data ke bina possible nahi)
Example
85, 90, 78 (marks)
Class average = 84.3%
Representation
Numbers, text, images, audio, video โ kisi bhi form me
Types of Data (structured, semi-structured, unstructured)
Data is not always plain numbers in neat columns. Depending on how well it is organised, data is classified into three types โ and modern systems handle all three together.
Type
Meaning
Format / Structure
Examples
How it is stored
Structured data
Well-organised data that fits neatly into rows and columns
Fixed schema (fields, types, length defined)
Student roll no, marks, fees, bank transactions, attendance registers
File systems, cloud buckets (S3), data lakes โ search mushkil, storage bahut bada
Exam point: Digital information can be structured, semi-structured or unstructured (for example, tables, JSON and images/text). Avoid relying on a changing global percentage. Isliye DBMS ko structured data ke saath-saath semi-structured (JSON) aur unstructured (media) data bhi sambhalna padta hai โ isi need se NoSQL databases (MongoDB, Cassandra) popular hue. Examiner "types of data" poochhe to 3 types + ek-ek example + storage likhna complete-answer structure hai.
DIKW Model (Data โ Information โ Knowledge โ Wisdom)
The DIKW model explains how raw readings climb up to good decisions. Each higher level requires one more step of processing and judgement.
Level
Question it answers
Temperature example
College example
Data
Kya likha hai? (what)
40 (just a number)
85, 90, 78, 33
Information
Iska matlab kya? (what + context)
"Aaj ka temperature 40ยฐC hai."
"Class average 72% hai, aur 33 fail hua."
Knowledge
Isse hum kya samajhte hain? (how)
"40ยฐC me heatstroke ka risk hota hai, zyada paani peena chahiye."
"Maths me weak students ki weekly test beech me rakhne se attendance kam hoti hai."
Wisdom
Ab kya karna chahiye? (why/decision)
"Isliye school me afternoon assembly hataani chahiye."
"Isliye remedial classes 8 AM ke bajaye 11 AM shift karo โ result improve hoga."
Common mistake: Sirf numbers ki list ko "information" likh dena. Rules to remember: (a) context/hawa-paani ke bina koi number information nahi banta; (b) same data se alag information nikal sakti hai (same marks se "topper kaun" bhi aur "fail kitne" bhi); (c) ek user ki information doosre user ke liye data ban sakti hai (e.g., monthly sales report โ CEO ke liye data jab wo yearly trend banaye).
Qualities of Good Information
Information ki value uski quality par depend karti hai. Exam me "qualities of good information" ka chhota question aa sakta hai โ 6โ8 points yaad rakho.
#
Quality
Meaning
Example / counter-example
1
Accuracy
Correct aur error-free honi chahiye
"Aapka balance โน5,000 hai" โ agar actually โน4,500 hai to decision galat
2
Timeliness
Right time par mile โ late information useless ho jaati hai
Stock market ka price 1 ghante late = nuksaan
3
Relevance
Jis kaam ke liye chahiye, usi se related ho
Placement cell ko CGPA chahiye, favourite colour nahi
4
Completeness
Saara zaroori hissa shamil ho
Marksheet me practical ke marks missing = adhoori information
5
Clarity
Simple, unambiguous, sahi format me
Chart/table me dikhana, dense paragraph nahi
6
Cost-effectiveness
Information nikalne ka kharcha uske fayde se kam ho
โน50,000 lagakar โน10,000 ka fayda = bekaar
7
Verifiability / Reliability
Source trusted ho, cross-check ho sake
Aadhaar/census data vs WhatsApp forward ๐
8
Accessibility
Zaroorat wale user ko authorised tarike se mil sake (secure ho)
Password-protected portal, sirf concerned staff ko access
Worked example (data โ information): A teacher holds five raw marks โ 85, 90, 78, 33, 95. Steps: (1) Total = 85 + 90 + 78 + 33 + 95 = 381. (2) Average = 381 รท 5 = 76.2%. (3) Highest = 95, lowest = 33. (4) Count failed (< 40) = 1. Ab ye chaar nishkarsh โ average, topper, weakest, fail count โ information hain, kyunki inse teacher decide kar sakta hai ki remedial class kisko chahiye. Same 5 numbers = data; inke results = information. ๐งฎ
Exam tip: Agar question "data aur information me difference" ka ho (5 marks), to pehle 2-line definition dono ki likho, phir minimum 5 points ka table (meaning, form, use, dependency, example), aur end me DIKW ka 4-step example (40ยฐC wala) likh do โ examiner turant impressed. ๐
1.2 Information Processing Cycle
The Information Processing Cycle (IPOS) is the sequence a computer follows: Input โ Process โ Output โ Storage. (Some books add a fifth step, Communication, because data now routinely travels between machines.) Every task on a computer โ from adding two numbers to training an AI model โ is some repetition of this cycle.
Hinglish: Computer ka poora kaam isi 4-step cycle me ghoomta rehta hai. Jaise chai banane ka cycle: samagri lao (input) โ gas pe pakao (process) โ cup me serve karo (output) โ leftover fridge me rakho (storage). Cycle ruk nahi jaata โ output aage ka input ban jaata hai.
Stage
Kaam
Typical devices / parts involved
UPI payment example
1. Input
Data aur instructions ko system me le jaana; unhe machine-readable form me convert karna
"Payment Successful โ โน500 sent to Rahul" screen par dikha = output
4. Storage
Data/result ko baad ke liye save rakhna โ permanent ya temporary
HDD, SSD, pen drive, cloud, database server (RAM = temporary working storage)
Transaction ki entry history me save ho gayi, receipt bhi = storage
5. Communicationoptional 5th
Result ko doosri machine/user tak network ke through bhejna
NIC, Wi-Fi, router, internet (TCP/IP), email/SMS gateway
Merchant ko notification, aapke phone pe SMS, bank ke core system me entry = communication
Real life (UPI payment, step by step): Aapne โน500 ka amount aur PIN diya = input; bank server ne balance check kiya, kat gaya = process; "Payment Successful" dikha = output; transaction history me entry save = storage; merchant app aur SMS ko message bhejna = communication. Poora kaam ~2 second me! Isi tarah IRCTC ticket booking, ATM cash withdrawal, Zomato order โ sab IPOS ke hi variations hain.
Worked example (Excel marksheet): (1) Lab assistant ne students ke marks Excel me type kiye โ input. (2) Formulas =SUM(B2:F2), =AVERAGE(B2:F2), =IF(G2>=40,"Pass","Fail") chal gaye โ processing. (3) Screen par total, percentage aur PASS/FAIL dikha, printer se marksheet nikli โ output. (4) File marksheet.xlsx save hui aur cloud par backup gaya โ storage. (5) File HOD ko email/WhatsApp par bheji โ communication. Bas โ ek cycle complete! ๐งฎ
GIGO ka connection: Cycle ka pehla stage sabse important hai. Agar input galat (roll no. galat, marks typo), to processing bilkul sahi chalega par output bhi galat hi aayega โ "Garbage In, Garbage Out". Isliye real systems me input validation (range check, format check, mandatory fields) lagti hai. Computer input ki galti khud nahi sudharta โ wo sirf instruction follow karta hai.
Block diagram of the Information Processing Cycle
โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ 1. INPUT โ โ 2. PROCESS โ โ 3. OUTPUT โ โ 4. COMMU- โ
โ keyboard โ โ CPU (ALU+CU) โ โ monitor โ โ NICATION โ
โ scanner,mic โ โ RAM me data โ โ printer,spe- โ โ network card โ
โ camera โ โ + program โ โ aker โ โ internet โ
โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ data & instructions โ result โ report โ messages
โผ โผ โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STORAGE (HDD / SSD / pen drive / cloud / database) โ
โ input data, intermediate results aur final output โ sab save hota haiโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
(Ek cycle ka OUTPUT aksar agle cycle ka INPUT ban jaata hai โ isliye "cycle" ๐)
Exam one-liners: โข IPOS = Input, Process, Output, Storage. โข Processing CPU me hota hai (ALU calculation, CU control). โข RAM = temporary storage during processing; HDD/SSD = permanent storage. โข Input validation errors are the biggest real cause of wrong output (GIGO). โข Same cycle: ATM (card+amount โ verify debit โ cash+SMS โ log), online exam (answers โ evaluate โ result โ database).
1.3 Introduction to Computers
A computer is an electronic device that accepts data as input, processes it according to a set of instructions called a program, stores it, and produces information as output. It works at extremely high speed, never gets tired, and follows instructions exactly โ but it has no intelligence of its own.
Hinglish: Computer ek electronic naukar hai ๐ โ jo bolega wahi karega, bas tez aur galti ke bina. Khud kuch nahi sochega โ isliye "intelligence" wala kaam user ka (ya programmer ka), "execution" wala computer ka.
Real life: Jab aap phone par face-unlock karte ho (input: camera image, process: face matching, output: lock khul gaya, storage: log), jab ATM cash deta hai, jab Swiggy order ETA batata hai, jab college ka ERP attendance lagata hai โ har jagah wahi ek computer ka basic model kaam kar raha hai. Aaj duniya me computer sirf laptop/desktop nahi โ washing machine, car, drone, smart TV, smartwatch sabke andar computer (microcontroller) baitha hai.
Note (full form): "COMPUTER" ka full form "Commonly Operated Machine Particularly Used for Technological and Educational Research" โ ye backronym hai (baad me banaya gaya). Asli word Latin "computare" (to calculate) se aaya hai. Exam me definition likhna, full form ratna optional. GIGO (Garbage In, Garbage Out) is a useful concept to understand.
Characteristics of a Computer
Feature
Meaning
Real-life proof
Speed
Lakhs of instructions per second (MIPS); aaj ke processors billions of cycles per second (GHz)
Google 1 second me lakhs of results
Accuracy
High accuracy when input, program and hardware are correct; errors can still arise from software, data, hardware or operation
UPI me paisa exact kat ta hai
Diligence
Nahi thakta, same kaam baar-baar bina bore huye karta hai
ATM 24ร7 cash deta hai
Versatility
Ek hi machine, kai kaam (typing, video, coding, editing)
Smartphone = camera + calculator + bank + classroom
Storage
Huge data store kar sakta hai aur turant wapas nikaal sakta hai
Ek pen drive me 5,000 photos; data centre me crores of records
Automation
Ek baar program likho, kaam khud chalne lagta hai (no manual step)
Traffic light automatic chalti hai
No IQ / No feelings
Khud soch nahi sakta, emotions nahi, apni galti mahsoos nahi karta
Computer galti ki maafi nahi maangta ๐
Economical
Kaam sasta padta hai, roz ka kharcha kam, ek machine kai logon ka kaam
1 computer = 100 files ka kaam
Reliability / Consistency
Same input, same output โ har baar. Boredom ki wajah se quality nahi girti
Bank statement ka total har baar same nikalta hai
Power of remembering
Data saalon tak store aur recall kar sakta hai (database ka power)
Aadhaar se 10 saal purana record turant
Yaad rakhne ka trick โ "Speedy Aunty Daily Vegetables Store Aur Namak Eye-saving": S peedy = Speed, A unty = Accuracy, D aily = Diligence, V egetables = Versatility, S tore = Storage, A ur = Automation, N amak = No IQ, E ye-saving = Economical. 8 characteristics โ bas yaad! (Aage "Reliability aur Remembering" add karna ho to "R" ko relax ๐).
Limitations: Koi self-intelligence nahi (khud decision nahi le sakta), emotions/feelings nahi, bijli ya battery ke bina kuch nahi, GIGO (galat input โ galat output), ek baar program galat likha to galat result dega (computer sahi ya galat nahi sochta), aur human-level creativity/judgement nahi. Isliye aaj bhi decisions ke final step me insaan hi hota hai โ computer sirf "fast clerk" hai, "boss" nahi. ๐จโ๐ซ
1.4 Evolution and History of Computers
The history of computers is a story of one goal: calculate faster, store more, and make the machine smaller and cheaper. It starts with simple counting aids (abacus), moves through mechanical calculators, then electro-mechanical machines, and finally reaches electronic computers (vacuum tubes โ transistors โ ICs โ microprocessors โ AI-powered systems).
Year
Invention
Inventor
Key point (yaad rakhne wali baat)
~3000 BC
Abacus
Babylonians/Chinese
World ka pehla counting device (ginti ki machine); aaj bhi shops me dekho ๐
1614
Napier's Bones
John Napier
Multiplication ke liye; logarithm ke inventor bhi
1622
Slide Rule
William Oughtred
Calculator ka ancestor; ~300 saal tak engineers ka main tool
1642
Pascaline
Blaise Pascal
First mechanical calculator (add/subtract); aage chalkar Pascal programming language ka naam isi se
1671
Stepped Reckoner
Gottfried Leibniz
Multiply + divide bhi kar sakta tha; binary system idea (0 aur 1)
1801
Jacquard Loom
Joseph Jacquard
Punch cards โ data storage aur machine instructions ka pehla idea
1822/1837
Difference Engine / Analytical Engine
Charles Babbage
Father of Computer. Analytical engine = pehla programmable computer ka design (ALU, memory, I/O sab socha)
1843
First Computer Program
Ada Lovelace
First Programmer (world ki pehli programmer, female) ๐ฉโ๐ป; notes me loop ka idea bhi diya
1890
Tabulator (punch card machine)
Herman Hollerith
US Census ke liye; uski company aage chal kar IBM bani
1936
Turing Machine (concept)
Alan Turing
Theoretical model of computation โ aaj ke "computable kya hai" ka base; AI ka father bhi
1937โ44
ABC, Harvard Mark I
Atanasoff-Berry, Howard Aiken
Electro-mechanical computers
1946
ENIAC
Eckert & Mauchly
First general-purpose electronic computer; ~18,000 vacuum tubes, 30 ton, 150 kW โ 167 mยฒ room bhar
1947
Transistor
Bardeen, Brattain, Shockley (Bell Labs)
Vacuum tube ki jagah transistor โ computer chhota, sasta, reliable; 2nd generation ki shuruaat
1949
EDVAC / EDSAC
von Neumann
Stored Program Concept โ program bhi memory me hi rahega (instruction aur data ek hi jagah)
1951
UNIVAC I
Eckert & Mauchly
First commercial computer (business ke liye becha gaya)
1958
Integrated Circuit (IC)
Jack Kilby, Robert Noyce
Ek chip par kai transistors โ 3rd generation, machines aur chhoti
1971
Intel 4004 (Microprocessor)
Intel (Ted Hoff)
"Computer on a chip" โ 4th generation ka darwaza khola
1975
Altair 8800
MITS
Pehla popular personal computer kit; Bill Gates/Paul Allen ka BASIC yahin bech se shuru hua
1981
IBM PC
IBM
Personal Computer ka revolution โ ghar-ghar computer
1984
Apple Macintosh
Apple
GUI + mouse ko popular banaya
1989โ91
World Wide Web
Tim Berners-Lee (CERN)
Internet par websites ka system โ duniya ek "click" ki doori par
2007+
Smartphones
Apple (iPhone), Google (Android)
Jeb me computer โ ~500 crore users
2010sโpresent
Cloud, AI/ML, quantum research
Google, OpenAI, IBM & others
Computing ab "service" ban gayi: ChatGPT, cloud, self-driving research
Generations of Computers
History ko samajhne ka sabse easy tarika generations hai โ har generation ka main technology alag, aur machine poori badal jaati hai.
Gen
Period
Main Technology
Memory
Language / OS
Examples
1st
1940โ56
Vacuum tubes
Punch cards, magnetic drums
Machine language (0/1)
ENIAC, EDVAC, UNIVAC
2nd
1956โ63
Transistors
Magnetic core
Assembly, FORTRAN, COBOL
IBM 1401, IBM 7094
3rd
1964โ71
Integrated Circuits (IC)
Magnetic disk
High-level languages, OS came
IBM 360, ICL 1900
4th
1971โ80
Microprocessor / VLSI
Semiconductor memory (chips)
GUI, PC software
IBM PC, Apple II/Macintosh
5th
1980โpresent
ULSI + AI, parallel processing
Flash, cloud
AI, voice recognition, machine learning
Smartphones, laptops, supercomputers, ChatGPT-type AI
Worked comparison (kitna chhota hua?): 1946 ka ENIAC vs 2026 ka smartphone โ ๐งฎ Weight: 30,000 kg โ ~0.2 kg (~1,50,000ร halka). Power: 150,000 W โ ~10 W (~15,000ร kam bijli). Speed: ~5,000 additions/second โ billions of operations/second (lakhs of guna tez). Memory: ~few KB โ 128โ512 GB. Area: ~167 mยฒ โ jeb me. Ek hi generation gap me "poora kamra" "jeb" me aa gaya โ isi ko Moore's Law ka kamaal kehte hain (chip par transistors lagbhag har 2 saal me double).
๐ 5 facts jo MCQ me may be useful to practise hain: (1) Babbage = Father of Computer. (2) Ada Lovelace = First Programmer. (3) ENIAC (1946) = First electronic general-purpose computer. (4) UNIVAC (1951) = First commercial computer. (5) EDVAC = Stored Program Concept. Bonus: IBM ka janm Hollerith ki tabulator company se; "computer" word pehle ek person ke liye use hota tha jo calculation karta tha ๐ฒ.
Exam tip: "Short note on evolution/generations of computers" ka answer is format me likho โ (a) 2-line intro, (b) generation-wise table (technology, examples, 1 advantage, 1 limitation), (c) closing line: "har generation ne speed badhayi, size ghataaya, cost kam ki". Table + 3 bullet lines = a clear answer structure; follow the questionโs requested depth.
1.5 Types of Computers (by data & by size)
Computers ko do tarah se classify karte hain โ (A) kaam karne ke tarike se (which type of data they handle: analog, digital, hybrid) aur (B) size aur power ke hisaab se (micro, mini, mainframe, super). Ye dono classification exam me alag-alag poochhe jaate hain โ inhe mix na karo.
Continuous signal, infinite values possible, measurement-based, low accuracy, no memory/programmability in the digital sense, simple and cheap
Thermometer, analog clock, speedometer, old weighing scale, ECG graph (continuous waveform), mercury barometer
Digital
Discrete data (0/1) pe kaam; accurate results, aaj ka sab computers
Discrete values, high accuracy, programmable, memory + storage, logical decisions, outputs can be copied without loss
Laptop, calculator, smartphone, digital watch, digital camera, ATM
Hybrid
Dono ka mix โ analog input ko digital me convert (ADC) karke fast process, aur zaroorat par wapas analog (DAC)
Best of both: analog signals ko samajhta hai + digital accuracy se calculate karta hai
ECG machine, ICU ventilator, petrol pump machine (petrol flow analog + amount digital), hybrid car, digital thermostat, MRI machines
Basis
Analog computer
Digital computer
Hybrid computer
Signal
Continuous (smooth curve)
Discrete (0/1)
Analog in โ converted โ digital process
Accuracy
Kam (readings approximate)
Bahut zyada (exact)
High (conversion ke baad digital)
Speed
Real-time, turant (physical process jaisa hi)
Bahut fast calculation
Real-time input + fast digital processing
Memory / storage
Practically nahi
Haan โ RAM/HDD/cloud
Input analog, storage digital
Programmability
Nahi (fixed circuit se kaam)
Haan (program badlo, kaam badal jaayega)
Haan, digital hissa programmable
Cost & maintenance
Sada, sasta, kam precise
Generally mehnga, par versatile
Sabse mehnga (ADC/DAC + processor)
Where used
Measurement/indicating devices
Har jagah โ ghar, office, industry, AI
Medical, industry, robotics, aerospace
Trick (A-D-H):Analog = "smooth line" ๐ (temperature graph), Digital = "0/1 wala" ๐ข (calculator), Hybrid = "dono ka rishta" ๐ค (ICU machine โ patient ki dhadkan continuous padhta hai, par display digital number me). Exam me "hybrid" ka best example: ICU ventilator / ECG machine / petrol pump.
B) Size aur power ke hisaab se
Type
Size & users
Speed / cost
Examples
Detail
Microcomputer (PC)
Ek user, table/jeb me
Kam cost (โน20,000 se shuru)
Laptop, desktop, tablet, smartphone
Unit 2 ยง2.1 me full detail
Minicomputer (mid-range)
10โ100 users (ek chhota organisation)
Medium cost
Departmental server, lab server
Unit 2 ยง2.1 me full detail
Mainframe
Hazaaron users ek saath
High cost, 24ร7 reliable
IRCTC, bank core system, IBM zSeries
Unit 2 ยง2.1 me full detail
Supercomputer
Research organisations, government
Sabse tez, sabse mehnga
PARAM, Pratyush, Frontier
Unit 2 ยง2.1 me full detail
Ek line me farak: Analog = "measure" karta hai, Digital = "count & calculate" karta hai, Hybrid = "measure karke calculate" karta hai. โ
1.6 Basic Organization of a Digital Computer (von Neumann Architecture)
A computer has five basic units: Input Unit, Memory Unit, Arithmetic Logic Unit (ALU), Control Unit (CU), Output Unit. ALU + CU + Registers = CPU (Central Processing Unit). Ye 5 units buses (data bus, address bus, control bus) se jude hote hain, aur sab milkar "stored program" wala model banate hain jise von Neumann architecture kehte hain.
Five units โ kaam kya hai
Unit
Kaam
Examples / parts
Input Unit
Bahar ki duniya se data + instructions lena aur unhe 0/1 form me convert karke system me daalna
Commands aur status signals โ read, write, interrupt, clock, reset
Mostly CPU se, kuch signals wapas
1 bit per signal line
"Read karo", "Write karo", "Ready ho?"
Hinglish โ kitchen analogy ๐ณ: Input unit = samagri laane wala; Memory = fridge (cheezein rakhne ki jagah); ALU = kadhai/tawa (yahan actual kaam โ kaatna, pakana); CU = chef ka dimaag (kaun kab kya kare, wahi decide karta hai); Output = banaya hua khana. Bus = sab ke beech cheezein pahunchane wala waiter.
Stored Program Concept (von Neumann)
Program aur data dono ek hi memory me store hote hain; CPU memory se instruction laata hai, decode karta hai, execute karta hai. Isi idea ne modern computer banaya โ pehle machines ko wire badal kar reprogram karna padta tha (jaise ENIAC ke plugboards). Ab sirf naya program memory me load karo, machine ka behaviour badal jaata hai. Aaj tak ke computers "von Neumann architecture" follow karte hain โ bas performance features (cache, pipelining) add hue hain.
Advantage of von Neumann model
Limitation
Program badalne ke liye hardware nahi badalna padta โ sirf naya program load karo
von Neumann bottleneck โ data aur instructions ek hi bus/memory se aate hain, isliye CPU apni speed ka poora use nahi kar paata
Simple design, sasta, general-purpose (har type ka kaam ek hi machine se)
Instruction fetch aur data fetch ke beech "traffic jam" โ isliye cache aur separate instruction/data cache lagti hai
Code aur data ek jagah โ compilers, loaders, OS sab easy ho jaate hain
Security issue: malicious program data ki jagah code likh sakta hai (virus/worm attacks ka base)
Exam answer (10 marks) ka format: Diagram (5 units + buses) โ ek-ek unit ki 2 line โ bus table โ stored program concept ki definition โ von Neumann bottleneck. This is a useful syllabus-based long-answer practice prompt; actual papers may vary. ๐ฏ
1.7 Number Systems High-yield syllabus topic
A number system is a way to represent numbers using a set of digits and a base (radix). Computer me 4 systems use hote hain: Binary (base 2), Octal (8), Decimal (10), Hexadecimal (16). Base batata hai ki kitne digits allowed hain โ aur rightmost digit ka weight hamesha baseโฐ = 1 hota hai.
System
Base
Digits used
Kaha use hota hai
Binary
2
0, 1
Computer ka andar ka sab kuch (transistor on/off)
Octal
8
0โ7
Binary ka short form (Unix file permissions: 755)
Decimal
10
0โ9
Humara roz ka hisaab
Hexadecimal
16
0โ9, AโF (A=10 ... F=15)
Colors (#FF5733), memory addresses, MAC address
Yaad rakhne wala table (0โ15) โ isse har conversion fast ho jaata hai:
Decimal
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Binary
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
Octal
0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
Hex
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
Conversion Methods (step-by-step, exam me aise likho)
1) Decimal โ Binary (2 se baar-baar divide karo; remainders ulta likho โ bottom to top):
Common mistake: Addition me carry ko bhool jaana, aur binary me "1+1=2" likh dena. Yaad rakho โ binary me digit 2 exist hi nahi karta; 1+1 = 10 (zero likho, ek carry). Subtraction me borrow "1" nahi "2" hota hai (binary column ka value 2 hai). ๐งฎ
Signed Numbers & 2's Complement important
Negative numbers represent karne ke 3 tarike hain: Sign-Magnitude (pehla bit sign: 0=+, 1=โ, baaki 7 bit magnitude), 1's Complement (saare bits ulto), 2's Complement (= 1's complement + 1). Computer 2's complement use karta hai kyunki isme subtraction ko addition se kar sakte hain โ isliye CPU ko alag "subtract circuit" ki zaroorat nahi padti, aur -0 jaisa confusion bhi nahi hota.
'A' = 65, 'a' = 97, '0' = 48, space = 32, Enter = 13
Text files, keyboards, programming (C me char ASCII hi hai)
EBCDIC
8-bit IBM mainframe code
Different ordering from ASCII
Purane IBM mainframes, banking systems
Unicode / UTF-8
Modern universal code โ har language, symbol aur emoji ka unique number
'โน' = U+20B9, '๐' = U+1F600, 'โฌ' = U+20AC
Aaj ki har website/app โ isi notes file me bhi Hindi/emoji Unicode se likhe hain
Hinglish: Bit = 0 ya 1 (sabse chhoti iit ๐งฑ), Nibble = 4 bits (1 hex digit), Byte = 8 bits (1 character, jaise 'A'). 1 KB = 1024 bytes, 1 MB = 1024 KB โ aur haan, "billion bytes ki hard disk" wale thoda kam dikhate hain kyunki companies 1000 count karti hain ๐ (ye classic exam question hai โ Unit 2 me detail).
Core conversion methods to practise: decimalโbinary, binaryโoctal, binaryโhex, aur 2's complement me negative number likhna + subtraction. Steps dikhana mandatory hai โ sirf answer likhne se partial credit. Aur 2's complement wala method table banake likho (upar wala style). โ
Speed trick: Hex/Octal ke liye pehle 0โ15 ka table yaad kar lo (bit groups ke saath) โ phir binaryโhex me ek second lagega. Aur decimalโbinary ke liye 8, 4, 2, 1 wale weights yaad rakho: 25 = 16+8+1 = 11001 โ division se bhi fast! โก
Number system practice set (solutions ke saath) Exam practice
These 10 problems practise core conversion skills; the actual paper may differ โ khud likh kar solve karo, phir solution se milao.
Practice karne ka tareeka: Roz 3 problems likho โ (a) ek decimalโbinary, (b) ek binaryโoctal/hex, (c) ek 2's complement subtraction. Ek hafte me ye topic "set" ho jaayega aur exam me a study routine that builds fluency; the PDF does not state unit-wise question weighting. โฑ๏ธ
Number system MCQs (answers neeche)
Binary number system ki base kya hai? (a) 2 (b) 8 (c) 10 (d) 16
Boolean algebra is the algebra of logic in which variables can have only two values: 0 (False) or 1 (True). Iske operators AND, OR, NOT computers ke circuits design karne me use hote hain. (Invented by George Boole, 1854 โ 90 saal baad Claude Shannon ne dikhaya ki yahi algebra electronic circuits par lagti hai, isliye aaj har chip isi par chalti hai.)
Hinglish: Jaise normal maths me numbers hote hain, vaise Boolean me sirf "haan/nahi" hote hain. Jaise ghar ka rule: "Paisa HAI AND time HAI, tabhi movie jaayenge" โ dono true hone chahiye. Ek bhi false โ plan cancel. ๐
Basic Operators with Truth Tables (0=Low/False, 1=High/True)
NOT (ยฌA, A') โ inverter
AND (AยทB, AโงB) โ "dono chahiye"
OR (A+B, AโจB) โ "koi ek kaafi hai"
A
Y = A'
A
B
Y = AยทB
A
B
Y = A+B
0
1
0
0
0
0
0
0
1
0
0
1
0
0
1
1
โ
โ
1
0
0
1
0
1
โ
โ
1
1
1
1
1
1
Aur ek useful derived truth table (NAND, NOR, XOR, XNOR) โ ye 4 har exam me kisi na kisi form me aate hain:
A
B
NAND (ยฌ(AยทB))
NOR (ยฌ(A+B))
XOR (AโB) โ alag-alag hone par 1
XNOR โ barabar hone par 1
0
0
1
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
1
0
0
0
1
Yaad rakho: AND = "dono chahiye" (donation), OR = "koi ek kaafi hai" (sarkari scheme ๐), NOT = "ultha kar do", XOR = "bilkul alag ho to haan" (odd-one detector), XNOR = "same ho to haan" (equality checker). NAND aur NOR universal gates hain โ inse baaki sab gates (NOT, AND, OR) bana sakte ho.
Logic Gates & Symbols
Gate
Boolean expression
Output 1 kab hota hai
Real-life use
NOT
Y = A'
Input 0 ho to
Inverter, signal ulta karna
AND
Y = AยทB
Dono inputs 1 ho
Bank locker (do chaabi), "username AND password sahi"
OR
Y = A+B
Koi ek (ya dono) input 1 ho
Ghar ki bell (front door OR back door button)
NAND
Y = (AยทB)'
Koi ek input 0 ho
Universal gate โ chips me sabse zyada use (fast + sasta)
NOR
Y = (A+B)'
Dono inputs 0 ho
Universal gate, memory circuits
XOR
Y = AโB
Inputs alag ho (Aโ B)
Adder ka sum bit, parity check, encryption
XNOR
Y = (AโB)'
Inputs same ho (A=B)
Equality comparator (password match check)
Gate symbols (as drawn in exams):
A โโโทoโโ Y A โโโ
NOT (inverter) B โโโDโโ Y AND (D-shape)
A โโโฒ
B โโโฑโโ Y A โโโฒ
OR (shield shape) B โโโฑโoโ Y NOR (OR + small circle)
A โโโ
B โโโDโโoโโ Y NAND (AND + small circle)
A โโโฒ
B โโโฑโ)โโ Y XOR (OR with extra curved line)
Universal Gates โ NAND se sab kuch
NOT using NAND: tie dono inputs: A โโโฌโโNANDโโ Y = (AยทA)' = A'
A โโโ
AND using NAND: A โโNANDโโoโโโโNANDโโ Y = ((AยทB)')' = AยทB
B โโโ โโโ (dono input same signal)
(do NAND: pehla NAND = (AB)', doosra NAND = inverter)
OR using NAND: A โโNAND(o)โโโ
A โโNAND(o)โโโค NAND โโ Y = (A'ยทB')' = A + B (De Morgan!)
B โโNAND(o)โโโค
B โโNAND(o)โโโ
(inputs ko pehle invert karo, phir NAND)
XOR using NAND: A โโโฌNANDโโโ
B โโโ โโโ NAND โโ (Aยท(AB)')' = A โ B (4 NAND gates chahiye)
A โโโโโโโโโโโค
B โโโโโโโโโโโ
Laws of Boolean Algebra
Law
AND form
OR form
Identity
Aยท1 = A
A+0 = A
Null / Domination
Aยท0 = 0
A+1 = 1
Idempotent
AยทA = A
A+A = A
Complement
AยทA' = 0
A+A' = 1
Double negation
(A')' = A
Commutative
AยทB = BยทA
A+B = B+A
Associative
(AยทB)ยทC = Aยท(BยทC)
(A+B)+C = A+(B+C)
Distributive
Aยท(B+C) = AยทB + AยทC
A+(BยทC) = (A+B)ยท(A+C)
Absorption
Aยท(A+B) = A
A+(AยทB) = A
De Morgan's Theorem 1
(AยทB)' = A' + B' (AND ka NOT = NOT ka OR)
De Morgan's Theorem 2
(A+B)' = A' ยท B' (OR ka NOT = NOT ka AND)
Worked example โ De Morgan ko truth table se verify karo (exam me aise likho):
A
B
AยทB
(AยทB)'
A'
B'
A' + B'
0
0
0
1
1
1
1
0
1
0
1
1
0
1
1
0
0
1
0
1
1
1
1
1
0
0
0
0
Dono last columns โ (AยทB)' aur A'+B' โ bilkul same hain โ Theorem 1 verified โ. Isi tarah A=0011, B=0101 leke (A+B)' aur A'ยทB' nikaal kar Theorem 2 verify hota hai (dono columns same aa jaate hain).
Worked example โ boolean expression simplify karo:F = AยทB + AยทB'
Step 1: common A bahar nikalo (distributive law): F = Aยท(B + B')
Step 2: B + B' = 1 (complement law): F = Aยท1
Step 3: Aยท1 = A (identity law) โ F = A โ
Another: F = A + A'ยทB
Step 1: A + A'ยทB = (A + A')ยท(A + B) [distributive form] = 1ยท(A+B) = A + B โ
De Morgan applied: F = (AยทB + C)' = (AยทB)' ยท C' = (A' + B')ยทC' โ Exam me in steps ko likhna hi "proof/simplification" ke marks dilata hai โ sirf final answer se marks kat jaate hain.
Real life: (1) Google search me laptop AND under 50000 ya tea OR coffee โ yahi Boolean logic. (2) Bank locker: "Aapki chaabi AND manager ki chaabi" โ AND gate ka real example. (3) Ghar ki bell jo kisi ek button dabane par bajti hai (front door OR back door) โ OR gate. (4) Password check: "username sahi AND password sahi" = login. (5) 2's complement adder me XOR gates hi sum calculate karte hain (AโB = sum bit, carry AND se). (6) Metro gate: "ticket valid AND gate sensor clear" โ tabhi khulega. ๐
Quick revision (MCQ): Universal gates = NAND, NOR โข XOR ka output 1 jab inputs alag ho โข (AยทB)' = A' + B' โข Boolean variable ke sirf 2 values (0/1) โข Boolean algebra ke inventor = George Boole (1854) โข 2-input NAND gate se 4 types ke gates bana sakte ho.
Boolean algebra practice set (solutions ke saath)
Q1. Simplify: F = AยทB + AยทB'
= Aยท(B + B') (distributive law)
= Aยท1 (complement law: B+B' = 1)
= A โ (identity law)
Q2. Simplify: F = (A + B)ยท(A + B')
= A + (BยทB') (distributive law: (A+B)(A+C) = A + BC)
= A + 0
= A โ
Q3. Simplify: F = A'B + AB + AB'
= B(A' + A) + AB' (pehle 2 terms me B common)
= Bยท1 + AB'
= B + AB'
= B + A (absorption: X + X'Y = X + Y โ B + B'A = B + A) โ
=> F = A + B (yani OR gate hi kaafi hai!)
Q4. De Morgan se simplify: F = (AยทB + C)'
= (AยทB)' ยท C' (De Morgan 2: (X+Y)' = X'ยทY')
= (A' + B') ยท C' (De Morgan 1: (AยทB)' = A'+B') โ
Q5. Truth table se verify: A โ B = A'B + AB'
(A=0,B=0): A'B=0, AB'=0 โ 0 | (A=0,B=1): 1 + 0 = 1
(A=1,B=0): 0 + 1 = 1 | (A=1,B=1): 0 + 0 = 0
=> XOR ka output sirf alag inputs par 1 โ verified โ
Q6. NAND se NOT, AND, OR banao (3 gate-level circuits)
NOT : dono inputs jodo โ (AยทA)' = A'
AND : NAND + NOT (do NAND gates)
OR : dono inputs ko pehle NOT karo, phir NAND โ (A'ยทB')' = A + B โ
Worked exam-style question: "Ek bank locker do chaabiyon se khulta hai โ ALU level par iska Boolean expression kya hoga?" โ Answer: L = Kโ ยท Kโ (AND gate) โ dono chaabi (1) hone par hi locker (1). Agar "ya koi ek chaabi se khule" hota to OR: L = Kโ + Kโ. Isi tarah: "student pass hoga agar marks โฅ 33 AND attendance โฅ 75" โ boolean: Pass = (M โฅ 33)ยท(A โฅ 75) โ yahi comparison ALU ke logic circuit me banta hai. ๐ฏ
1.9 Types of Software
Software is a set of programs, procedures and associated documentation that tells the hardware what to do. Hardware wo hai jo chhu sakte ho (physical); software wo hai jo chalate ho (instructions). Computer ke bina software = bekaar dher, aur software ke bina computer = plastic-metal ka box.
Hinglish: Hardware = body ๐ช, Software = dimaag ke instructions ๐. Ek mobile ka camera (hardware) achha ho par photo app (software) kharab โ to photo bhi kharab. Dono ka jodi hona zaroori hai.
System Software
Application Software
Computer ko chalane/manage karne ke liye
User ka specific kaam karne ke liye
User directly use nahi karta (background me chalta hai)
User directly use karta hai
Examples: OS (Windows/Linux), device drivers, language translators (compiler), utilities
Examples: MS Word, Tally, Chrome, WhatsApp, Games
Machine-dependent, complexity high
Generally machine-independent
Computer ke saath pre-installed ya baad me install
User apni zarurat se install karta hai
Size generally large, rarely uninstalled
Chhote-bade kai, kabhi bhi uninstall
Without it, computer start hi nahi hoga
Without it, computer chalega par kaam nahi hoga
Example proper: Windows 11, Linux kernel, printer driver
Example proper: MS Excel, Photoshop, Instagram, Tally
Utility Software (systems ka helper)
Utility software are small programs that maintain, secure and optimise the system โ ye "system software" ke parivaar ka hissa hain (OS ke saath aate hain ya alag se milte hain).
Firmware = ROM chip me fixed (pre-written) software, jaise BIOS/UEFI. Ye na aasani se badalta hai, na delete hota hai โ computer on hote hi hardware ko check karke OS load karne ki tayyari karta hai. (Isi liye "firmware update" ek official, careful process hota hai โ galat update se device "brick" ho sakta hai.)
Analogy ๐ซ: System software = school ka principal + staff (building chalate hain, systems sambhalte hain). Application software = subject teachers (padhaate hain โ specific kaam). Utility = chowkidaar, safai karmchari, plumber (maintenance). Firmware = school ki neev/niyam patrika (fixed).
Real life: Aapne naya laptop kharida โ usme Windows (system software) already tha. Aapne MS Word, games, WhatsApp Web install kiya (application software). Antivirus aur disk cleanup time-to-time chalate ho (utility). BIOS ne laptop on hote hi hardware check kiya (firmware). Aur jab aapne laptop se printer lagaya, us driver (system software) ne dono ko baat karna sikhaya. ๐
Software vs Hardware
Basis
Hardware
Software
Kya hai
Physical parts โ chhu sakte ho
Programs/instructions โ sirf chala sakte ho
Manufacture
Factory me assemble hota hai
Programmers likhte hain (develop karte hain)
Damage / wear
Purana hota hai, kharab ho sakta hai
Wear nahi hota, par corrupt ho sakta hai
Change karna
Replace ya upgrade karna padta hai (paisa lagta hai)
Update/patch se badal jaata hai (often free)
Dependency
Software ke bina bekaar
Hardware ke bina chal nahi sakta
Examples
CPU, RAM, keyboard, monitor
Windows, Chrome, MS Word, antivirus
1.10 Computer Languages & Translators
Level
Language
Form
Translator
Points
Low (1st gen)
Machine Language
Direct 0/1 binary code
Koi nahi (direct chalega)
Fastest execution, machine-dependent, likhna sabse mushkil, no portability
Low (2nd gen)
Assembly Language
Mnemonics: MOV A, B, ADD, SUB
Assembler
Machine-dependent but readable; embedded systems/drivers me use
High (3rd gen)
High-Level Language
English-like: C, C++, Java, Python
Compiler / Interpreter
Easy to learn, portable (same code chalega kisi bhi machine pe โ recompile), aaj sab yahi use
4th gen
4GL
SQL, report generators
DBMS engine
Kaam "kya chahiye" batate hain, "kaise" nahi โ non-programmer friendly
5th gen
5GL / AI
Prolog, AI tools
AI engine
Logic + constraint solving, AI applications
Extra points (exam me 1โ2 line add karna achha lagta hai): low-level languages hardware ke bahut kareeb hoti hain isliye fast aur memory-efficient, par har machine ke liye alag code likhna padta hai. High-level languages portable, readable aur maintainable hoti hain โ ek hi program Windows/Linux/Mac par (recompile karke) chalta hai. Isi liye aaj ka saara commercial software HLL me banta hai, aur sirf speed-critical hisse (drivers, kernel) assembly me.
Translators: Compiler vs Interpreter vs Assembler
Basis
Compiler
Interpreter
Assembler
Kaam
Poora HLL program ek saath machine code me translate
Ek line padhi โ translate โ execute, phir agli line
Assembly language โ machine code
Output
Object code / .exe file banti hai
Koi file nahi banti, direct run
Object code
Speed of execution
Fast (translation ek baar)
Slow (har baar translate hoga)
Fast
Error reporting
Saari errors ek saath list me (end me)
Pehli error par ruk jata hai, line-by-line
Line-by-line
Memory
Zyada chahiye (poora program + symbol table)
Kam chahiye
Kam chahiye
Debugging
Mushkil thoda (list dekh kar)
Aasan (ek-ek line par rukta hai)
Medium
Examples
C, C++ (Turbo C, gcc), Java (to bytecode)
Python, JavaScript (old BASIC)
MASM, NASM
Trick (Compiler vs Interpreter): Compiler = "poori kitaab ek saath Hindi me translate kar do" (ek baar me pura). Interpreter = "live lecturer jo sentence-by-sentence translate karke sunata jaaye" (line-by-line, aur galti pe wahin ruk jaaye). Isliye compiler wale program ka final run fast, aur interpreter wala development ke liye aasan. ๐
Program ke roop โ C program ka safar: Source code (HLL me likha, hello.c) โ Preprocessor (#include, #define expand) โ Compiler (C โ assembly, syntax errors yahin) โ Assembler (assembly โ object code hello.o) โ Linker (library code jodta hai, jaise printf) โ Loader (exe ko RAM me load karke run) โ Executable (.exe) โ CPU โ OUTPUT ๐
High-yield syllabus topic trap: "Compiler aur interpreter me difference (10 points)" โ table format me likho: translation process, output file, execution speed, error reporting, memory, examples. Aur yaad rakho: Java dono ka mix hai (compiler source โ bytecode banata hai, aur JVM bytecode ko interpret/compile karke chalati hai).
1.11 Planning a Computer Program โ Algorithm, Flowchart, Pseudocode
Coding se pehle programmer problem ko plan karta hai โ is planning ke teen tools hain: algorithm (steps in words), flowchart (steps in diagram), aur pseudocode (steps in English + programming keywords). Ye teeno "program design" ke tools hain, aur BCA ke exams me inpar 5โ10 marks ka question is an important practice topic.
Algorithm
An algorithm is a finite sequence of well-defined steps to solve a problem. (Writing code se pehle ki plan.) Algorithm ko kisi bhi language me code kiya ja sakta hai โ isliye "logical plan" sabse important hai.
Qualities (5): F initeness (steps khatam hone chahiye), D efiniteness (har step clear/unambiguous), I nput (0 ya zyada), O utput (kam se kam 1), E ffectiveness (har step doable). F-D-I-O-E = "FIDO Effectively" bhaunkta hai ๐ถ โ Finiteness, Input, Definiteness, Output, Effectiveness.
Examples โ likh kar yaad karo, exam me daigram ke saath aate hain:
Algo 1: Sum of two numbers Algo 2: Largest of two numbers
Step 1: Start Step 1: Start
Step 2: Read A, B Step 2: Read A, B
Step 3: SUM = A + B Step 3: If A > B then print "A is largest"
Step 4: Print SUM Step 4: Else print "B is largest"
Step 5: Stop Step 5: Stop
Algo 3: Even / Odd Algo 4: Factorial of N
Step 1: Start Step 1: Start
Step 2: Read N Step 2: Read N
Step 3: If (N mod 2 = 0) Step 3: F = 1, I = 1
print "Even" Step 4: While I <= N
else print "Odd" F = F * I
Step 4: Stop I = I + 1
Step 5: Print F
Step 6: Stop
Algo 5: Sum 1 to N (loop needed) Algo 6: Swap two numbers (with temp)
Step 1: Start Step 1: Start
Step 2: Read N Step 2: Read A, B
Step 3: S = 0, I = 1 Step 3: TEMP = A
Step 4: While I <= N A = B
S = S + I B = TEMP
I = I + 1 Step 4: Print A, B
Step 5: Print S Step 5: Stop
Step 6: Stop
Algo 7: Largest of three numbers Algo 8: Check prime
Step 1: Start Step 1: Start
Step 2: Read A, B, C Step 2: Read N
Step 3: If A > B and A > C Step 3: I = 2, FLAG = 0
print A Step 4: While I <= N/2
Step 4: Else if B > C If N mod I = 0 then FLAG = 1
print B break
Step 5: Else print C I = I + 1
Step 6: Stop Step 5: If FLAG = 0 print "Prime" else "Not Prime"
Step 6: Stop
Flowchart
A flowchart is a pictorial (diagram) representation of an algorithm. Steps ko standard symbols aur arrows se dikhate hain โ isliye logic ek nazar me samajh aata hai.
Symbol (shape)
Naam
Use
Oval / rounded rectangle (โฌญ)
Terminal
Start / Stop
Parallelogram (โฑ)
Input / Output
Read / Print (data lena-dena)
Rectangle (โญ)
Process
Calculation, assignment (SUM = A+B)
Diamond (โ)
Decision
Condition check (A > B?) โ Yes/No branches
Circle (โ)
Connector
Diagram ke parts jodna (A, B, 1, 2)
Arrow (โ)
Flow line
Direction of flow
Half-oval bottom (โฌ)
Document
Printed report / output on paper
Double-sided rectangle (โท)
Predefined process
Call to a function / subroutine
Cylinder (๐)
Magnetic disk / storage
Database / file me store karna
Example 1 โ Largest of two numbers (branches):
โโโโโโโโโโโโ
โ START โ (oval)
โโโโโโฌโโโโโโ
โผ
โโโโโโโโโโโโ
โ Read A,B โ (parallelogram)
โโโโโโฌโโโโโโ
โผ
โฑโฒ
โฑ โฒ A > B ? (diamond)
โฒ โฑ
โฒโฑ
Yes โ No
โโโโโโโดโโโโโโ
โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโ
โ Print โ โ Print โ
โ "A big" โ โ "B big" โ
โโโโโโฌโโโโโ โโโโโโฌโโโโโ
โโโโโโโฌโโโโโโโ
โผ
โโโโโโโโโโโโ
โ STOP โ
โโโโโโโโโโโโ
Example 2 โ Sum 1 to N (loop = diamond se wapas jaana):
START โโถ Read N โโถ S=0, I=1 โโถ โ I โค N? โโNoโโโถ Print S โโถ STOP
โYes
โผ
S = S + I, I = I + 1 โโ(wapas โ par)โโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Pseudocode
Pseudocode is a way to write an algorithm using English-like statements mixed with programming keywords (IF, WHILE, PRINT) โ kisi ek language ka strict syntax nahi hota, isliye ye language-independent plan hai. Ye code likhne se bilkul pehle ka step hai.
BEGIN BEGIN // factorial
READ A, B READ N
IF A > B THEN F = 1
PRINT "A is largest" FOR I = 1 TO N DO
ELSE F = F * I
PRINT "B is largest" END FOR
END IF PRINT F
END END
BEGIN // even/odd BEGIN // sum 1 to N
READ N READ N
IF N MOD 2 = 0 THEN S = 0
PRINT "Even" FOR I = 1 TO N DO
ELSE S = S + I
PRINT "Odd" END FOR
END IF PRINT S
END END
Algorithm vs Flowchart vs Pseudocode
Basis
Algorithm
Flowchart
Pseudocode
Form
Written steps (text)
Diagram (symbols)
Text + code keywords
Language
Simple English
Symbols/shapes
Mixed (English + keywords)
Coding se pehle
Yes (step 1)
Algorithm ke baad
Algorithm ke baad / parallel
Best for
Logic clarity
Visual understanding, debugging logic
Direct code me convert karna
Limitation
Bade problems me lamba ho jata hai
Chhota change = poora redraw
Standard format nahi
Exam me
"Write an algorithm" (steps likhne hain)
"Draw a flowchart" (symbols mandatory)
"Write pseudocode" (keywords chahiye)
Exam tip: "Write an algorithm and draw a flowchart" โ common questions: largest of 3 numbers, even/odd, prime check, sum of n numbers, area of circle, table of a number, swap two numbers. Roz 2 likho, 10 din me sab set. โ๏ธ Flowchart me START/STOP oval, I/O parallelogram, process rectangle, decision diamond โ symbol galat kiya to marks kat jaate hain!
Algorithm & flowchart practice set (solutions)
Q1. Sum of even numbers from 1 to N
Step 1: Start
Step 2: Read N
Step 3: S = 0, I = 2
Step 4: While I <= N
S = S + I
I = I + 2
Step 5: Print S
Step 6: Stop
(Flowchart me: diamond "I <= N?", Yes branch me process box S=S+I, I=I+2,
wapas diamond par; No branch me Print S โ STOP)
Q2. Table of a number N (1 se 10 tak)
Step 1: Start
Step 2: Read N
Step 3: I = 1
Step 4: While I <= 10
Print N ร I
I = I + 1
Step 5: Stop
Q3. Count digits of a number N (jaise 4567 me 4 digits)
Step 1: Start
Step 2: Read N, COUNT = 0
Step 3: While N > 0
N = N / 10 (integer division โ last digit hat gaya)
COUNT = COUNT + 1
Step 4: Print COUNT
Step 5: Stop
Q4. Smallest of three numbers (nested decision)
Step 1: Start
Step 2: Read A, B, C
Step 3: If A < B and A < C then print A
Step 4: Else if B < C then print B
Step 5: Else print C
Step 6: Stop
Q5. Print first N natural numbers
Step 1: Start
Step 2: Read N, I = 1
Step 3: While I <= N
Print I
I = I + 1
Step 4: Stop
Flowchart me students ke 3 common mistakes: (1) START/STOP ke liye rectangle lagana (oval chahiye). (2) Decision ka diamond round ya rectangle bana dena. (3) Loop me wapas jaane wala arrow bhoolna โ loop ka matlab hai "diamond se process, process se wapas diamond". Ye teen galtiyan sudhar lo, marks full. โ๏ธ
Unit 1 ke mixed MCQs (answers neeche)
Abacus kis kaam ke liye tha? (a) Multiply (b) Counting (c) Printing (d) Storage
"Father of Computer"? (a) Ada Lovelace (b) Hollerith (c) Charles Babbage (d) Pascal
Unit 1 practice-topic checklist (not a prediction): data vs information (5) โข characteristics of computer (5) โข generations (10) โข basic organization with diagram (10) โข conversions + 2's complement (5โ10) โข truth tables + De Morgan (5โ10) โข compiler vs interpreter (5) โข algorithm + flowchart (10) โข system vs application software (5) โข short notes: utility, firmware, translator, flowchart symbols (5ร2).
Unit 1 โ key terms glossary (MCQ ke liye)
Term
Ek line me
Data
Raw, unorganised facts โ input
Information
Processed, meaningful data โ decision ke liye
GIGO
Garbage In Garbage Out โ galat input, galat output
IPOS
Input โ Process โ Output โ Storage (+ communication)
DIKW
Data โ Information โ Knowledge โ Wisdom
Radix
Number system ki base (2, 8, 10, 16)
MSB / LSB
Most/Least Significant Bit โ sabse bada/sabse chhota weight wala bit
2's complement
Negative number likhne ka tarika (1's complement + 1)
BCD
Har decimal digit ka 4-bit code (29 = 0010 1001)
ASCII / Unicode
Character codes โ 'A'=65; Unicode har language/emoji ke liye
Universal gate
NAND/NOR โ inse baaki sab gates ban jaate hain
De Morgan
(AB)' = A'+B' aur (A+B)' = A'ยทB'
Firmware
ROM me fixed software (BIOS/UEFI)
Compiler / Interpreter
Poora vs line-by-line translation
Algorithm
Finite, well-defined steps โ FIDO-E qualities
Flowchart
Algorithm ka pictorial roop (oval/parallelogram/rectangle/diamond)
Model answers โ Unit 1 ke 5 sabse important questions
Ye "ready-made" answers hain โ exam me isi dhaanche me apne shabdon me likh do, Model answer outlineโadapt it to the exact question and required depth.
Q1. Define data and information. Explain the difference with examples. (5) Answer: Data means raw, unorganised facts and figures which have no meaning by themselves โ e.g., marks 85, 90, 78. Information is processed, organised and meaningful data which is useful for taking decisions โ e.g., "class average = 84.3%, 33 students pass hain". Difference ke 5 bases: meaning (data niraashray, information arthpurn), form (scattered vs organised), use (input vs output for decisions), dependency (information data par depend karti hai, ulta nahi), example (UPI transactions ki list = data, "is mahine โน12,000 kharch" = information). Aage DIKW model se ek line jodo: data โ information โ knowledge โ wisdom. Closing line: "computer ka poora kaam data ko information me badalna hai."
Q2. Explain the characteristics of a computer with examples. (5) Answer: (1) Speed โ lakhs of instructions per second; 3 GHz CPU 300 crore cycles/second chalata hai; Google 1 second me lakhs results. (2) Accuracy โ high accuracy when data, program and hardware are correct; software/data/hardware errors can still occur (GIGO); UPI me paisa exact katta hai. (3) Diligence โ nahi thakta, same kaam baar-baar bina bore; ATM 24ร7. (4) Versatility โ ek machine, kai kaam; smartphone = camera + calculator + bank. (5) Storage โ huge data, turant recall; Aadhaar ke crore records. (6) Automation โ program ek baar likho, khud chalta rahe; traffic light. (7) No IQ, no feelings โ khud decision nahi le sakta. (8) Economical โ ek machine kai logon ka kaam. Closing: "inhi gunon ke saath limitations (bijli, GIGO, creativity nahi) bhi likhna" โ examiner ko balanced answer pasand aata hai.
Q3. Explain the generations of computers with technology and examples. (10) Answer:1st (1940โ56) vacuum tubes; punch cards/magnetic drums; machine language; ENIAC, UNIVAC โ bade, garam, bijli-khor, bar-bar kharab. 2nd (1956โ63) transistors; magnetic core; assembly + FORTRAN/COBOL; IBM 1401 โ chhote, reliable, business use shuru. 3rd (1964โ71) ICs; magnetic disk; high-level languages + OS; IBM 360 โ time-sharing, kai users. 4th (1971โ80) microprocessor/VLSI; semiconductor memory; GUI; IBM PC, Apple Macintosh โ ghar-ghar computer. 5th (1980โpresent) ULSI + AI + parallel processing; flash/cloud; voice, ML; smartphones, supercomputers, AI tools. Trick: V-TIM-A. Closing line: "har generation me speed badhi, size ghati, cost giri, aur users badhe." Table banane par marks zyada milte hain.
Q4. Draw and explain the basic organization of a digital computer. (10) Answer: Diagram me 5 units: Input โ CPU (ALU + CU + Registers) โ Output, Memory upar-neeche, aur buses. Input unit โ keyboard/mouse/scanner data ko 0/1 me badalkar bhejta hai. Memory unit โ primary (RAM/ROM/cache, chalte waqt) aur secondary (HDD/SSD, permanent). ALU โ arithmetic (+ โ ร รท) aur logical (compare, AND/OR) operations. CU โ instruction fetch/decode karke baaki units ko control karta hai ("traffic police"). Output unit โ result ko human-readable roop me deta hai (monitor/printer). Buses โ data bus (data), address bus (kahan), control bus (commands). Aage stored program concept likho: program aur data ek hi memory me; isi se modern computers ka janm hua. Closing: von Neumann bottleneck โ ek hi bus par data + instructions, isliye cache/pipelining aayi.
Q5. What is an algorithm? Write its qualities and an example. (10) Answer: Definition: "a finite sequence of well-defined steps to solve a problem". Qualities (FIDO-E): Finiteness (steps khatam hone chahiye), Definiteness (har step clear), Input (0 ya zyada), Output (kam se kam ek), Effectiveness (har step doable). Example โ even/odd: Step 1 Start, Step 2 Read N, Step 3 If N mod 2 = 0 print "Even" else "Odd", Step 4 Stop. Saath me flowchart banao: oval start โ parallelogram read N โ diamond (N mod 2 = 0?) โ Yes par "Even" print, No par "Odd" print โ oval stop. Closing line: "algorithm language-independent plan hai โ isi ko flowchart (diagram) aur pseudocode (English + keywords) me likha jaata hai; kabhi bhi ek symbol galat hua to poore flowchart ke marks kat sakte hain."
โก Unit 1 โ Rapid Revision (exam se pehle 5 min me padhna)
Data = raw facts โข Information = processed data โข Cycle = InputโProcessโOutputโStorage (+communication)
DIKW: Data โ Information โ Knowledge โ Wisdom โข Qualities of good info: accurate, timely, relevant, complete, clear, cost-effective, verifiable, accessible
GIGO = Garbage In Garbage Out โข Characteristics: Speed, Accuracy, Diligence, Versatility, Storage, Automation, No-IQ, Economical (+ reliability, remembering)
Babbage = Father of Computer โข Ada Lovelace = 1st programmer โข ENIAC(1946) 1st electronic general purpose โข UNIVAC(1951) 1st commercial โข EDVAC = stored program concept โข Transistor 1947 โข IC 1958 โข Intel 4004 (1971) 1st microprocessor
Digital computers ko unke size, power, cost aur number of users ke hisaab se chaar classes me baant te hain: microcomputer, minicomputer (mid-range), mainframe aur supercomputer. Order yaad rakho โ chhote se bade: Micro โ Mini โ Mainframe โ Super. Jaise-jaise size badhta hai, price, speed aur users ki sankhya badhti hai.
Type
Size / Power
Features
Kahan use hota hai
Examples
Microcomputer (PC)
Ek user, chhota (table/desk/jeb me)
Ek microprocessor, sasta, desktop/laptop/tablet/smartphone form factors; personal kaam
Ghar, school, office, dukaan ka billing, freelance work, gaming
HP laptop, Dell desktop, iPhone, Raspberry Pi
Minicomputer (Mid-range)
Chhote organisation, 10โ100 users
Multi-user (10โ100 log), multiple terminals, server ki tarah; mainframe se sasta aur chhota
College ka admission server, bank branch, factory ka process control, small office LAN
PDP-11 (purane), aaj ke blade servers, HP/IBM mid-range servers
Mainframe
Bade organisation, hazaaron users ek saath
Hazaaron users ek saath, bahut bada storage, 24ร7 reliability (99.999% "five nines"), bulk data processing, high I/O throughput, virtualization
Bank ke central records, IRCTC, railway reservation, insurance, census, hospital chain, UPI ke core systems
IBM zSeries (z15/z16), IBM ES/9000, UNIVAC (purana)
Supercomputer
Duniya ka sabse tez + mehnga
Lakhs of processors parallel me, "FLOPS" me speed count hoti hai (petaflops/exaflops), AC + special liquid cooling, bahut bada floor space aur bijli
Weather forecast, ISRO satellite simulation, nuclear research, drug discovery, AI training, oil exploration, genome analysis
Real-life India connect: Jab IMD (Mausam Vibhag) 3 din pehle bata deta hai "Kichha me barish hogi" โ wo supercomputer ke calculation se. Jab IRCTC par ek second me lakhs log ticket book karte hain aur server crash nahi hota โ wo mainframe jaisa bulk processing ki strength. Jab aapka laptop slow ho jata hai 8 Chrome tabs kholne par โ wo microcomputer ki limit. ๐ Aur jab Mahabaleshwar/Dehradun me ek hospital chain ke 40 branches ke records ek hi system se chalta hain โ wo mid-range/mainframe class ka kaam hai.
Trick โ "MiMi-Mai-Su" order of power: Micro < Mini < Mainframe < Super (chhote se bade: Power โ, Price โ, Size โ except micro ki jagah nahi โ yani micro sabse chhota). Ek line: "Chhota sasta โ Bada mehnga โ Sabse bada supercomputer". ๐ฐ
Exam trap: "Mainframe ka use sabse bada storage aur reliability ke liye hota hai (bank/railway), aur supercomputer sabse fast calculation ke liye (weather/research)." Dono ko confuse na karo โ mainframe = hazaaron users + bulk data, supercomputer = maximum computation speed. Aur "minicomputer" ka aaj ka naam "mid-range server" hai โ term purani hai par concept live hai.
2.2 Anatomy of a Computer (Computer ke andar kya hota hai)
Desktop computer ke cabinet (CPU box) ke andar ye parts hote hain โ sab motherboard par lage ya usse jude hote hain:
Part
Kaam
Real-life note
Motherboard
Main circuit board โ sab components isi pe lage hote hain, sabko connect karta hai; chipset CPU-RAM-storage ke beech raasta banata hai
"Computer ka naksha / shehar ki sadkein" ๐บ๏ธ
CPU socket
Jahan processor chip lagta hai
Intel/AMD processor โ socket model motherboard se match hona zaroori
RAM slots
Memory modules lagane ki slots (DDR4/DDR5)
8GB โ 16GB upgrade = system noticeably fast (multi-tasking improve)
HDD / SSD bay
Secondary storage lagane ki jagah
SSD lagane se Windows 10 sec me boot ho jata hai (HDD me 40โ60 sec)
SMPS / PSU
Power supply โ AC ko DC me convert karke sab parts ko alag-alag voltage deta hai
650W PSU gaming ke liye; ghatiya PSU se poora system jal sakta hai
GPU / Graphics card
Image/video rendering, heavy graphics (games, video editing, AI/ML)
NVIDIA RTX, AMD Radeon; integrated GPU sirf normal kaam ke liye kaafi
Cooling fans / heat sink
CPU aur cabinet ko thanda rakhna (CPU 100ยฐC par throttle karta hai)
Gaming PC me RGB fans ๐; garam laptop ka fan loud hota hai
Expansion cards/slots (PCIe)
Extra cards โ sound card, network card, capture card
Wi-Fi card, sound card, TV tuner card
Ports
USB, HDMI, VGA, Ethernet (LAN), audio jack, power port
Pen drive USB port me, monitor HDMI me, internet LAN cable me
CMOS battery
Date/time aur BIOS settings save rakhti hai (chip par chhoti coin cell)
Battery weak = boot par har baar date galat ๐
Ports โ exam me "short note" ke liye:USB (Universal Serial Bus โ mouse, keyboard, pen drive; USB 2.0 = 480 Mbps, USB 3.0 = ~5 Gbps, Type-C cable dono taraf), HDMI (audio + video ek hi cable me โ monitor/TV/projector), VGA (purana analog video), Ethernet/RJ-45 (LAN cable โ wired internet), 3.5 mm audio jack (headphone), DisplayPort (high refresh monitors), SD card slot (camera memory card).
Hinglish: Motherboard = shaher ki sadkein ๐ฃ๏ธ, CPU = factory ka dimaag ๐ง , RAM = aaj ka kaam rakhne wali table ๐ช, HDD/SSD = almari ๐๏ธ, PSU = bijli ka istation โก, GPU = graphics ka specialist ๐จ, fan = AC/cooler โ๏ธ. Sab milkar ek "working computer" banate hain โ ek bhi part fail, poora system ruk jata hai.
2.3 Central Processing Unit (CPU) โ "Computer ka Dimaag"
The CPU is the brain of the computer; it executes instructions and controls the entire system. It has three parts: ALU, Control Unit (CU), and Registers. (On microcomputers, the CPU is contained in a single chip called a microprocessor.) CPU ki speed GHz (clock speed) me maapi jaati hai โ 3.5 GHz ka matlab 3.5 billion cycles per second.
(a) ALU โ Arithmetic Logic Unit
Do tarah ke operations karta hai: Arithmetic (+, โ, ร, รท, increment/decrement, comparison bhi) aur Logical (>, <, =, AND/OR/NOT, true/false decisions). Saara calculation โ is notes file me jo bhi total/average nikala jaata hai โ ALU hi karta hai.
Real life: Jab aap calculator me 45+55 dalte ho to jo answer 100 aata hai wo ALU ne nikala. Aur jab Swiggy "coupon apply hua ya nahi" check karta hai (discount > 0 AND order > 199) โ ye logical operation wo bhi ALU hi karta hai. Jab online exam portal "marks >= 33 AND attendance >= 75" se PASS/FAIL decide karta hai โ wahi ALU ka logic circuit. ๐ง
(b) CU โ Control Unit
Poori machine ka traffic police ๐ฆ. Na khud calculate karta hai na store karta hai โ bas instructions fetch karke decode karta hai aur doosre units ko command deta hai ki kya karna hai, kab karna hai. Clock ke saath synchronise ho kar poora instruction cycle chalata hai (fetch โ decode โ execute โ store).
Real life: Restaurant manager jaisa โ khud khana nahi banata, par "chef ko order do, waiter ko table 5 pe le jao" โ sab coordinate karta hai. CU galat instruction address par bhej de to poora system hang โ isliye modern CPUs me branch prediction lagti hai.
(c) Registers (CPU ke andar ki smallest & fastest memory)
Registers sabse chhoti aur sabse tez memory hain โ CPU ke andar hi hote hain, aur instruction ke chalte waqt kaam aane wala data inme aata hai. Space bahut kam (8/16/32/64 bit per register) par speed nanoseconds me.
Register
Full name
Kaam
PC / IP
Program Counter
Agla instruction kahan hai, uska address rakhta hai (fetch ke baad +1)
IR
Instruction Register
Abhi jo instruction chal raha hai, wo rakhta hai
MAR
Memory Address Register
Memory ka address (kahan) rakhta hai โ address bus se juda
MDR / MBR
Memory Data Register
Memory se aaya/jaane wala data rakhta hai โ data bus se juda
ACC
Accumulator
ALU ke results store karta hai
GPRs
General Purpose Registers
AX, BX, CX, DX โ temporary data aur addresses
SP / FLAGS
Stack Pointer / Status flags
Stack ka top address / result ke status (zero, carry, sign, overflow)
Microprocessor โ details & evolution
Definition: CPU + registers + control circuitry, ek hi chip (silicon IC) par = microprocessor. (Intel 4004, 1971 = world's first microprocessor โ ise "computer on a chip" bhi kehte hain.) Microprocessor aaj laptop, phone, smart TV, car โ har jagah "dimaag" ka kaam karta hai.
Stage / Era
Microprocessors
Key feature
1971โ78
Intel 4004, 8008, 8085, 8086
4-bit โ 8-bit โ 16-bit; PC revolution ki shuruaat; 8086 me segmented memory
1979โ93
80286, 386, 486
Protected mode, 32-bit computing, floating-point math, GUI (Windows) ko possible banaya
Multiple cores (2โ24+), turbo boost, integrated GPU, AI instructions
Mobile/ARM era
Snapdragon, Apple M-series, Dimensity
RISC-based, power-efficient (battery), ARM ko laptop me bhi laaya (Apple M1+)
Performance factor
Matlab
Effect
Clock speed (GHz)
Kitni clock cycles per second (3.5 GHz = 3.5 billion)
Zyada GHz = tez fetching/execution โ par sirf GHz se phone/laptop judge nahi karte
Cores
Ek chip par kitne independent processors (dual=2, quad=4, octa=8)
"Ek dimaag ki jagah 8 dimaag" โ parallel kaam, multi-tasking fast
Cache size
CPU ke paas ki tez memory (L1/L2/L3)
Bada cache = baar-baar RAM ke paas nahi jaana padta = fast
Word size
CPU ek baar me kitne bits process karta hai (32/64-bit)
64-bit CPU zyada RAM (4GB+ limit khatam) aur bade numbers handle karta hai
Instruction set (RISC/CISC)
Instructions simple ya complex
RISC simple + fast chips (mobile), CISC program chhota (desktop)
RISC
CISC
Reduced Instruction Set Computer
Complex Instruction Set Computer
Simple, chhoti instructions; ek instruction = ek cycle (mostly)
Complex instructions; ek instruction me kaafi kaam
Kam power, mobile/chips me zyada (ARM, Apple M, Snapdragon)
Desktop/laptop me common (Intel x86, AMD)
Pipelining easy, hardware simple
Program chhota likhna, hardware complex
Zyada instructions chahiye same kaam ke liye, par compiler ko optimize karna aasan
Kam instructions me kaam, par decoding complex aur power zyada
Exam ready points: CPU = ALU + CU + registers โข Microprocessor = CPU on a single chip โข 1st microprocessor = Intel 4004 (1971) โข Clock cycle = GHz โข More cores โ always faster (software ko parallel support karna chahiye) โข Registers: PC, IR, MAR, MDR, ACC (yaad rakho โ inka poora naam MCQs me aata hai).
2.4 Storage Units & Memory
Units of storage
Unit
Size (loosely)
Memory me kya aa sakta hai (approx.)
Bit
0 ya 1 (smallest)
โ
Nibble
4 bits
1 hex digit
Byte
8 bits
1 character (jaise 'A')
KB (Kilobyte)
1024 bytes (โ10ยณ)
1 chhota text page
MB (Megabyte)
1024 KB
1 MP photo / 1 min song
GB (Gigabyte)
1024 MB
~250 songs / 1 HD movie (~2 GB)
TB (Terabyte)
1024 GB
Laptop ka 1 TB HDD = ~2 lakh songs
PB (Petabyte)
1024 TB
Netflix ka 1 din ka content scale
EB / ZB / YB
1024ร aage
Google/WhatsApp jitna data
Worked example โ "1 TB" wali drive kam kyun dikhti hai? ๐งฎ Hard-disk companies 1 TB = 1000 GB = 1000ร1000ร1000ร1000 bytes maan leti hain (decimal). Windows/hardware 1 TB = 1024โด bytes maanta hai (binary). Calculation: 1,000,000,000,000 รท (1024ร1024ร1024ร1024) = 931.32 GB. Isliye 1 TB ki nayi drive "931 GB" dikhati hai โ data gayab nahi hota, sirf calculation ka base alag hai. ๐ Ye classic exam question hai โ kyunki computer science me 1 KB = 1024 bytes hota hai (2ยนโฐ), par marketing me 1000.
Memory Hierarchy (speed vs cost vs size)
Level
Where
Speed
Size
Cost
Kya rakha hota hai
Registers
CPU ke andar
Fastest (sub-ns)
BytesโKB
Costliest per byte
Abhi chal raha data/instruction
Cache (L1โL2โL3)
CPU chip par/paas
Bahut fast
KBโMB
Bahut mehnga
Frequently used data/instructions
Primary (RAM/ROM)
Motherboard par
Fast
GB
Medium
Chalte hue program + data
Secondary (HDD/SSD)
Bay/port me
Slow (SSD medium)
TB
Sasta
Permanent files, OS, software
Tertiary / Cloud
Remote data centre
Slowest (network)
Unlimited (paid)
Subscription
Backup, archives, big data
Rule: jaise-jaise aap upar jaate ho (registers ki taraf), speed badhti hai, size ghatta hai, cost badhta hai. CPU har baar slow memory par depend na kare โ isliye frequently used data cache me "copy" rakha jaata hai. Yehi "locality of reference" ka idea hai.
Primary Memory: RAM vs ROM
RAM (Random Access Memory)
ROM (Read Only Memory)
Volatile โ bijli gayi to data gayab
Non-volatile โ data bana rehta hai
Read + Write dono
Normally sirf Read (writes special process se)
Programs/data chalte waqt yahan aate hain
Startup instructions (BIOS/firmware) yahan
8/16 GB typical aaj
KBs se MBs
Types: SRAM (fast, costly, cache), DRAM (sasta, refresh chahiye, main memory)
Flip-flop (6 transistors) โ data tab tak rehta hai jab tak power hai
Capacitor + 1 transistor โ charge ko periodically refresh karna padta hai
Speed
Bahut fast
Slower than SRAM
Cost & density
Mehnga, kam density
Sasta, high density (zyada GB ek chip par)
Use
Cache (L1/L2/L3), small buffers
Main memory (RAM sticks โ DDR4/DDR5)
Hinglish: RAM = study table ๐ช (aaj ka kaam wahin, kaam khatam to khali). ROM = ghar ki deewar pe likhe permanent niyam ๐ (hamesha rahenge). HDD = almari ๐๏ธ (sab purana maal). Cache = jeb ๐ฑ (jo baar-baar chahiye, paas hi). Virtual memory = table full ho gayi to zameen par rakh ke kaam chalana ๐ .
Real life: Game khelte waqt "Loading..." = HDD/SSD se RAM me data aa raha. Phone ke 100 apps background me khule hote hain to RAM full โ phone hang ("RAM management"). Bijli jaane par jo unsaved Word file gayi = RAM volatile thi. Power on karte hi jo beep/screen aati hai wo ROM/BIOS ka kaam. Aur laptop/phone ki "8 GB RAM + 128 GB storage" wali advertisement me RAM aur storage alag cheezein hain โ inhe mix na karo!
Virtual Memory: Jab RAM full ho jati hai, OS secondary storage (HDD/SSD) ka thoda hissa RAM ki tarah use karta hai โ ise virtual memory / swap / page file kehte hain. Isse system slow hota hai par crash nahi hota. (Isi liye purane phone/laptop me 8 GB RAM + heavy apps = "freezing".) RAM badhana isliye best upgrade hai.
Storage & memory practice set (solutions ke saath) Exam practice
Address bus width
Max addressable memory (2โฟ)
Practical meaning
8-bit
2โธ = 256 bytes
Purane microcontrollers
16-bit
2ยนโถ = 65,536 bytes = 64 KB
8086 era, chhote chips
20-bit
2ยฒโฐ = 1,048,576 bytes = 1 MB
8086 ke 1 MB limit wali classic problem
24-bit
2ยฒโด = 16 MB
Shuruaati embedded systems
32-bit
2ยณยฒ = 4,294,967,296 bytes = 4 GB
Purane Windows ka "4 GB se zyada RAM nahi dikhta" issue
36-bit
2ยณโถ = 64 GB
Server CPUs (PAE type extensions)
64-bit
2โถโด = 16 exabytes (practically TBs)
Aaj ke laptops/phones โ RAM limit practically khatam
Q1. 4 GB kitne MB ke barabar hai?
4 ร 1024 = 4096 MB โ
(Aur agar decimal maane to 4 ร 1000 = 4000 MB โ isi farak se storage kam dikhta hai.)
Q2. 32 GB pen drive me 5 MB ke kitne photos aa jayenge?
32 GB = 32 ร 1024 = 32,768 MB
32,768 รท 5 โ 6,553 photos โ (thoda OS/folder overhead hata ke ~6,500)
Q3. 2 GB ki movie 100 Mbps connection par kitni der me download hogi?
2 GB = 2,048 MB โ 16,384 Mb (megabits, ร8)
Time = 16,384 รท 100 โ 164 second โ 2 minute 44 second โ
Q4. Ek laptop me 8 GB RAM aur 512 GB SSD hai. Iska matlab?
RAM (8 GB) = chalte hue programs ka temporary area (volatile)
SSD (512 GB) = permanent storage โ Windows, files, photos
Dono alag cheezein hain; "RAM badhaane" se apps fast hote hain,
"storage badhaane" se zyada files rakh sakte ho. โ
Q5. Aapka 300 MB ka game RAM (4 GB, 3 GB used) me load nahi ho raha.
Kya hoga? OS virtual memory use karega (SSD/HDD ka hissa) โ
game chalega par "stuttering/lag" ke saath, kyunki SSD RAM se bahut slow hai. โ
Q6. Kaun data power off hone par bacha rahega: RAM ka, ROM ka, ya cache ka?
Sirf ROM (aur permanent storage). RAM aur cache volatile hain โ power gayi to khali. โ
Cheez
Typical size
Kitni ek 4 GB me fit hongi (approx.)
Text page (A4, plain)
~2 KB
~20 lakh pages
MP3 song (4 minute)
~4 MB
~1,000 songs
Phone photo (12 MP)
~3 MB
~1,300 photos
1 minute HD video
~60 MB
~68 minutes
Movie (HD)
~1.5 GB
~2.5 movies
Windows 11 ISO
~5.5 GB
1 se bhi kam ๐
Important distinction:MB vs Mb โ capital B = byte, small b = bit. 1 byte = 8 bits. Isliye 100 Mbps ka internet = 12.5 MB/s download (8 se divide). Aur 0 se counting ka confusion: address bus n-bit ho to 2โฟ addresses, jo 0 se (2โฟ โ 1) tak jaate hain โ 8-bit me 256 addresses (0โ255), par saare memory cells ka number 255 tak hai, total 256 cells. Binary prefix convention: 2ยนโฐ bytes = 1 KiB; many introductory materials write 1 KB, while SI kB is 1,000 bytes. ๐งฎ
Secondary storage (auxiliary memory) wo memory hai jo non-volatile hai aur permanent data rakhti hai โ OS, software, files, photos, videos. Ye RAM se slow aur sasti hoti hai, par capacity bahut zyada. Iske bina aapka data har shutdown par gayab ho jaata.
Device
Technology
Capacity
Notes
HDD (Hard Disk Drive)
Magnetic platters + read/write head, ghoomti hai (5400/7200 RPM)
500 GB โ 10 TB
Sasta, zyada storage, par slow + loud + girne pe kharab
SSD (Solid State Drive)
NAND Flash chips, koi moving part nahi
128 GB โ 8 TB
Bahut fast (boot 10 sec), silent, mehnga
Pen Drive / Flash Drive
Flash memory + USB
8 GB โ 512 GB
File carry karne ka sabse common tarika
Memory Card (SD/microSD)
Flash
4 GB โ 1 TB
Phone, camera me
Optical: CD / DVD / Blu-ray
Laser se padhna (reflection)
CD 700 MB, DVD 4.7 GB (dual-layer 8.5), Blu-ray 25/50 GB
Aaj kam use (films, old software, archival)
External HDD/SSD
USB se connect
1โ20 TB
Backup ke liye
Cloud Storage
Internet par doosri company ke servers
5 GB โ unlimited (paid)
Google Drive, OneDrive, iCloud. Kahin bhi access, par internet chahiye + privacy question
Magnetic Tape
Sequential magnetic tape (cartridge)
Multiple TB (LTO)
Enterprise backup/archive me aaj bhi โ sasta per TB, par access sequential (slow)
Basis
HDD
SSD
Parts
Mechanical โ spinning platter + moving head
Electronic โ NAND flash chips, no moving parts
Speed
~100โ200 MB/s; random access slow (seek time ms me)
~500โ7000 MB/s; instant access
Boot time (Windows)
~40โ60 sec
~10โ15 sec
Noise / heat
Aawaz karta hai + heat
Silent, kam heat, battery life better
Durability
Girne/vibration se kharab (head + platter)
Shock-proof, par write cycles ki limit (TBW)
Cost per GB
Sasta
Mehnga (2โ4ร)
Best use
Sasta bulk storage, backup, CCTV recording
OS drive, gaming, video editing โ speed wali jagah
High-yield syllabus topic: "HDD vs SSD (5 points)" + "Primary vs Secondary memory" tables yaad rakho. Aur ek line: Primary memory CPU ke direct access me hoti hai (fast, costly, chhoti), secondary memory permanent aur sasti hoti hai (CPU direct access nahi karta โ pehle RAM me load karna padta hai). Optical media ka order: CD (700 MB) < DVD (4.7 GB) < Blu-ray (25 GB) โ ye MCQ me number ke saath aata hai.
2.6 Input Devices
Input devices woh devices hain jinse hum data aur instructions computer me daalte hain. Ye bahar ki duniya ki information (text, image, sound, movement, touch) ko machine-readable form (0/1 signals) me convert karte hain aur system ko bhejte hain.
Trick (ye 4 kabhi confuse karte hain, yaad rakho):OMR = O ptical M ark (exam me tick/bubble), OCR = text padhta (character recognize), MICR = Bank ke cheque ke numbers (magnetic ink), Barcode = shopping ka product. Yaad: "OMR - Exam Sheet, OCR - Aadhaar Card, MICR - Cheque Book, Barcode - Shopping Cart" ๐
Exam one-liners: Touch screen = input + output dono โข OMR me pencil mark padhta hai, OCR me text โข MICR bank cheque ke liye โข Biometric me fingerprint/iris โข Sensors IoT ka pehla step hain (smart AC, smart watch).
2.7 Output Devices
Output devices processed data (result) ko user tak pahunchate hain โ softcopy (screen/audio/vibration) ya hardcopy (print) ke roop me. Softcopy editable/temporary, hardcopy permanent.
Toner use, fast, office ke liye best, quality behtar, per-page cost kam
Bank passbook statement, office documents
Printer โ Dot Matrix
Hardcopy, Impact
Pins se punch, shor karta hai, sasta print + carbon copy bana sakta hai
Purane bank passbook printers, shop bills, GST invoices (multi-copy)
Thermal Printer
Hardcopy, Non-impact
Heat se print, roll paper, no ink
ATM receipt, Swiggy/Zomato bill, bus ticket
Plotter
Hardcopy
Bade technical drawings print karta hai (pen/inkjet plotter)
Map, building ka blueprint, design drawings, banners
Speakers / Headphones
Softcopy (audio)
Sound output
Music, movie, online class
3D Printer
Hardcopy
Layer-by-layer 3D object banata hai (additive manufacturing)
Prototypes, models, medical implants, school projects
Haptic devices (vibration motor)
Softcopy (touch)
Vibration/force feedback
Phone vibration, gaming controller rumble
Impact
Non-impact
Hammer/pins paper ko chhoote hain (hit karke print)
Bina touch โ ink spray, toner/laser, heat
Shor zyada
Silent
Carbon copy ban sakti hai (multiple copies)
Sirf ek copy
Speed kam, quality medium
Speed tez, quality best
Examples: dot matrix, daisy wheel, line printer
Examples: inkjet, laser, thermal, plotter
Monitor ke types (short note ready)
Type
Technology
Good
Bad
CRT (Cathode Ray Tube)
Electron beam screen par
Colour depth achha (designers use karte the)
Bada, bhaari, bijli zyada, aaj khatam
LCD
Liquid crystal + backlight
Flat, halka, sasta
Colours/contrast average, viewing angle kam
LED
LCD with LED backlight
Brighter, kam power, patla
Blacks perfect nahi (backlight bleed)
OLED
Har pixel khud roshni deta hai
Best contrast, infinite blacks, fast
Mehnga, burn-in ka risk โ phones/expensive laptops me
High-yield syllabus topic: "Impact vs non-impact printer" table + one line: dot matrix bank passbook me aaj bhi hai kyunki carbon copy banti hai. Printer ke questions me speed (PPM), cost per page aur use-case likhna โ complete-answer checklist. Thermal printer ka example (ATM receipt / food bill) sabse easy hai yaad rakhne ke liye.
Device selection practice (real-life scenarios)
Scenario
Sahi device
Kyun
Bank ko roz 500 cheques process karne hain (numbers padh kar)
MICR reader
Cheque ke magnetic ink numbers special font me โ fast + tamper-proof
School ko 20,000 OMR sheets check karni hain
OMR reader
Bubbles ki position padhna โ speed hazaaron sheets/hour
Aadhaar card se form auto-fill karna hai
OCR scanner
Printed text ko characters me convert karta hai
Kirana shop ka billing fast karna hai
Barcode reader
Product code scan โ 1 second me entry, manual typing nahi
Petrol pump par petrol flow (analog) aur amount (digital) dikhana hai
Hybrid computer (ADC + display)
Analog input ko digital me convert karke calculate karta hai
ATM receipt dena hai (roll paper, koi ink nahi)
Thermal printer
Heat se print, maintenance kam, sasta per receipt
Ghar par 10 pages colour assignment print karne hain
Inkjet printer
Colour quality achhi, initial cost kam
Office me roz 500 black-white pages print karne hain
Laser printer
Per-page cost kam (toner), speed fast, quality behtar
Building ka 6 feet ka blueprint print karna hai
Plotter
Bade format drawings ke liye bana hua hai
Fingerprint se attendance lagani hai
Biometric scanner
Unique feature authentication (proxy nahi hoti ๐)
2.8 How CPU and Memory Work Together (program kaise chalta hai)
CPU teen (aur technically chaar) step ka cycle repeat karta hai: Fetch โ Decode โ Execute (aur phir Store). Ise instruction cycle (machine cycle) kehte hain, aur ye cycle ek clock (GHz) ke saath synchronise hota hai โ kisi ek instruction me kai clock cycles lag sakte hain.
Instruction cycle (step-by-step):
1. FETCH โ PC batata hai agla instruction ka address
โ MAR me address jata hai โ address bus par memory ko
โ memory se instruction aata hai โ MDR โ IR me load
2. DECODE โ CU instruction ko samajhta hai: "ye ADD karna hai"
โ kaunse operands chahiye, kahan se laane hain โ sab decode
3. EXECUTE โ zarurat ka data ALU me jaata hai โ calculation/logic hota hai
โ result ACC/register me aata hai
4. STORE โ result ko register se RAM ke location me likh diya jaata hai
โ PC = PC + 1 (agla instruction) โ cycle repeat ๐
(Interrupt aaye to CPU saari state save karke interrupt handler chalata hai,
phir wahi se resume โ isliye music chalti rehti hai jab aap typing karte ho ๐ต)
Real-life walkthrough โ C ka line c = a + b; (a=5, b=3) computer ke andar:
1. Fetch: a aur b ki values RAM se registers me load hui (CPU ne memory read kiya).
2. Decode: CU ne instruction decode kiya: "add instruction hai, dono operands registers me hain".
3. Execute: ALU ne 5 + 3 = 8 nikala (add circuit), result ACC me aaya.
4. Store: Result 8 register se wapas variable c ki memory location me likha gaya.
5. Next: agla instruction chala โ screen pe print karna, to output device ko bhej diya.
Isi ka naam "program execution" hai โ aur ye cycle billions of times per second chalti hai. Insaan 1 second me ~1 thought-step leta hai, 3.5 GHz CPU 1 second me ~350 crore cycles ๐. Isliye loop 10 lakh baar chala kar bhi time nahi lagta.
2.9 Program Execution โ C program ke perspective se
Aapne jo program likha (source code), wo directly CPU nahi samajhta. Usse machine ke liye ready karne ka poora safar kai tools se hokar guzarta hai โ preprocessor, compiler, assembler, linker, loader. Isko "build process" kehte hain.
Source file hello.c (aapne likha: C language)
โ
โผ 1. PREPROCESSOR ( #include, #define expand karta hai; comments hataata hai)
Preprocessed code
โ
โผ 2. COMPILER (C โ assembly) โ syntax error yahin milti hai
Assembly code (hello.s)
โ
โผ 3. ASSEMBLER (assembly โ object code/machine code)
hello.o (object file)
โ
โผ 4. LINKER (object file + libraries, jaise stdio.h ka code, jodta hai)
hello.exe (executable)
โ
โผ 5. LOADER (exe ko RAM me load karta hai, PC set karta hai)
RAM me program chal raha hai โ CPU instruction cycle โ OUTPUT ๐
Step
Tool
Input
Output
Errors jo yahan milti hain
Preprocessing
Preprocessor
hello.c
Expanded .i code
Missing header file, bad macro
Compilation
Compiler (gcc/Turbo C)
Preprocessed code
Assembly (.s)
Syntax errors, undefined variable
Assembly
Assembler
Assembly (.s)
Object file (.o/.obj)
Assembly-level errors, symbol issues
Linking
Linker
Object + libraries
Executable (.exe)
Undefined reference (printf ka code na milna)
Loading/Run
Loader (OS)
.exe
Running process
Runtime errors (divide by zero), missing DLL, permission issues
Yaad rakho: Editor (likhna) โ Compiler (translate) โ Linker (jodna) โ Loader (RAM me daalna) โ CPU (chalana). To explain compilation/execution, draw this sequence and define each stage; it makes the answer clearer. Syntax vs runtime error ka farak bhi yahin se samajh aata hai: syntax compile time par pakdi jaati hai, runtime error program chalte waqt. ๐ฏ
Instruction cycle practice (register-level trace)
Maan lo program ka instruction hai: ADD R1, R2 (R1 = 5, R2 = 3). Trace likho โ exam me yahi style complete-answer checklist dilata hai:
Cycle step
Register/bus me kya hua
Value
Fetch (1)
PC me agla address โ MAR โ address bus
PC = 2000 (instruction ka address)
Fetch (2)
Memory se instruction MDR me aaya
MDR = "ADD R1,R2"
Fetch (3)
Instruction IR me load, PC = PC + 1
IR = ADD R1,R2, PC = 2001
Decode
CU ne samajha: add karna hai, operands R1 aur R2
โ
Execute
ALU ne R1 + R2 nikala
5 + 3 = 8
Store (writeback)
Result R1 me wapas likha gaya
R1 = 8 (R2 = 3)
Ek line me: Fetch (PC/MAR/MDR/IR) โ Decode (CU) โ Execute (ALU) โ Store (register/memory). Ye 4 step har instruction par repeat hote hain โ 3 GHz CPU ye cycle 300 crore baar per second chala leta hai. โก
2.10 Introduction to Microcontrollers
A microcontroller (MCU) is a small single-chip computer that contains a CPU (processor core), memory (RAM + ROM/Flash), and input/output peripherals (timers, ADC, UART ports) all integrated on one chip. It is designed to control a specific device/task โ isliye ise "embedded computer on a chip" bhi kehte hain.
Microprocessor (MPU)
Microcontroller (MCU)
Sirf CPU (processing part)
CPU + RAM + ROM + I/O + timers โ sab ek chip me
Memory, I/O bahar lagte hain (alag chips)
Sab built-in (integrated)
PC/laptop โ general purpose, powerful
Washing machine/AC โ dedicated single kaam
Costly, bijli zyada, speed zyada
Sasta (โน50โโน500), kam bijli, chhota
Operating system chahiye (Windows/Linux)
Mostly OS ke bina (bare-metal program ya RTOS)
Examples: Intel Core i5, AMD Ryzen
Examples: 8051, Arduino (ATmega328P), ESP32, PIC16F877A, Raspberry Pi Pico
Microcontroller ke parts
Part
Kaam
8051/Arduino me
CPU core
Instructions chalana (program)
8051 ka 8-bit core, Arduino ka ATmega328P
Flash/ROM
Program permanently store (firmware)
Arduino Uno me 32 KB flash
RAM
Chalte waqt variables/data
Arduino Uno me 2 KB SRAM
Timers/Counters
Time delay, PWM (motor speed, LED brightness)
3 timers
ADC (Analog to Digital Converter)
Sensor ki analog value (0โ5V) ko digital number me
10-bit ADC (0โ1023)
Serial ports (UART/SPI/I2C)
Doosre chips/sensors/PC se baat
UART se PC par data bhejna
GPIO pins
LED, motor, relay, button connect karna
Arduino me 14 digital + 6 analog pins
Real-life: Aapki washing machine "tumhare kapde ready" bolti hai, AC 24ยฐC pe rukta hai, microwave ka 30 sec beep, gaadi ka airbag sensor, bike ka digital meter, smartwatch, drone โ in sab ke andar ek microcontroller baitha hota hai jo sensor padhta hai aur motor/heater/display control karta hai. Modern vehicles may contain many embedded controllers; the exact count varies by model and year. ๐ Aur aapke project ke liye jo "smart dustbin" ya "automatic light" banta hai โ wo bhi Arduino/ESP32 hi hai.
Simple difference: Microprocessor = dimaag ๐ง (aur body aapko alag se banani padegi โ RAM, storage, I/O sab bahar). Microcontroller = poora chhota robot ๐ค (dimaag + body + sensor + motor driver, sab ready-made ek chip me). Isliye "Kaun sasta aur kaun powerful" wale sawaal ka jawab: MCU sasta + single-task, MPU powerful + general-purpose.
Microprocessor & CPU practice (short notes + comparison)
Chip
Year
Bits
Kyun yaad rakhna hai
Intel 4004
1971
4-bit
World ka pehla microprocessor (calculator ke liye bana tha)
Intel 8085 / 8086
1976 / 1978
8 / 16-bit
BCA labs ka classic โ 8085 assembly aaj bhi padhaate hain
Intel 80286 / 386
1982 / 1985
16 / 32-bit
Protected mode, multitasking โ Windows possible hua
Intel Pentium
1993
32-bit
Ghar-ghar PC ka doar; multimedia (MMX) shuru
Core i5 / i7
2008+
64-bit
Multiple cores, turbo boost, integrated graphics
Apple M1/M2/M3, Snapdragon
2020+
64-bit ARM (RISC)
Power-efficient chips โ laptop aur phone dono me
Short-note practice (5โ7 line me likho):
Registers โ kaunse 5 important hain aur kya karte hain.
Cache memory โ kyun zaroori hai (speed gap RAM vs CPU).
Virtual memory โ RAM full hone par kya hota hai.
SSD vs HDD โ 5 points.
Microprocessor vs microcontroller โ 5 points.
RISC vs CISC โ 4 points.
Answer ka model format (Virtual memory ka example): (1) Definition โ "jab RAM full ho jaati hai, OS secondary storage ka hissa RAM ki tarah use karta hai (swap/page file)". (2) Kyun โ RAM costly aur limited hai; bade processes ke liye safety valve. (3) Kaise โ kam active pages disk par bhej diye jaate hain, zaroorat par wapas RAM me (paging). (4) Effect โ system slow hota hai (disk RAM se hazaar guna slow) par crash nahi hota. (5) Example โ purane phone me 3 apps + heavy game = freezing, kyunki swap ho raha hai. Five points can make a clear short answer; match depth to the prompt. โ
Unit 2 practice-topic checklist (not a prediction): classification of computers (10) โข basic organization/CPU parts (10) โข RAM vs ROM + SRAM vs DRAM (5) โข memory hierarchy diagram (5) โข impact vs non-impact printers (5) โข OMR/OCR/MICR/barcode (5) โข C program execution (10) โข microprocessor vs microcontroller (5) โข short notes: SSD vs HDD, virtual memory, registers, touch screen, mainframe vs supercomputer (5ร2).
Unit 2 โ key terms glossary
Term
Ek line me
Microprocessor
CPU ek chip par (Intel 4004 se shuru)
Microcontroller
CPU + memory + I/O ek chip me (8051, Arduino)
ALU / CU
Calculation/logic vs control (traffic police)
Register
CPU ke andar ki sabse fast memory (PC, IR, MAR, MDR, ACC)
Cache
Frequently used data ki tez copy (L1/L2/L3)
RAM / ROM
Volatile working memory vs non-volatile firmware memory
SRAM / DRAM
Fast costly cache vs dense cheap main memory
Volatile
Power jaane par data gayab (RAM, cache)
Virtual memory
Disk ka hissa RAM ki tarah use karna (swap/page file)
HDD / SSD
Magnetic slow-cheap vs flash fast-costly
OMR / OCR / MICR
Exam bubbles / text reading / cheque numbers
Impact printer
Hit karke print (dot matrix) โ carbon copy banti hai
Thermal printer
Heat se print โ ATM/Swiggy receipts
Instruction cycle
Fetch โ Decode โ Execute โ Store
RISC / CISC
Simple fast instructions vs complex rich instructions
FLOPS
Floating-point operations per second โ supercomputer ki speed
Model answers โ Unit 2 ke 5 sabse important questions
Q1. Classification of digital computers โ explain with examples. (10) Answer: (1) Microcomputer โ ek user, ek microprocessor; laptop/desktop/smartphone; ghar, office, billing. (2) Minicomputer (mid-range) โ 10โ100 users, multiple terminals; departmental server, bank branch; PDP-11 (purana), blade servers. (3) Mainframe โ hazaaron users ek saath, bulk data, 24ร7 (99.999% uptime), bahut bada I/O; IRCTC, bank core, census; IBM zSeries. (4) Supercomputer โ lakhs of processors parallel, speed FLOPS me; weather forecast, ISRO simulation, AI training; PARAM, Pratyush, Frontier. Closing: "size, price aur users ke hisaab se order โ Micro < Mini < Mainframe < Super; aur use-case ka farak yaad rakho: mainframe = bulk users/data, supercomputer = maximum calculation."
Q2. Difference between RAM and ROM; SRAM and DRAM. (5) Answer:RAM vs ROM: volatility (RAM volatile, ROM non-volatile) โข access (RAM read+write, ROM normally read-only) โข use (RAM me chalte programs, ROM me BIOS/firmware) โข size (GB vs KBโMB) โข types (SRAM/DRAM vs PROM/EPROM/EEPROM/Flash). SRAM vs DRAM: cell (flip-flop 6 transistor vs capacitor + 1 transistor) โข refresh (SRAM ko refresh nahi chahiye, DRAM ko periodic) โข speed (SRAM fast) โข cost/density (SRAM mehnga, kam density; DRAM sasta, high density) โข use (SRAM = cache, DRAM = main memory). Closing: "RAM badhane se multi-tasking improve hota hai; ROM/BIOS se machine boot hoti hai."
Q3. Draw and explain the memory hierarchy. (5) Answer: Diagram (upar se neeche): Registers โ Cache (L1โL2โL3) โ Primary memory (RAM/ROM) โ Secondary storage (HDD/SSD) โ Cloud/tape. Explanation ke 3 lines: (1) Jaise upar jaate hain, speed badhti hai, size ghatta hai, per-byte cost badhta hai โ yani "fast memory chhoti aur mehngi hoti hai". (2) CPU ke registers/cache nanoseconds me, RAM microseconds(ish), disk milliseconds โ isliye frequently used data cache me rakha jaata hai (locality of reference). (3) Hierarchy ka poora maksad: 90% accesses fast memory se serve ho jaayein aur slow/cheap memory sirf bulk storage ke liye rahe. Saath me storage units ki table: Bit โ Nibble(4) โ Byte(8) โ KB(1024 B) โ MB โ GB โ TB โ PB โ EB.
Q4. Explain the process of compiling and executing a C program. (10) Answer: Steps: (1) Source code hello.c editor me likha. (2) Preprocessor #include/#define expand karta hai. (3) Compiler C ko assembly me badalta hai (syntax errors yahin milti hain). (4) Assembler assembly ko object code (hello.o) me. (5) Linker object file ko libraries (printf ka code) ke saath jodkar hello.exe banata hai (undefined reference errors yahin). (6) Loader exe ko RAM me load karke PC set karta hai. (7) CPU instruction cycle (fetchโdecodeโexecuteโstore) se program chalata hai โ output. Closing: "syntax error compile time par, runtime error program chalte waqt โ isliye debugging me dono ka farak samajhna zaroori hai."
Q5. Microprocessor vs Microcontroller โ difference with applications. (5) Answer: Microprocessor me sirf CPU hota hai โ memory (RAM/ROM), I/O aur timers alag chips se lagte hain; general-purpose, powerful, mehnga, OS chahiye (Intel i5, AMD Ryzen; laptop/PC). Microcontroller me CPU + RAM + ROM/Flash + timers + ADC + I/O ports sab ek chip par integrated hote hain; dedicated single kaam, sasta (โน50โโน500), kam bijli, mostly OS ke bina (8051, Arduino ATmega328P, ESP32; washing machine, AC, car, ATM, drone). Ek line me: "microprocessor = dimaag jo alag parts se body banata hai; microcontroller = poora chhota robot ek chip me." Vehicle controller counts vary widely by model; use the car only as a general embedded-systems example.
โก Unit 2 โ Rapid Revision
Size order: Micro < Mini < Mainframe < Super โข Mainframe = bank/IRCTC bulk processing โข Super = weather/ISRO (FLOPS me speed)
Cabinet parts: motherboard, CPU socket, RAM slots, HDD/SSD bay, SMPS, GPU, fan, expansion slots, ports, CMOS battery
CPU = ALU (calculate + compare) + CU (control/command) + Registers (PC, IR, MAR, MDR, ACC)
Microprocessor = CPU on a chip โข Intel 4004 (1971) first โข Clock speed GHz โข Cores dual/quad/octa โข RISC (mobile/ARM) vs CISC (Intel x86)
Explain the program execution process of a C program (compilerโloader). (10)
Microprocessor vs Microcontroller difference with applications. (5)
Short notes: Mainframe vs Supercomputer, SSD vs HDD, Registers, Virtual memory, Touch screen. (5ร2)
Draw and explain memory hierarchy + storage units table (bitโTB). (5)
Explain the instruction cycle with the help of registers (PC, IR, MAR, MDR). (5)
Parts of a motherboard / anatomy of a computer โ explain. (5)
Explain input devices with categories and 2 examples each. (5)
Explain monitor types (CRT/LCD/LED/OLED) in short. (5)
What is a microprocessor? Evolution + performance factors (clock, cores, cache). (5)
UNIT 3 โ Operating System & Networking Fundamentals
3.1 Operating System โ Introduction & Functions
An Operating System (OS) is system software that acts as an interface between the user and the computer hardware. It manages all hardware resources (CPU, memory, I/O devices, files) and provides an environment in which application programs run. Do naam yaad rakho: OS ek resource manager bhi hai (kaun sa resource kisko, kitna milega) aur ek extended machine bhi (user ko hardware ki gandagi se bachakar simple interface deta hai).
Hinglish: OS = office ka manager ๐งโ๐ผ. Aap (user) direct machine se baat nahi karte โ manager se bolte ho, manager hardware (staff) ko kaam batata hai. Windows bolo to "file kholo" โ Windows ne disk se file uthayi, RAM me daali, screen pe dikhayi. OS ke bina computer sirf plastic-metal ka dher hai.
Real life: Windows 11 (laptop), Android (phone), iOS (iPhone), Linux (servers/ATM/railway systems), macOS (Mac). Jab aap ek hi time pe song sunte ho, download karte ho aur PDF kholte ho โ OS hi teeno ko CPU time barabar-baant deta hai (isliye app "hang" nahi hote hamesha). ATM ki screen, IRCTC ka server, JioFiber ka router โ sab kisi na kisi OS par chal rahe hain.
Functions of an Operating System (study the listed functions and explain relevant ones)
#
Function
Detail + Example
1
Process Management
Kaunsa program kab chalega, kitna CPU time milega, process create/stop/schedule karna. (Chrome ke 10 tabs, sabko CPU time milta hai)
2
Memory Management
RAM ka allocation/deallocation, virtual memory, kisi program ki memory doosre se protect karna. (Ek app crash ho to poora PC crash na ho)
Keyboard, printer, mouse sab ke liye device drivers, spooling (printing queue), plug-and-play.
5
Security & Protection
Password/login, file permissions, user accounts, firewall support.
6
User Interface
GUI (icons, mouse, windows) ya CLI (commands).
7
Error Detection & Handling
"Not responding" ki jagah error message dena, crash se bachana, log banana.
8
Job Scheduling & Accounting
Kaunsa job pehle chalega (queues), kis user ne kitna resource use kiya (billing/log).
9
Program Execution
Program ko memory me load karna, run karna, khatam hone par resources free karna.
10
Communication / Networking
Do computers/process ke beech data exchange, internet stack (TCP/IP) support.
Trick โ "PM-FID-SUE-C":Process, Memory, File, I/O, Device, Security, User interface, Error handling, Communication. ("PM FID kar de SUEC" โ bolo "PM fid kar de SUEC" ๐)
Process aur uska life cycle (short note)
Program ek file hai (disk par pada code); process wo program hai jo chal raha hai (RAM me load + CPU time mil raha hai + apni state rakhta hai). Ek program ke kai processes ban sakte hain (Chrome ke 10 tabs = 10 processes, isliye ek tab crash ho to poora browser nahi girta).
State
Matlab
Real-life
New
Process ban raha hai
App icon tap kiya, load hona shuru
Ready
Chalane ke liye tayyar, CPU ka wait
Queue me laga app โ bas CPU khali hote hi chalega
Running
Abhi CPU par chal raha hai
Screen par jo app active hai
Waiting / Blocked
Kisi I/O (file load, net, user input) ka wait
App "loading..." dikha raha hai
Terminated
Kaam khatam, resources free
App band โ RAM/CPU wapas
CPU scheduling ka kaam: ye decide karna ki ready queue me se kaunsa process kab CPU paye โ simple policies jaise FCFS (jo pehle aaya), SJF (sabse chhota kaam pehle), Round Robin (har process ko thoda-thoda time), Priority (zaroori pehle). Isi se multi-tasking "feel" hota hai โ har app ko seconds ke chhote tukde milte rehte hain. Isi ko context switching kehte hain: CPU ek process ki state save karke doosri load karta hai.
CPU scheduling โ worked example (numeral-based question)
Scheduling ka kaam: ready queue me se agla process chunna. A useful scheduling exercise is to calculate average waiting time from a given process table. Waiting time = (process ke finish hone ka time โ uska burst time โ uske aane ka time). Simple example se samajh lo.
Teen processes (time 0 par aaye, CPU ek saath ek hi process chala sakta hai):
P1: 5 ms burst | P2: 3 ms burst | P3: 2 ms burst
(a) FCFS (jo pehle aaya, pehle chalega): P1 โ P2 โ P3
P1: 0 se 5 (wait 0)
P2: 5 se 8 (wait 5)
P3: 8 se 10 (wait 8)
Average waiting time = (0 + 5 + 8) รท 3 = 13 รท 3 โ 4.33 ms
(b) SJF (sabse chhota kaam pehle): P3 โ P2 โ P1
P3: 0 se 2 (wait 0)
P2: 2 se 5 (wait 2)
P1: 5 se 10 (wait 5)
Average waiting time = (0 + 2 + 5) รท 3 = 7 รท 3 โ 2.33 ms
โ SJF ne average waiting time kam kar diya (yehi iska fayda hai).
(c) Round Robin (time slice = 2 ms): P1 โ P2 โ P3 โ P1 โ P2 โ P1
P1: 0โ2, 6โ8, 10โ11 (total 5 ms mila)
P2: 2โ4, 8โ10 (total 3 ms)
P3: 4โ6 (total 2 ms)
Sabko fair time mila, aur koi process zyada der "starve" nahi hua โ
isliye time-sharing systems (Windows/Linux) me RR jaisa logic chalta hai.
Scheduling ke 4 naam yaad rakho:FCFS (simple, par chhota kaam bade ke peeche atak sakta hai), SJF (average waiting time sabse kam, par bade jobs starve ho sakte hain), Round Robin (fair, interactive systems ke liye), Priority (zaroori kaam pehle โ ICU alarm > game download). Real OS inka mix use karte hain (multilevel feedback queue). โฑ๏ธ
3.2 Classification of Operating Systems
Type
Kya karta hai
Example
Batch OS
Jobs ko batches me collect karke ek saath process karta hai, user interact nahi kar sakta
Purane mainframe systems, payroll processing, bank statement generation
Time-sharing / Multi-user
Ek CPU, kai users; CPU time slices me divide hota hai, sabko turant response feel hota hai
Unix, Linux servers, college ka multiuser lab
Multiprogramming
Ek time pe kai programs memory me, jab ek I/O ka wait kare to doosra chal jaye (CPU idle na rahe)
Modern OS ka base concept โ purane mainframes se aaya
Multitasking
Ek user, kai tasks ek saath (time slicing)
Windows 11, macOS โ song + typing + download
Multiprocessing / Parallel
Do ya zyada CPU ek saath kaam (performance double)
Servers, gaming PC (dual CPU), multicore laptops
Real-Time OS (RTOS)
Fixed deadline me kaam โ late hua to fail; safety critical
Battery/thermal limits, updates ke chakkar, sandboxing me flexibility kam
Exam me ye table kaafi hai: "Classification of OS (10 marks)" โ 6โ9 types + example + ek-ek line advantage/limitation. RTOS aur batch OS ke examples (ICU machine / payroll) likhna mat bhoolo โ examiner wahi 2 line ke marks deta hai.
3.3 System Programs, Application Programs and Utilities
Term
Matlab
Examples
System programs
OS ke saath aate hain, system chalane/sambhalne ke liye. (OS khud + uske tools)
User ke kisi kaam ke liye โ user apni zarurat se install karta hai
MS Word, Tally, Photoshop, Instagram, games
Utilities
System ki maintenance/optimisation ke chhote programs
Antivirus, Disk Defragmenter, Disk Cleanup, Backup, WinRAR, Task Manager
Basis
System software
Application software
Kaun chalata hai (machine)
Machine-dependent (hardware ke hisaab se likha)
Generally machine-independent (same app Windows/Mac me)
Kab install
Pre-installed (OS ke saath) ya hardware ke driver ke roop me
User ki zarurat par baad me
User ka interaction
Direct use kam karta hai (background me kaam)
Rozana direct use
Bina iske
Computer start hi nahi hoga
Computer chalega par kaam nahi hoga
Update ka tareeka
OS update/patch (kabhi kabhi hardware banane wale se driver update)
App store / installer
3.4 The Unix Operating System & Basic Commands
Unix is a multi-user, multitasking, portable operating system developed at AT&T Bell Labs (1969) by Ken Thompson and Dennis Ritchie. Iska design itna strong tha ki Linux, macOS, Android aur aaj ke zyadatar servers usi ke concepts (file system, shell, permissions) pe chalte hain. C language bhi isi lab me (Ritchie ne) bani โ isliye Unix ko "C me likha gaya OS" bolte hain.
Kahan milega: Bank ke ATM, IRCTC ke server, Google/Amazon ke data centre, Android phone (Linux kernel), aapka WiFi router, smart TV, aur aaj ka har cloud server โ sab kisi na kisi Unix-family OS pe chal rahe hain ๐ฒ. Windows se alag, Unix me sab kuch "command" se bhi ho sakta hai (CLI ki power) โ isliye servers me Unix/Linux ka raj hai (kam resource, zyada control, free/open source).
Feature
Matlab
Fayda
Multi-user
Ek hi system par kai users ek saath (har user ka apna account/home)
College lab, servers โ cost per user bahut kam
Multitasking
Kai processes ek saath (foreground + background)
Server ek saath web + database + mail chala sakta hai
Portable
Code chhote-bade badlav ke saath doosre hardware par chal jaata
Aaj Unix/Linux har chip (mobile se supercomputer) par hai
Hierarchical file system
Tree structure โ root / se shuru, sab folder usi ke neeche
Organised storage, permissions easy
Security + permissions
Har file par owner/group/others ke read-write-execute rights
Ek user doosre ka data nahi chhed sakta
Shell + scripting
Command interpreter; commands ko script me likhkar automate karna
Rozana ke admin kaam automatic โ scripting Unix ki superpower
Pipes aur redirection
Ek command ka output doosri ka input (|), file me save (>)
Chhote tools milkar bade kaam karte hain
Unix File System (structure yaad rakho)
Root: / (sab kuch iske neeche)
โโโ bin โ basic commands (ls, cp, mv)
โโโ etc โ configuration files
โโโ home โ users ki personal files (/home/ansh)
โโโ dev โ devices (keyboard, disk)
โโโ var โ logs, changing data
โโโ tmp โ temporary files
โโโ usr โ user programs aur libraries
โโโ opt โ extra software
โโโ root โ superuser (admin) ka home
Path: absolute path root se shuru hota hai (/home/ansh/notes/c.txt), relative path current directory se (notes/c.txt). . = current folder, .. = parent folder, ~ = aapka home. Windows me drive letters (C:\) hote hain, Unix me sab kuch ek hi tree me hota hai โ pen drive bhi /media/usb jaisi jagah "mount" hoti hai.
Command
Kaam
Example
pwd
Print working directory (aap kahan ho)
pwd โ /home/ansh
ls
Files list karna
ls -l (details), ls -a (hidden bhi), ls -lh (human-readable size)
Worked example โ commands ka chain (pipe ka jadoo): Maan lo students.txt me saare naam, roll no aur city hain. 1) grep "Kichha" students.txt โ sirf Kichha wale students. 2) grep "Kichha" students.txt | wc -l โ kitne Kichha wale hain (pipe ne output ko wc -l ko diya). 3) grep "Kichha" students.txt | sort > kichha_students.txt โ sorted list file me save. 4) head -10 kichha_students.txt โ pehle 10 dikha do. Poore 4 step โ sirf chhote-chhote commands jodkar ek chhota "program" ban gaya, bina kisi bade software ke. ๐ง
Trick (permissions):r=4, w=2, x=1 โ chmod 755 = owner 7 (4+2+1 = read+write+execute), group 5 (read+execute), others 5. Ek example se yaad ho jaayega: "Owner ko sab kuch (7), baaki janta ko padhne+chalane ki ijazat (5,5)". Aur ek line: chmod 777 = sabko sab kuch (exam me "security ke liye bura" likhna ๐).
Unix practice set โ permissions aur commands (solutions ke saath) Exam practice
Q1. Permission likho octal me: owner = rwx, group = r-x, others = ---
owner: r+w+x = 4+2+1 = 7
group: r+x = 4+0+1 = 5
others: none = 0
=> chmod 750 โ (script ya private folder ke liye common)
Q2. Permission: owner = rw-, group = r--, others = r-- (normal file)
6, 4, 4 โ chmod 644 โ (aaj kal har website file ka default)
Q3. Sabko saari permissions (exam me "security risk" likhna)
chmod 777 โ
Q4. Sirf owner padh sake (private file โ jaise password file)
owner = r-- = 4, group = 0, others = 0 โ chmod 400 โ
Q5. Ek script jo sab chala sake par sirf owner badal sake
owner = rwx = 7, group = r-x = 5, others = r-x = 5 โ chmod 755 โ
Q6. Ulta sawaal: chmod 640 ka kya matlab?
owner = 6 = rw-, group = 4 = r--, others = 0 = ---
"Owner read/write kar sakta hai, group ka sirf read, baaki koi kuch nahi." โ
Q7. Commands likho (tasks โ answers)
(a) Aap kahan ho, pata karo โ pwd
(b) Saari files details ke saath dekho โ ls -l
(c) Naya folder "bca" banao โ mkdir bca
(d) usme jao โ cd bca
(e) File a.txt banao aur usme "Hello" likho โ echo "Hello" > a.txt
(f) Uski copy b.txt banao โ cp a.txt b.txt
(g) File ka content dekho โ cat a.txt
(h) File me "BCA" text dhundho โ grep "BCA" a.txt
(i) File ka naam badal kar note.txt karo โ mv a.txt note.txt
(j) File delete karo โ rm note.txt
(k) Running processes dekho โ ps -ef
(l) Disk space check karo โ df -h
(m) File ka permission 755 karo โ chmod 755 script.sh
Pipe practice (chhote commands jodkar bada kaam):cat marks.txt | grep "Kichha" | wc -l โ marks.txt me Kichha wali lines gin lo. ls -l | grep ".c" โ sirf C files. history | tail -20 โ pichhli 20 commands. Unix ka poora philosophy yahi hai: "chhote tools, pipe se jodo, bada kaam karwao" โ aur scripting me isi ko loop/condition me daal do. ๐ง
Exam me "Unix commands likho aur samjhao (koi 10)" ke liye: table banao โ command | kaam | example. Permissions wala question aaye to pehle r=4, w=2, x=1 likho, phir chmod 755 ka breakdown dikhao. Ye do cheezein hi helps organise a concise answer.
3.5 Microkernel-Based Operating System
A microkernel is a minimal OS kernel that contains only the most essential functions (basic process/memory management and inter-process communication). Baaki saari services โ file system, device drivers, network stack โ user space me separate processes ki tarah chalte hain aur kernel se message passing ke through baat karte hain.
Monolithic Kernel (purana tareeka)
Microkernel (naya tareeka)
Poora OS ek hi bade kernel me (Linux, Windows are mostly monolithic/hybrid)
Real life: Microkernel wale OS reliability maangte hain โ hospital ke ICU machine, car ke braking system, NASA ke space missions, BlackBerry QNX. Jaise ek building me agar poora staff ek hi kamre me ho to baat cheet fast hai par ek aag me sab khatam; alag-alag floor pe ho to thoda coordination lagega par ek floor me aag lage to baaki bach jaayenge ๐ข๐ฅ
Exam answer (5 marks): Microkernel ki 2-line definition โ monolithic vs microkernel ke 4 differences (kernel size, speed, reliability, driver handling) โ 2 examples โ closing line: "safety-critical aur embedded systems me microkernel pasand kiya jaata hai kyunki reliability zyada matter karti hai."
3.6 Booting
Booting is the process of starting (loading) a computer โ jab power button dabate ho tab OS ko memory me load karke computer ko usable banane ki process. Word "boot" "bootstrap" se aaya hai (jaise chappal ke strap se khud ko uthana โ computer khud hi apne aap ko start karta hai).
Booting ke steps (exam me yahi likhna):
1. Power ON โ SMPS sab parts ko current deta hai (CPU reset se start)
2. POST (Power On Self Test) โ BIOS/UEFI hardware check karta hai
(RAM kitni hai, keyboard hai? galat ho to beep ๐)
3. BIOS/UEFI boot device dhundhta hai (boot order: HDD/SSD/USB/DVD/CD-ROM)
4. Bootloader (GRUB/Windows Boot Manager) load hota hai (MBR/EFI se)
5. OS kernel RAM me load hota hai โ hardware drivers initialise
6. OS services start karta hai โ login screen aa jaati hai โ
(Fir background me: user login โ desktop โ apps ready)
Type
Matlab
Kab
Cold boot (hard boot)
Power off โ on, poora process (POST se shuru)
Subah computer on karna
Warm boot (soft boot)
Restart โ power band nahi hoti, sirf OS dobara load (POST skip ho sakta hai)
Update ke baad "Restart now", hang hone par Ctrl+Alt+Del
Boot from network (PXE)
Disk ke bina, network se OS load
Lab computers, thin clients, corporate IT
Dual boot
Ek PC me do OS (Windows + Linux), startup pe choice screen (GRUB)
Students/devs jo dono use karte hain
Basis
BIOS (legacy)
UEFI (modern)
Interface
Text, keyboard-only, purana look
Graphical, mouse support, settings easy
Disk support
MBR โ max 2 TB, 4 primary partitions
GPT โ 9 ZB tak, kai partitions, backup copy
Speed
Slow boot, ek-ek device check
Fast boot, parallel initialisation
Security
Nahi (BOOT sector me virus ho sakta tha)
Secure Boot (sirf signed OS boot ho), Fast Boot
Examples
Purane PCs (2000s se pehle)
2012 ke baad ke lagbhag sab PCs/motherboards
Troubleshooting (practical connection): "Boot device not found" ka matlab HDD/SSD ya uska cable/boot settings kharab hai โ BIOS me boot order check karo. "Operating system not found" = Windows ka bootloader gaya (repair needed). BIOS me boot order change karke pen drive se Windows install karna โ yahi boot process ka sabse common practical use hai. Aur beep patterns (1 beep = normal, repeated beeps = RAM/GPU problem) POST ke error signals hote hain.
3.7 Introduction to Networks & Types of Networks
A computer network is a collection of two or more computers/devices connected together (wired or wireless) so that they can share data, resources (printer, internet, storage) and communicate. Network ke fayde: file sharing, resource sharing (printer/internet ek hi), communication (mail/chat), centralised data (ERP), aur backup/reliability.
Real life: College ka lab jahan sab computers ek printer pe print karte hain = network. Ghar ka WiFi = network. Aapka phone Jio ke tower se juda hai = network. UPI me aapke bank se dusre bank ka paisa = network of networks (internet). Aur hostel me ek room ke 3 phones ka hotspot sharing โ wo bhi chhota network hai ๐.
Component
Kaam
Device example
NIC (Network Interface Card)
Computer ko network se jodne wala adapter; har NIC ka unique MAC address
Ethernet card, WiFi adapter
Switch
LAN ke andar devices ko jodta hai, MAC address dekh kar data sahi device ko bhejta hai
Lab ka 24-port switch
Router
Do alag networks jodta hai, IP ke hisaab se best path choose karta hai
Ghar ka WiFi router (JioFiber/Airtel)
Modem / ONT
ISP ki line (fiber/coax/phone) ke signal ko digital data me convert karta hai
ONT box, ADSL modem
Access Point
Wired network ko wireless (WiFi) banata hai
College ka WiFi AP
Repeater / Extender
Signal ko boost karke range badhata hai
WiFi range extender
Cable / media
Wired connection ka rasta
Cat6 Ethernet, coaxial, optical fibre
Type
Full form
Range
Example
PAN
Personal Area Network
~10 metre
Phone + Bluetooth earbuds, smartwatch, hotspot to laptop
LAN
Local Area Network
Ek building/campus
College lab, ghar ka WiFi (fast, 100 Mbpsโ1 Gbps, apna malik)
MAN
Metropolitan Area Network
Ek shahar
Cable internet ek city me, bank branches ka network, metro ka network
Exam ready: PAN (personal ~10 m) โ LAN (building) โ MAN (city) โ WAN (country/world) โ speed & ownership ke saath table likhna. Aur ek line: fibre sabse fast aur lamba distance cover karta hai, isliye aaj ka internet backbone fibre hi hai.
3.8 Peer-to-Peer vs Client-Server Network
Peer-to-Peer (P2P)
Client-Server
Sab computers barabar (equals), koi central server nahi
Ek central powerful server, baaki sab clients
Har computer apni file share kar sakta hai
Files/data server par centralised
Sasta, chhota network (2โ10 PCs), setup easy
Mehnga, bada network, setup me expert chahiye
Security kamzor
Security/password control strong
Ek PC band = bas usi ka data gaya
Server band = poora kaam ruk gaya (single point of failure)
Example: ghar me 2 laptop file sharing, Torrent/BitTorrent
Example: college ERP, Gmail, bank server, WhatsApp (centralised servers)
Performance network badhne par gir jaati hai (ek-ek peer par load)
Server powerful hota hai โ performance manage ki ja sakti hai (scaling)
Backup/management har machine par alag (painful)
Central backup, updates, user accounts โ admin ke liye aasan
Hinglish: P2P = "sab dost milkar khana banate hain" ๐ฒ (barabari, par agar ek saath na aaye to kaam rukta hai). Client-Server = "hotel me ek kitchen, baaki sab customers" ๐ฝ๏ธ (kitchen ki madad se sabko khana, par kitchen band = sab band). Aaj ka internet mostly client-server hai (Google/WhatsApp servers), aur file-sharing/torrents P2P.
3.9 Network Topologies (layout ke hisaab se)
Topology = network me computers/devices ka connection pattern (layout / design). Topology choose karte waqt dekhte hain: cost, cable, fault tolerance (ek device/cable gaya to kya hoga), speed, aur expansion aasan hai ya nahi.
Topology
Structure
Advantages
Disadvantages
Bus
Ek main cable (backbone), sab uspe jude (T-connector)
Sasta, cable kam, chhote network ke liye simple
Main cable cut = poora network down; fault dhundhna mushkil; slow when busy
Star
Sab devices ek central hub/switch se jude
Ek cable fail = bas wahi PC down; easy fault finding; easy expand. Aaj sabse common
Hub/switch fail = poora network down; zyada cable
Ring
Sab devices ek loop (circle) me, data ek direction me ghoomta hai
Data collision nahi, har device ko equal chance
Ek node down = poora ring ruk sakta hai; add/remove hard
Mesh
Har device har device se jude (poora ya partial)
Sabse reliable + secure; multi-path (ek link gaya to doosra)
Bahut mehnga, wiring zyada
Tree
Star networks ek backbone se jude (hierarchy)
Bade campus me structured expansion
Root fail = bahut kuch down
Hybrid
Do ya zyada topologies ka mix
Flexible, real networks aise hi hote hain
Complex + costly
Bus: PC โโโฌโโ PC โโโฌโโ PC โโโโโโ main cable (backbone) โโ terminator
Star: PC PC
โฒ โฑ
SWITCH โโโโ PC (aaj college lab/ghar WiFi isi shape me)
โฑ โฒ
PC PC
Ring: PC โโโถ PC (data ek direction me circle ghoomta hai)
โฒ โ
โโโ PC โโ
Mesh: PC โโโโ PC (partial mesh: har PC kam se kam 2 links se juda)
โ โฒ โฑ โ
โ โณ โ
โ โฑ โฒ โ
PC โโโโ PC
Tree: Backbone switch โโโ dept switch (1) โโโ lab switch โโ PCs
โโโ dept switch (2) โโโ office PCs
Kahan dikhta hai: College lab = Star (ek switch se sab PCs) โข Aapka ghar ka WiFi router = Star โข Internet ka backbone = Mesh (partial) โข Bade campus (university) = Tree/Hybrid โข Mobile network = Mesh + Cellular โข Bluetooth earbuds = PAN (point-to-point).
Exam answer tip: "Network topologies โ types, advantages/disadvantages with diagram (10 marks)" โ 6 topologies ka table + 2โ3 diagrams + real example + closing line: "Star aaj sabse popular hai (easy fault-finding), Mesh sabse reliable (multiple paths), Bus/ Ring mainly teaching concepts aur purane networks me."
3.10 Networking Terms & Devices (glossary โ MCQ ka khazana)
Term / Device
Kaam / Matlab (simple Hinglish)
Node
Network se juda koi bhi device (PC, phone, printer)
Hub
Sabse simple device โ jo aaya use sabko bhej deta hai (dumb device, collision hota hai). Purana. "Mic wala teacher jisko pura class sunta hai" ๐
Switch
Hub ka smart version โ MAC address dekh kar sirf usi device ko data bhejta hai jiske liye tha (fast, no collision). College/lab me switch hi hota hai
Router
Do alag networks ko jodta hai aur data ka rasta (path) choose karta hai โ IP address ki bookkeeping. Aapka ghar ka WiFi router = ghar ke LAN ko internet (WAN) se jodta hai; "post office" jaisa
Modem
Digital โ analog signal convert karta hai (line/cable pe data bhejne ke liye). Router me modem built-in hota hai aaj (JioFiber ONT)
Gateway
Do different networks/protocols ke beech entry-exit point ("darwaza" of network)
NIC (Network Interface Card)
PC me lagne wala network adapter โ Ethernet ya WiFi card; har NIC ka ek unique MAC address hota hai
Repeater
Signal ko boost/refresh karta hai taaki door tak pahuche (range badhata hai)
Bridge
Do LAN segment jodta hai (same type network)
Access Point (AP)
WiFi signal deta hai โ wired network ko wireless banata hai
Bandwidth
Data transfer ki capacity โ "pipe kitna mota hai" (Mbps/Gbps). 100 Mbps = 1 sec me ~12.5 MB data.
Latency (ping)
Data ko jaane-aane me kitna time laga (ms) โ pipe kitni lambi hai. Online gaming me ping kam = achha
Protocol
Rules ka set jisse devices baat karte hain โ TCP/IP (internet ka), HTTP/HTTPS (web), FTP (file transfer), SMTP/POP3/IMAP (email), DHCP (IP dena), DNS (naamโIP)
Packet
Data ko chhote tukdon me todkar bhejna โ har packet me sender + receiver ka address. (Chhote parcel jaise)
Web server
Wo computer/software jo websites serve karta hai (Apache, Nginx, IIS). "Dukaan" jahan se aapko page milta hai
Firewall
Network ka chowkidaar ๐ โ unauthorised traffic block karta hai (Windows Defender Firewall)
IP Address
Har device ka unique network address (192.168.1.1) โ "ghar ka address"
MAC Address
NIC ka permanent hardware address (12 hex digits) โ "aadhaar card" of the device
Topology / Node / Host
Layout / network ka device / wo computer jispe service chalti hai (server host)
Worked bandwidth example: Plan hai 100 Mbps (megabits per second). 1 byte = 8 bits, isliye real download speed = 100 รท 8 = 12.5 MB/s. 2 GB ki movie = 2,000 MB (approx) โ 2,000 รท 12.5 = 160 second โ 2.7 minute. Aur agar ping 80 ms hai to gaming me thoda lag feel hoga โ bandwidth aur latency alag cheezein hain (pipe mota ho par lamba bhi ho ๐). ๐งฎ
Hub vs Switch vs Router โ ek line me: Hub = chilla kar sabko batata hai (sab sunte hain). Switch = note pass karta hai sirf usi ko jiska naam hai. Router = do buildings ke beech ka post office, address dekh kar rasta decide karta hai. ๐ฌ
Q1. 4 Mbps connection par 10 MB ka file?
Speed = 4 รท 8 = 0.5 MB/s
Time = 10 รท 0.5 = 20 second โ
Q2. 50 Mbps par 1 GB (1024 MB) file?
Speed = 50 รท 8 = 6.25 MB/s
Time = 1024 รท 6.25 = 163.84 s โ 2 minute 44 second โ
Q3. 100 Mbps par 2.5 GB (2560 MB) movie?
Speed = 12.5 MB/s โ Time = 2560 รท 12.5 = 204.8 s โ 3 min 25 s โ
Q4. 5 Mbps ka hotspot 4 log share kar rahe hain, sab download kar rahe hain.
Har ek ko approx 5 รท 4 = 1.25 Mbps โ 156 KB/s milta hai โ
(Isliye "WiFi slow hai" ka ek karan share karna bhi hai.)
Q5. Online game me ping 20 ms hai aur ek doosre server par 200 ms โ
farak? 200 ms me lag/teleport feel hota hai; 20 ms me smooth โ
Bandwidth aur latency alag hain: file download bandwidth se fast hoti hai,
par gaming latency se smooth hoti hai.
Plan (bandwidth)
Actual download speed
1 GB file ka time
2 Mbps
0.25 MB/s
~68 minute
8 Mbps
1 MB/s
~17 minute
25 Mbps
3.125 MB/s
~5.5 minute
50 Mbps
6.25 MB/s
~2 min 44 s
100 Mbps
12.5 MB/s
~1 min 22 s
1 Gbps (fibre)
125 MB/s
~8 second
Yaad rakhne ka shortcut: "Mbps ko 8 se baat do, MB/s mil jaayega. Uske baad file size รท speed = time." Exam me steps dikhana โ kyunki examiner formula aur units (MB vs Mb) dekhta hai. ๐งฎ
Topology practice (diagram-based questions)
College ke 60 computers ko ek switch se joda gaya hai โ kaunsi topology? (Star)
Ek lab me 5 computers ek hi backbone cable par T-connector se jude hain โ kaunsi? (Bus)
Bank ke 12 branches ko ek dusre se point-to-point lines se joda gaya โ kaunsi? (Mesh)
University me 4 departments ke apne star networks ek central backbone se jude hain โ kaunsi? (Tree)
Kaunsi topology me ek node fail hone par poora loop ruk sakta hai? (Ring)
Aaj ke LAN me sabse common topology? (Star) Aur kyun? (ek cable fail = sirf wahi PC down, fault-finding easy, expand easy)
OS type matching practice + booting questions
Scenario
Sahi OS type
Kyun
ICU ka ventilator, jo 5 ms ke andar alarm bajaata hai
RTOS
Deadline miss hui to patient ki jaan khatre me โ deterministic timing zaroori
Bank ka raat ka interest calculation job (11 baje se 3 baje)
Batch OS
Koi user interact nahi karta; bada volume ek saath process
College lab ka server jahan 40 students ek saath login hote hain
Time-sharing (multi-user)
CPU time slices me baant ta hai, sabko response feel hota hai
Smart TV / washing machine ka control system
Embedded OS
Fixed kaam, kam resource, bijli kam
Google ka data centre (hazaaron servers ek system jaise)
Distributed OS
Kaam nodes me bant ta hai; ek node gaya to kaam chalta rahe
Android/iOS phone
Mobile OS
Touch UI, battery efficiency, app permissions
Gaming PC me do CPU sockets + Windows me song + download + game
Multiprocessing + multitasking
Do CPU parallel me + time slices se ek user ke kai tasks
Purana bank system: jobs punch cards me collect karke raat me process
Batch OS
Classic batch example (payroll/statement)
Booting sequence ko sahi order me lagao (jumbled steps ka question):
(a) OS kernel RAM me load hota hai
(b) POST hardware check karta hai
(c) Bootloader (GRUB) chalta hai
(d) Login screen aati hai
(e) Power ON + CPU reset
Sahi order: (e) โ (b) โ (c) โ (a) โ (d) โ
Troubleshooting (short answers):
Q1. "Boot device not found" ka matlab?
โ BIOS ko bootable disk nahi mili โ HDD/SSD kharab/cable loose/boot order galat.
Q2. Windows slow boot hota hai โ do reasons?
โ HDD (SSD ki jagah), startup apps zyada, ya disk full (free space kam).
Q3. Ctrl+Alt+Del kaunsa boot hai?
โ Warm boot (restart โ power band nahi hoti).
Unit 3 MCQs (answers neeche):
OS ka main kaam? (a) Sirf printing (b) User aur hardware ke beech interface + resources manage (c) Sirf antivirus (d) Sirf internet
RTOS ka example? (a) Payroll batch (b) Airbag system (c) Excel (d) Chrome
Unix me file ka permission 755 ka matlab? (a) Sabko sab (b) Owner rwx, group r-x, others r-x (c) Owner r-- (d) Koi access nahi
Sabse common LAN topology? (a) Bus (b) Ring (c) Star (d) Mesh
Hub aur switch me farak? (a) Hub smart (b) Switch MAC dekh kar bhejta hai (c) Dono same (d) Switch purana hai
100 Mbps par 1 GB file? (a) ~82 second (b) ~10 second (c) ~5 minute (d) ~2 second
Microkernel ka fayda? (a) Speed hamesha zyada (b) Reliability/security โ driver crash se OS nahi girta (c) Sasta hardware (d) Koi nahi
MAC address kitne bits ka hota hai? (a) 32 (b) 48 (c) 64 (d) 128
User aur kernel ke beech command interpreter (bash)
Process vs program
Chalta hua program (state + resources) vs disk par pada code
Context switch
CPU ek process se doosre par jaana (state save/restore)
Multitasking
Ek user ke kai tasks time-slicing se
RTOS
Real-Time OS โ designed to meet timing deadlines (e.g., control systems); correctness includes timing
Booting
OS ko memory me load karke machine start karna
POST
Power On Self Test โ BIOS ka hardware check
BIOS / UEFI
Legacy firmware (MBR, slow) vs modern (GPT, Secure Boot)
File permission
r=4, w=2, x=1 โ chmod 755 etc.
Node
Network se juda koi bhi device
Hub / Switch / Router
Broadcast / MAC-based smart forwarding / do networks jodna
Protocol
Rules ka set (TCP/IP, HTTP, SMTP)
Packet
Data ka chhota tukda (sender + receiver address ke saath)
Bandwidth vs Latency
Capacity (Mbps) vs delay (ms)
Topology
Network ka layout (bus, star, ring, mesh, tree, hybrid)
Model answers โ Unit 3 ke 5 sabse important questions
Q1. What is an operating system? Explain any 8 functions. (10) Answer: OS = system software jo user aur hardware ke beech interface hai; saare resources (CPU, memory, I/O, files) manage karta hai aur applications ko chalane ka environment deta hai. Functions: (1) Process management โ kaunsa program kab CPU payega, schedule/context switch (Chrome ke 10 tabs). (2) Memory management โ RAM allocation, virtual memory, ek program ki memory doosre se protect (ek app crash ho to poora PC na gire). (3) File management โ create/copy/delete, folders, permissions. (4) I/O & device management โ drivers, spooling (print queue), plug-and-play. (5) Security โ login, user accounts, file permissions, firewall support. (6) User interface โ GUI ya CLI. (7) Error handling โ error messages, logs, crash se bachav. (8) Job scheduling & accounting โ queues + resource usage ka record. Aur 2 add karne ho to: program execution (load/run/free) aur communication/networking (TCP/IP stack). Trick: PM-FID-SUE-C.
Q2. Classification of operating systems with examples. (10) Answer:Batch OS โ jobs batches me, no interaction (payroll, purane mainframes). Time-sharing/multi-user โ ek CPU kai users, time slices (college lab server, Unix). Multiprogramming โ kai programs memory me, I/O wait me doosra chale (CPU idle na rahe). Multitasking โ ek user kai tasks (Windows me song + download + typing). Multiprocessing โ do+ CPU parallel (servers, gaming PC). RTOS โ designed for bounded timing requirements; hard real-time systems treat missed deadlines as failures. Distributed OS โ kai computers ek system jaise (Google data centre). Embedded OS โ chhote device me fixed kaam (smart TV, router). Mobile OS โ touch, battery-friendly (Android, iOS). Table me "example + 1 advantage + 1 limitation" likhna hi helps make the answer complete.
Q3. Explain Unix commands with examples (any 10). (10) Answer: pwd (kahan ho โ /home/ansh) โข ls -l/-a (files list, details/hidden) โข cd notes, cd .. (directory change) โข mkdir bca (folder banao) โข cat a.txt (content dekho) โข cp a.txt b.txt (copy) โข mv a.txt docs/ (move/rename) โข rm file.txt, rm -r folder (delete) โข grep "BCA" students.txt (text search) โข chmod 755 script.sh (permission: r=4, w=2, x=1) โข ps -ef, kill 1234 (processes dekhna/band karna) โข df -h, du -sh (disk space). Saath me 2 line Unix ke baare me: 1969 Bell Labs, Ken Thompson & Dennis Ritchie; multi-user, multitasking, portable, hierarchical file system (root / se sab). Pipe ka example: cat marks.txt | grep Kichha | wc -l โ chhote tools milkar bada kaam karte hain.
Q4. Network topologies โ types with advantages/disadvantages. (10) Answer:Bus โ ek backbone cable; sasta, cable kam; cable cut = poora down, fault dhundhna mushkil. Star โ sab ek central switch/hub se; ek cable fail = sirf wahi PC down, expand/fault-finding easy (aaj sabse common); central device fail = poora down. Ring โ loop me data ek direction; collision nahi, equal chance; ek node down = ring ruk sakta hai. Mesh โ har device har device se; sabse reliable + secure (multi-path); bahut mehnga. Tree โ star networks backbone se (hierarchy); campus ke liye; root fail = bahut kuch down. Hybrid โ mix; flexible par complex. Closing: "college lab = star, internet backbone = partial mesh, university campus = tree/hybrid" โ real examples se answer strong hota hai. Diagram small banao par symbols sahi rakho.
Q5. Explain the booting process. Cold boot vs warm boot. (5) Answer: Booting = computer ko start karke OS ko memory me load karna. Steps: Power ON (SMPS current) โ POST (BIOS/UEFI hardware check; error par beep) โ boot device search (boot order: HDD/SSD/USB) โ bootloader (GRUB/Windows Boot Manager) โ OS kernel RAM me load + drivers init โ services start โ login screen. Cold boot = power off se on, poora POST (subah PC on karna). Warm boot = restart bina power band, POST skip ho sakta hai (Ctrl+Alt+Del, update ke baad restart). Closing: "BIOS (MBR, 2 TB limit, no secure boot) vs UEFI (GPT, fast boot, secure boot)" + troubleshooting line: "boot device not found = disk/cable/boot order ka issue".
โก Unit 3 โ Rapid Revision
OS = interface between user & hardware (resource manager + extended machine) โข Functions: Process, Memory, File, I/O, Security, UI, Error handling, Scheduling (PM-FID-SUE-C)
Microkernel based OS kya hai? Monolithic se difference. (5)
Booting process explain karo. Cold boot vs warm boot. (5)
Types of network (PAN/LAN/MAN/WAN) difference with examples. (5)
Network topologies ke types โ advantages/disadvantages with diagram. (10)
P2P vs Client-Server network. (5)
Short notes: Hub vs Switch vs Router, Firewall, Protocol, Bandwidth, Packet, Web server. (5ร2)
What is a process? Explain process states with diagram. (5)
BIOS vs UEFI โ difference in points. (5)
Explain any 4 network devices with their working. (5)
Write short notes on transmission media (twisted pair, coaxial, fibre). (5)
What is bandwidth? 50 Mbps plan par 1 GB file kitni der me download hogi? (5)
UNIT 4 โ Introduction to Database Management Systems
4.1 Database, DBMS & Why Database
Database: An organised collection of related data stored in a structured way so that it can be easily accessed, managed and updated. DBMS: Software that allows users to create, store, retrieve, update and manage databases (and controls who can do what). Examples of DBMS: MySQL, Oracle, PostgreSQL, SQL Server, MongoDB.
Hinglish: Database = ek smart almari jisme har cheez apni jagah, labelled: ek drawer me students, ek me marks, ek me fees. DBMS = us almari ka caretaker ๐งโ๐ง jo bolne pe cheez nikaalta hai, nayi rakh deta hai, duplicate rok deta hai, aur unauthorised bande ko haath nahi lagane deta.
Real life: Aapka DigiLocker/Aadhaar (190+ crore records), IRCTC (railway seat booking), college ka ERP (attendance + marks + fees), PhonePe/UPI transactions, WhatsApp messages, Amazon/Flipkart ka inventory โ sab DBMS (MySQL, Oracle, PostgreSQL, MongoDB) par chal rahe hain. Jab aap ek order place karte ho, 4โ5 tables me ek saath entry hoti hai โ order, payment, inventory, delivery, customer history.
File System vs DBMS (classic 10-mark question)
Basis
File System
DBMS
Data storage
Data alag-alag files me (flat files) rakha jata hai
Central database, tables me organised
Redundancy (duplication)
Zyada โ same data kai files me repeat
Kam โ normalization se controlled
Consistency
Ek jagah update, doosri jagah purana = inconsistency
Consistency maintained (single source)
Data sharing
Mushkil, multi-user ke liye nahi bana
Easy โ kai users ek saath, permissions ke saath
Security
Sirf file-level (poori file ka access)
User-level + table/row/column level permissions
Query / search
Manual program likhna padta hai har search ke liye
SQL se 1 line me query (SELECT * FROM ...)
Concurrency (ek saath)
Do users ek hi file edit karein = data bigad sakta hai
Transaction + locking se safe
Backup & recovery
Manual, mushkil
Built-in tools, auto-recovery (crash ke baad bhi data safe)
Data integrity
Koi check nahi (galat age bhi chal jayegi)
Constraints (CHECK, UNIQUE, FK) se rules lagte hain
Cost/Example
Sasta, chhote kaam ke liye (CSV, Excel file)
Mehnga thoda, bade kaam ke liye (MySQL, Oracle)
Program-data independence
Program me file ka structure hard-coded โ structure badla to program badla
Data redundancy kam, consistency high; ek hi jagah update
Costly: license, hardware, DBA ki training
Data sharing + multi-user concurrency (locking/transactions)
Complex โ design, tuning, migration ka kaam
SQL se fast query, reports, joins
Chhote/simple kaam (ek file, ek user) me overkill
Security + integrity (users, roles, constraints)
Poora fail ho to saara data ek jagah blocked (dependency)
Backup/recovery tools, crash ke baad bhi data safe
DBMS specialist chahiye โ chhoti team ke liye bhaari
Program-data independence (schema badla, program chhoda waise ka waise)
Real-time hard systems me latency + single point of failure manage karna padta hai
Exam me ye 3 line pakki likho: "DBMS = software jo database ko create, manage, secure aur query karne deta hai." + "Redundancy aur inconsistency file system ki sabse badi problem hai โ DBMS unhe control karta hai (normalization + constraints)." + "SQL standard query language hai jo DBMS me data nikalne/badalne ke liye use hoti hai."
DBMS components (short-note practice)
Component
Kaam
Andar kya aata hai
Query processor
SQL query ko samajhkar plan banata hai aur execute karta hai
Parser (syntax check), optimiser (best plan chunna), executor
Storage manager
Disk par data file/block level par sambhalta hai โ read/write efficient banata hai
Buffer manager (RAM me pages), file manager, index + B-tree
Transaction manager
Transactions (COMMIT/ROLLBACK), locking aur recovery sambhalta hai
Concurrency control, logging, recovery manager
Data dictionary (metadata)
Tables, columns, types, constraints, users ki info rakhta hai โ apne aap update
Data independence (ek line me):Program ko database ki physical storage ki detail jaanne ki zaroorat na ho โ ek naya index banao ya disk badlo, application code waisa hi chalta rahe. Isi liye DBMS me schema 3 levels me socha jaata hai: external (user view), conceptual (poore database ka logical design), internal (storage ka tarika). Ye teen-level architecture hi file system se sabse bada design farak hai.
4.2 Database Applications & Users
Applications (kahan-kahan chalta hai)
Domain
Kya store hota hai
Real example
Banking
Accounts, transactions, loans, ATM records, KYC
Aapka balance galat nahi hota โ do updates (debit+credit) ek transaction me
Railway / Airline reservation
Seats, PNR, timings, fare, waitlist
Double booking nahi hona โ DBMS ka locking aur transaction ka catch
Classic textbook examples โ har ek me tables + reports
Database Users (kaun-kaun use karta hai)
User
Kaam
Example
End user (naive/parametric)
App/ATM/website se daily data entry-query karta hai โ database ka structure nahi jaanta
Bank clerk, receptionist, aap (UPI app se)
Application programmer
Apps banata hai jo database se baat karti hain (Java/Python + SQL)
ERP ka developer, mobile app team
Sophisticated user
Complex queries/reports khud banata hai (analyst, manager)
Data analyst, sales manager ka report
DBA (Database Administrator)
Database ka boss โ design, install, backup, security, performance, users banana, recovery
College ka DBA, bank ka database team
System analyst / Designer
Requirement samajh kar database ka structure (schema) design karta hai
Project ke starting phase me ER design + tables
DBA ki responsibilities (5 marks me poochhi jaati hain): schema design + changes, user accounts aur permissions (GRANT/REVOKE), backup & recovery planning, performance tuning (indexes, queries), security + auditing, space management. Ek line: "DBA database ka admin hota hai โ accuracy, availability aur security uski zimmedari hai."
4.3 Introduction to SQL
SQL (Structured Query Language) is the standard language used to create, manipulate and control relational databases. (Development: IBM, 1970s โ Edgar F. Codd ke relational model par, "SEQUEL" se aaya; ANSI standard 1986.) SQL declarative hai โ aap batate ho "kya chahiye", "kaise nikalna hai" DBMS ka engine decide karta hai.
SQL ke 5 sub-languages (yaad karne ka golden trick โ "DDL DML DCL TCL"): Define (structure) โ Data (rows) โ Domain/Login (control) โ Transaction โ Query (fetch).
Category
Full form
Kaam
Commands
DDL
Data Definition Language
Table/database ka structure banana ya badalna
CREATE, ALTER, DROP, TRUNCATE, RENAME
DML
Data Manipulation Language
Data (rows) ke saath kaam โ insert/update/delete/select
INSERT, UPDATE, DELETE, SELECT
DCL
Data Control Language
Access/permission control
GRANT, REVOKE
TCL
Transaction Control Language
Transaction save/undo karna
COMMIT, ROLLBACK, SAVEPOINT
DQL
Data Query Language (kuch books me)
Data fetch karna
SELECT
Command
Category
Ek line me
Danger level
CREATE TABLE
DDL
Nayi table + columns + constraints banata hai
Safe (galat design future me pareshani)
ALTER TABLE
DDL
Column add/modify/drop ya constraint change
Medium (badi table par slow ho sakta hai)
TRUNCATE TABLE
DDL
Saari rows ek jhatke me delete, structure rahega
High (rollback normally nahi)
DROP TABLE
DDL
Table hi delete โ structure + data dono
Sabse high โ ๏ธ
INSERT / UPDATE / DELETE
DML
Rows add / badlo / hatao (WHERE ke saath)
Medium (transaction se safe)
SELECT
DQL/DML
Data padho (kuch bhi nahi badalta)
Zero โ sirf padhna
GRANT / REVOKE
DCL
Permission do / chhino
High (galat GRANT = security hole)
COMMIT / ROLLBACK / SAVEPOINT
TCL
Transaction pakka karo / cancel karo / beech ka point
Medium
High-yield syllabus topic trap โ DELETE vs TRUNCATE vs DROP: DELETE (DML): kuch rows hatane ke liye, WHERE lag sakta hai, undo ho sakta hai (rollback), slow (row-by-row). TRUNCATE (DDL): poori table ki saari rows, WHERE nahi, fast, rollback nahi (normally). DROP (DDL): table hi gayab โ structure + data dono. Yaad: DELETE = kuch nikaalna, TRUNCATE = sab khali karna (dabba rahega), DROP = dabba hi tod dena ๐ฆ
Numbers, marks, fees, IDs; p = total digits, s = decimal ke baad
marks INT, fees DECIMAL(8,2)
Character / String
CHAR(n) (fixed), VARCHAR(n) (variable), TEXT
Naam, address, email; VARCHAR me sirf jitna data utni jagah
name VARCHAR(50), roll_no CHAR(8)
Date & Time
DATE, TIME, DATETIME, TIMESTAMP, YEAR
DOB, admission date, order time; TIMESTAMP ka use audit ke liye
dob DATE, created_at TIMESTAMP
Binary / Other
BOOLEAN, BLOB, ENUM, JSON
True/false, images/files (BLOB), fixed choices, semi-structured data
is_paid BOOLEAN, gender ENUM('M','F')
Real-life: College ERP ki student table me โ roll_no VARCHAR(10) ("BCA24001"), name VARCHAR(50), dob DATE, sem INT, fees DECIMAL(8,2). Agar galat type choose kiya โ jaise roll_no me INT โ to "BCA24001" hi store nahi hoga ๐ , aur fees FLOAT me 5000.10 me rounding ki galti aa sakti hai (paise ke liye DECIMAL best). Isliye type choose karna important hai โ size chhota rakho (storage bachta hai), aur meaning ke hisaab se type do.
4.5 DDL with Constraints (structure + rules)
-- Table banana
CREATE TABLE student (
roll_no INT PRIMARY KEY, -- unique + not null
name VARCHAR(50) NOT NULL,
email VARCHAR(60) UNIQUE, -- duplicate email nahi
age INT CHECK (age >= 17), -- rule: 17 se kam age allowed nahi
city VARCHAR(30) DEFAULT 'Kichha',
marks INT,
course_id INT,
FOREIGN KEY (course_id) REFERENCES course(course_id)
);
-- Structure change
ALTER TABLE student ADD phone VARCHAR(15); -- naya column
ALTER TABLE student MODIFY name VARCHAR(80); -- size badla
ALTER TABLE student DROP COLUMN phone; -- column hatana
-- Hatana
TRUNCATE TABLE student; -- saari rows (structure rahega)
DROP TABLE student; -- table hi hat gaya (structure + data)
-- Constraints baad me bhi add ho sakte hain
ALTER TABLE student ADD CONSTRAINT chk_marks CHECK (marks BETWEEN 0 AND 100);
Constraint
Kaam
Real-life example
PRIMARY KEY
Har row ki unique identity, NULL nahi ho sakta, ek hi per table
Aadhaar/Roll number โ duplicate nahi
FOREIGN KEY
Do tables ko jodna; jo value doosri table me ho wahi allowed
student.course_id sirf course table me existing ho
UNIQUE
Value repeat nahi ho sakti (par NULL ho sakta hai)
Email, mobile number
NOT NULL
Ye column khali nahi chhod sakte
Name compulsory hai
CHECK
Condition lagana
age >= 17, marks 0โ100, gender 'M'/'F'
DEFAULT
Value na do to ye apne aap lag jaayega
city DEFAULT 'Kichha', status DEFAULT 'pending'
Keys in SQL (short-note practice)
Key
Matlab
Example
Super key
Koi bhi column(s) ka set jo row ko uniquely identify kare
roll_no, email, (roll_no+name) โ sab super keys
Candidate key
Minimal super key โ isse chhota karne par uniqueness jaati hai
roll_no, email (dono candidate keys)
Primary key
Chuna hua ek candidate key โ table ka main identity, NULL nahi
roll_no PRIMARY KEY
Alternate key
Baaki bache candidate keys (primary ke alawa)
email UNIQUE
Foreign key
Doosri table ki primary key ka reference โ relationship banata hai
student.course_id โ course.course_id
Composite key
Do ya zyada columns mil kar primary key
attendance: (roll_no, date) โ ek din me ek attendance
Exam-ready: "Constraints kya hain + koi 5 explain karo" โ table wale 6 constraints + real example. Aur ek line: "Constraint database par rule lagata hai โ isse data galat store hi nahi hota (integrity)." Primary key vs unique ka farak: PK me NULL nahi, UNIQUE me ek-ek NULL allowed; table me ek hi PK ho sakta hai, kai UNIQUE ho sakte hain. ๐
4.6 DML โ Practical SQL examples
DML (Data Manipulation Language) commands se table ke andar ka data manage hota hai โ nayi row daalna (INSERT), badalna (UPDATE), hatana (DELETE) aur padhna (SELECT). Ye wahi commands hain jo aap rozana kisi bhi app ke peeche chalti hain.
Sab examples ke liye ye do tables maan lo (schema ยง4.5 me banaya tha):
student table
roll_no
name
email
age
city
marks
course_id
1
Ansh
ansh@mail.com
19
Kichha
78
101
2
Priya
priya@mail.com
20
Haldwani
85
102
3
Rahul
rahul@mail.com
18
Kichha
65
101
4
Neha
neha@mail.com
21
Rudrapur
91
103
5
Aman
aman@mail.com
19
Kichha
55
102
course table
course_id
course_name
fees
101
BCA
25000
102
BBA
22000
103
BCom
18000
-- 1. INSERT (nayi rows)
INSERT INTO student (roll_no, name, email, age, city, marks, course_id)
VALUES (1, 'Ansh', 'ansh@mail.com', 19, 'Kichha', 78, 101);
INSERT INTO student VALUES (2, 'Priya', 'priya@mail.com', 20, 'Haldwani', 85, 102);
-- (jab saari columns ka value de rahe ho to column list optional hai)
-- 2. SELECT (padhna) โ kuch columns
SELECT name, city FROM student;
-- 3. WHERE (condition) โ AND, OR, NOT
SELECT * FROM student WHERE age >= 19 AND city = 'Kichha';
SELECT * FROM student WHERE city = 'Kichha' OR city = 'Haldwani';
-- 4. BETWEEN, IN, LIKE, IS NULL
SELECT * FROM student WHERE marks BETWEEN 70 AND 90; -- 70 se 90 ke beech
SELECT * FROM student WHERE city IN ('Kichha','Haldwani'); -- list me se koi
SELECT * FROM student WHERE name LIKE 'A%'; -- A se shuru (Ansh, Aman)
SELECT * FROM student WHERE email IS NULL; -- NULL wale
-- 5. Sorting + limit
SELECT * FROM student ORDER BY marks DESC; -- zyada marks pehle
SELECT * FROM student ORDER BY city ASC, marks DESC; -- city se, phir marks
SELECT * FROM student LIMIT 3; -- sirf top 3 rows
-- 6. Aggregate (ganit wale functions) + GROUP BY
SELECT COUNT(*), AVG(marks), MAX(marks), MIN(marks), SUM(marks) FROM student;
SELECT city, COUNT(*) AS students FROM student GROUP BY city;
SELECT city, AVG(marks) FROM student GROUP BY city HAVING AVG(marks) > 60;
-- 7. UPDATE (rows badalna โ WHERE ke bina sab rows badal jaayengi! โ ๏ธ)
UPDATE student SET city = 'Rudrapur' WHERE roll_no = 2;
UPDATE student SET marks = marks + 5 WHERE city = 'Kichha';
-- 8. DELETE (rows hatana)
DELETE FROM student WHERE roll_no = 5;
-- DELETE FROM student; -- โ ๏ธ saari rows gayi
-- 9. Do tables jodna (JOIN)
SELECT s.name, c.course_name, c.fees
FROM student s JOIN course c ON s.course_id = c.course_id;
Outputs (exam me queries ke saath result bhi likhna โ yahi useful answer-writing step hai)
Query:SELECT name, city FROM student WHERE age >= 19 AND city = 'Kichha';
name
city
Ansh
Kichha
Aman
Kichha
(Rahul Kichha ka hai par age 18 โ filter me nahi aaya. Condition AND thi, isliye dono sach hona zaroori.)
Query:SELECT COUNT(*), AVG(marks), MAX(marks), MIN(marks) FROM student;
COUNT(*)
AVG(marks)
MAX(marks)
MIN(marks)
5
74.8
91
55
(AVG = (78+85+65+91+55) รท 5 = 374 รท 5 = 74.8; MAX = Neha 91; MIN = Aman 55.)
Query:SELECT city, COUNT(*) FROM student GROUP BY city;
city
COUNT(*)
Kichha
3
Haldwani
1
Rudrapur
1
(Aur agar HAVING COUNT(*) > 1 lagta to sirf Kichha (3) bachta โ WHERE rows par filter lagata hai (group banne se pehle), HAVING groups par (group banne ke baad).)
Query:SELECT s.name, c.course_name, c.fees FROM student s JOIN course c ON s.course_id = c.course_id;
name
course_name
fees
Ansh
BCA
25000
Priya
BBA
22000
Rahul
BCA
25000
Neha
BCom
18000
Aman
BBA
22000
(JOIN ne student.course_id ko course table se mila kar naam nikaal diya โ isi liye alag tables rakhna best hai; course ka naam sirf ek jagah likha hai.)
SQL keywords ka Hinglish meaning:SELECT = "kaunse columns dikhane hain", FROM = "kis table se", WHERE = "kis condition pe", ORDER BY = "kaise sort karna", GROUP BY = "kis cheez pe group banana", JOIN = "do tables jodna", HAVING = "group pe filter". Exam me clause ka order yaad rakho: SELECT โ FROM โ WHERE โ GROUP BY โ HAVING โ ORDER BY โ LIMIT. ๐ฏ
Common mistakes (numbers kat jaate hain): (1) UPDATE/DELETE me WHERE bhoolna = poori table badal/gayab. (2) Text values ko single quotes me na likhna ('Kichha' sahi, Kichha galat). (3) = ki jagah == likhna (SQL me = hi hota hai). (4) Aggregates ko WHERE me use karna (WHERE COUNT(*) > 1 galat โ HAVING chahiye). (5) NULL ko = NULL se compare karna โ sahi tarika IS NULL hai.
SQL practice set โ queries aur expected output Exam practice
Neeche wale sawaal ยง4.6 ki sample tables (student, course) par hain. Pehle khud likho, phir output milao.
Q1. 70 se zyada marks wale students
SELECT * FROM student WHERE marks > 70;
Output: Ansh (78), Priya (85), Neha (91) โ 3 rows
Q2. Kichha ke wo students jinki age 18 se zyada hai
SELECT name FROM student WHERE city = 'Kichha' AND age > 18;
Output: Ansh, Aman โ (Rahul 18 hai โ ">" me nahi aayega)
Q3. Marks ke hisaab se descending order me saare students
SELECT name, marks FROM student ORDER BY marks DESC;
Output: Neha 91, Priya 85, Ansh 78, Rahul 65, Aman 55 โ
Q4. Kichha me kitne students hain?
SELECT COUNT(*) FROM student WHERE city = 'Kichha';
Output: 3 โ
Q5. Har city ka average marks
SELECT city, AVG(marks) FROM student GROUP BY city;
Output: Kichha 66.0 (198/3), Haldwani 85.0, Rudrapur 91.0 โ
Q6. Sirf wo cities jahan 2 ya zyada students hain
SELECT city, COUNT(*) FROM student GROUP BY city HAVING COUNT(*) >= 2;
Output: Kichha 3 โ (WHERE se nahi โ HAVING se!)
Q7. Kichha ke sab students ke marks 5 badha do
UPDATE student SET marks = marks + 5 WHERE city = 'Kichha';
Output: 3 rows updated โ Ansh 83, Rahul 70, Aman 60 โ
Q8. Wo students jo 23,000 se kam fees wale course me hain (JOIN)
SELECT s.name, c.course_name FROM student s
JOIN course c ON s.course_id = c.course_id WHERE c.fees < 23000;
Output: Priya BBA, Aman BBA, Neha BCom โ
Q9. 'A' se shuru hone wale naam
SELECT name FROM student WHERE name LIKE 'A%';
Output: Ansh, Aman โ
Q10. Maximum, minimum aur total marks
SELECT MAX(marks), MIN(marks), SUM(marks) FROM student;
Output: 91, 55, 374 โ
Q11. 60 se 90 ke beech marks
SELECT * FROM student WHERE marks BETWEEN 60 AND 90;
Output: Ansh 78, Priya 85, Rahul 65 โ
Q12. Haldwani ya Rudrapur ke students
SELECT name FROM student WHERE city IN ('Haldwani','Rudrapur');
Output: Priya, Neha โ
Answer likhne ka format (exam me complete-answer checklist): query likho โ neeche chhota output table banao โ ek line explanation (kaunsa clause kya kar raha hai). Sirf query likhne se 70% marks milte hain; output + explanation se poore. ๐ฏ
4.7 DCL & TCL
-- DCL (permission dena/lena)
GRANT SELECT, INSERT ON student TO user_ansh; -- right do
GRANT ALL PRIVILEGES ON student TO admin_user; -- sab kuch
REVOKE INSERT ON student FROM user_ansh; -- right wapas lo
-- TCL (transaction control)
START TRANSACTION; -- ya BEGIN;
UPDATE account SET balance = balance - 500 WHERE acc_no = 'A101';
UPDATE account SET balance = balance + 500 WHERE acc_no = 'A102';
SAVEPOINT after_transfer; -- beech ka point
UPDATE account SET balance = balance - 100 WHERE acc_no = 'A101';
ROLLBACK TO after_transfer; -- sirf aakhri update cancel
COMMIT; -- poora transaction pakka ho gaya (permanent)
-- agar beech me error aa jaye to:
ROLLBACK; -- sab cancel (jaise kuch hua hi nahi)
Command
Kaam
Example
GRANT
User ko permission dena (SELECT/INSERT/UPDATE/DELETE/ALL)
Accountant ko sirf SELECT par GRANT
REVOKE
Di hui permission wapas lena
Employee chhoda โ REVOKE ALL
COMMIT
Transaction ke saare changes permanent kar dena
Payment success par COMMIT
ROLLBACK
Transaction ke changes undo kar dena
Error/exception par ROLLBACK
SAVEPOINT
Transaction ke beech me ek point โ us tak partial rollback
Long transaction me safe points
ACID properties โ explain each property with a transaction example
Property
Matlab
Bank transfer example
Atomicity
Transaction ke saare steps ek unit โ ya poore ho ya koi nahi (all-or-nothing)
โน500 debit + โน500 credit โ ek bhi fail hua to dono cancel
Consistency
Transaction ke baad database valid state me hamesha (constraints tute nahi)
Total paisa pehle bhi 8,000 tha, baad me bhi 8,000
Isolation
Do transactions ek saath chalein to bhi ek doosre ko disturb na karein
Ek hi account se do jagah withdrawal โ locking serialise kar deti hai
Durability
COMMIT ke baad data safe โ bijli gayi, system crash hua, data zinda rahega
Commit ke baad statement/disk par record โ restart par bhi milta hai
Real life: UPI se โน500 bhejna = do updates (ek account se minus, doosre me plus). Agar beech me bijli chali gayi โ COMMIT nahi hua to ROLLBACK: paisa kahin nahi katega. Isi ko "atomicity" kehte hain โ ya to poora transaction ho ya kuch bhi nahi. Isliye aapka paisa aaj tak "beech me" nahi ganwa hai ๐. Aur wahi reason hai ki bank ka balance "pending" dikhta hai jab tak dono banks ka settlement COMMIT na ho jaaye.
Exam answer (DCL & TCL, 5 marks): DCL = GRANT/REVOKE (permissions), TCL = COMMIT/ROLLBACK/SAVEPOINT (transaction) + ek worked transfer example + ACID ke 4 points ek-ek line me. Yehi combination is a useful structure, but assessment depends on the rubric.
Constraint violations โ "ye query kyun fail hogi?" practice
Cannot add or update a child row: a foreign key constraint fails
course_id 999 course table me exist nahi karta
DELETE FROM course WHERE course_id = 101;
Cannot delete or update a parent row: foreign key fails
student table ke rows 101 ko reference kar rahe hain โ pehle unhe hatao/change karo
Ye samajhna kyun zaroori hai: Yehi errors real projects me roz aate hain โ aur interview me bhi poochhte hain. Rule: database ka structure (constraints) galat data ko ghar hi nahi ghusne deta. Isi liye kehte hain "DBMS me integrity constraints database level par lagte hain, application code par nahi." ๐
Unit 4 MCQs (answers neeche):
DDL command kaun hai? (a) INSERT (b) CREATE (c) GRANT (d) COMMIT
Table ki saari rows fast delete, structure rahe? (a) DELETE (b) TRUNCATE (c) DROP (d) ALTER
Do tables jodne wali query? (a) GROUP BY (b) JOIN (c) HAVING (d) ORDER BY
Group par filter lagane ke liye? (a) WHERE (b) HAVING (c) ORDER BY (d) LIMIT
Model answers โ Unit 4 ke 4 sabse important questions
Q1. File system vs DBMS (10 points). (10) Answer: (1) Storage โ flat files vs central organised tables. (2) Redundancy โ file system me zyada, DBMS me normalization se kam. (3) Consistency โ file system me ek jagah update karne par doosri purani reh jaati hai; DBMS me single source. (4) Sharing/concurrency โ file system multi-user ke liye nahi; DBMS me transactions + locking (ek saath kai users safe). (5) Security โ file-level vs user/table/row-level permissions (GRANT/REVOKE). (6) Query โ har search ke liye program vs SQL me 1 line. (7) Integrity โ koi rule nahi vs constraints (PK/FK/CHECK/UNIQUE). (8) Backup/recovery โ manual vs built-in + crash recovery. (9) Program-data independence โ structure badla to program badla vs schema alag. (10) Cost/example โ sasta (CSV/Excel) vs thoda mehnga (MySQL/Oracle). Closing: "isliye aaj ka har serious application โ banking, railway, ERP โ DBMS par chalta hai."
Q2. SQL ke sub-languages + commands. (5) Answer:DDL (structure): CREATE, ALTER, DROP, TRUNCATE, RENAME. DML (data): INSERT, UPDATE, DELETE, SELECT. DCL (permissions): GRANT, REVOKE. TCL (transaction): COMMIT, ROLLBACK, SAVEPOINT. DQL (kuch books me select ke liye alag): SELECT. Saath me ek example har category ka likho: CREATE TABLE student(...); INSERT INTO student VALUES(...); GRANT SELECT ON student TO user1; COMMIT. Aur DELETE vs TRUNCATE vs DROP ka ek line add karo (kuch rows / saari rows / table hi gayab) โ yahi question me twist hota hai.
Q3. Constraints kya hain? Koi 5 explain karo with examples. (5โ10) Answer: Constraints database par lagne wale rules hain jo galat data ko rok dete hain (integrity). (1) PRIMARY KEY โ row ki unique identity, NULL nahi; roll_no INT PRIMARY KEY. (2) FOREIGN KEY โ do tables ke beech link, value parent table me honi chahiye; course_id REFERENCES course(course_id). (3) UNIQUE โ repeat nahi (NULL ho sakta hai); email VARCHAR(60) UNIQUE. (4) NOT NULL โ column khali nahi; name VARCHAR(50) NOT NULL. (5) CHECK โ condition; age INT CHECK(age>=17), marks 0โ100. (6) DEFAULT โ value na do to apne aap; city VARCHAR(30) DEFAULT 'Kichha'. Closing: "ye rules DBMS level par lagte hain, isliye application bug bhi galat data insert nahi kar sakta."
Q4. Transaction aur ACID properties. (5โ10) Answer: Transaction = operations ka ek group jo ek unit ki tarah chalta hai (ya poora ho ya kuch bhi nahi) โ jaise โน500 ka transfer (ek account se debit + doosre me credit). ACID:Atomicity โ all-or-nothing (beech me fail hua to ROLLBACK, paisa kahin nahi kata). Consistency โ transaction ke baad database valid state me (total paisa utna hi). Isolation โ concurrent transactions ek doosre ko disturb na karein (locking). Durability โ COMMIT ke baad data permanent (crash/power fail ke baad bhi safe). Saath me commands: START TRANSACTION โ UPDATE/INSERT โ COMMIT (pakka) ya ROLLBACK (undo) aur SAVEPOINT (beech ka point). Closing: "ACID properties help preserve reliable transaction behaviour."
โก Unit 4 โ Rapid Revision
Database = organised collection of related data โข DBMS = software to manage it (MySQL, Oracle, PostgreSQL, MongoDB)
File system (redundancy, no security, no constraints, no independence) vs DBMS (central, secure, SQL, backup, concurrency)
Applications: banking, railway, education, e-commerce, hospital, telecom, government
Users: end user, application programmer, sophisticated user, DBA, system analyst/designer
DELETE = kuch rows (+WHERE), TRUNCATE = saari rows fast, DROP = table hi gayab
Data types: INT/DECIMAL, VARCHAR/CHAR/TEXT, DATE/TIMESTAMP, BOOLEAN/BLOB/ENUM
Constraints: PRIMARY KEY (unique + not null), FOREIGN KEY (link), UNIQUE, NOT NULL, CHECK, DEFAULT
Keys: super โ candidate โ primary; alternate, foreign, composite
SELECT/FROM/WHERE/GROUP BY/HAVING/ORDER BY/LIMIT ka order โข Aggregates: COUNT, SUM, AVG, MIN, MAX โข LIKE, BETWEEN, IN, IS NULL โข JOIN do tables jodta hai
ACID: Atomicity, Consistency, Isolation, Durability โข COMMIT permanent, ROLLBACK undo, SAVEPOINT beech ka point
GRANT/REVOKE = permissions (DCL)
Syllabus-based exam-style practice questions (not predictions) โ Unit 4:
File system vs DBMS (koi 10 points). (10)
What is DBMS? Advantages aur limitations likho. (5โ10)
Database ke users kaun-kaun hote hain? DBA ki responsibilities likho. (5)
SQL ke 4/5 sub-languages + commands ka table banao. (5)
Difference between DELETE, TRUNCATE and DROP. (5)
Write SQL: table banana (constraints ke saath), 3 rows insert, ek SELECT with WHERE, ek UPDATE. (10)
Constraints kya hain? Koi 5 explain karo with example. (5โ10)
Primary key vs unique key; candidate key vs primary key. (5)
Transaction kya hai? ACID properties explain karo. (5โ10)
JOIN kya hai? Do tables ka example dekar join query likho. (5)
Short notes: DML vs DDL, data types in SQL, NULL handling, COMMIT vs ROLLBACK. (5ร2)
UNIT 5 โ Internet Basics & Web Basics
5.1 Introduction to the Internet
The Internet is a global network of interconnected computer networks that communicate using a common protocol (TCP/IP). Ise "network of networks" kehte hain. Kisi ek company ka nahi hai โ duniya bhar ke ISPs, governments aur organisations milkar ise chalate hain. Shuruaat: ARPANET (1969, USA, Department of Defense) โ WWW (1989โ91) โ aaj 500+ crore users.
Year
Development
Kyun important hai
1969
ARPANET (4 universities ke beech pehla packet-switched network)
Internet ki neev โ "packet switching" idea
1974/1983
TCP/IP protocol suite (Vint Cerf & Bob Kahn); 1983 me ARPANET ne ise apnaya
Aaj ka internet TCP/IP par hi chalta hai โ isliye "internet ka protocol" bolte hain
1989โ91
World Wide Web (Tim Berners-Lee, CERN) โ HTML + HTTP + URL
Internet ko aam aadmi ke liye usable banaya (pages + links)
1995
India me internet (VSNL) โ public internet service shuru
India ka digital safar shuru
2016
Jio ka data revolution โ sasta 4G sabke liye
Bharat me ~95 crore internet users (duniya me sabse bada me se ek), UPI/online class har kasbe me
2020s
5G, fiber (FTTH), IoT, cloud, AI services
Internet ab "utility" hai โ bijli/paani jaisa
Hinglish: Internet = duniya ke saare computer-networks ka "maha-network" ๐ธ๏ธ. Jaise har shahar ki sadkein milkar ek national highway system banati hain โ usi tarah har LAN mil kar internet banata hai. Kisi ek company ka nahi hai โ saara duniya ise chala raha hai.
Features of Internet
Global reach: Duniya me kahin bhi โ real-time connect.
24ร7 availability: Din ho ya raat, chalta rehta hai (data centre + undersea cables).
Fast & cheap communication: Email kisi bhi desh me, basically free; video call bhi.
Huge information (WWW): Wikipedia se lekar YouTube tak sab โ search karne par seconds me.
Any device: PC, mobile, smart TV, watch, car โ sab jud sakta hai (IoT).
Entertainment & business: Video, gaming, online shopping, digital payments.
Anonymity / open publishing: Koi bhi content publish kar sakta hai (blog, YouTube) โ iske fayde-nuksaan dono (fake news bhi isi wajah se).
Interactive: Sirf padhna nahi โ comment, video call, online banking, gaming bhi.
Scalable & resilient: Naye devices/connections lagte rehte hain; ek rasta fail ho to packet doosra rasta le leta hai.
Exam me "Internet vs WWW" ka farak mat bhoolo:Internet = infrastructure (networks ka network, roads), WWW = us infrastructure par chalne wali service (websites, ghar). Internet par email/FTP/VoIP bhi chalte hain โ sirf web nahi. Aur protocol hamesha TCP/IP likhna.
5.2 Logical and Physical Addresses
Basis
Logical Address (IP Address)
Physical Address (MAC Address)
Kya hai
Software wala address, network layer (Layer 3) ka
Hardware wala address, NIC chip par likha hua, data-link layer (Layer 2)
Kaun deta hai
Network admin ya DHCP server
Manufacturer (factory me fixed)
Badal sakta hai?
Haan โ network badla to IP badal jaata hai
Nahi โ permanent (mostly)
Format
IPv4: 4 numbers (192.168.1.1) โข IPv6: 8 groups hex
12 hex digits: 00:1A:2B:3C:4D:5E
Analogy
"Ghar ka address" jo aap shahar badalne pe badalte ho ๐ โ๏ธ๐ก
"Aadhaar number" jo kabhi nahi badalta ๐ชช
Kaha use
Router internet pe aapko dhundhta hai (device kahan hai is network me)
Same LAN ke andar device ko identify karta hai (switch use karta hai)
Har device ko apna address possible โ NAT ki zaroorat kam
Header simple, options limited
Header fixed + efficient, built-in security/IPsec
Aaj bhi zyada common (dual-stack me chalta hai)
Dheere-dheere adopt ho raha hai (5G, IoT me zaroori)
Worked example โ IP ke hisse (IPv4, class wala idea): Address 192.168.1.25 ko 4 octets me todo: 192 . 168 . 1 . 25. Maksud: 192.168.1 = network part (aapka ghar/college ka LAN), 25 = host part (us LAN me device ka number). Private ranges (ghar/office ke andar): 10.0.0.0โ10.255.255.255, 172.16โ172.31, 192.168.0.0โ192.168.255.255 โ router inhe NAT karke internet par ek hi public IP se bhejta hai. Isliye ghar ke saare device ka public IP same dikhta hai (WhatIsMyIP par), par andar private IP alag-alag. ๐
Real life: College ke WiFi se aapka laptop jab ghar jaata hai to IP badal jaata hai (192.168.0.5 ghar pe, 10.0.0.12 college me) par MAC address wahi rehta hai โ isliye college WiFi kuch MAC addresses "block" karke device-level ban door kar sakta hai ๐. Aur hostel me WiFi password share karne par admin router ke DHCP table me naye MAC addresses dekh leta hai โ pakda gaye! ๐ต๏ธ
5.3 Internet Service Providers (ISP)
An ISP is a company/organisation that provides internet access to users (home, office, college) โ usually for a monthly/annual fee (data plans). ISP ke paas apna huge network + undersea cables/leased lines hote hain jinse wo aapko "duniya se jodta" hai. Bade ISP ke andar chhote ISPs (local cable wala) bhi hote hain โ hierarchy: Tier 1 (global backbone) โ Tier 2 (national) โ Tier 3/local ISP (aapka connection).
India ke ISPs: Jio (Reliance), Airtel, BSNL (sarkari), Vi (Vodafone-Idea), ACT Fibernet, local cable ISPs. Services: internet access + often email, web hosting, domain registration, static IP, Wi-Fi router, IPTV/bundled TV.
Connection type
Kaise chalta hai
Speed
Aaj ka status
Dial-up (purana)
Phone line par modem ka beep-da-da-dee; call ke time net band
56 kbps
Khatam โ sirf history/exam ke liye
DSL / Broadband
Telephone line par high-frequency data (phone + net ek saath)
1โ100 Mbps
Purane areas me chal raha
Cable internet
Cable TV wali coaxial line par data
10โ500 Mbps
Local operators ke paas common
Fibre (FTTH)
Ghar tak optical fibre โ light se data
100 Mbps โ 1 Gbps+
Aaj ka best โ JioFiber/Airtel Xstream
Wireless (4G/5G hotspot)
Mobile network ka data โ SIM/dongle/router
4G 10โ100 Mbps, 5G 100 Mbps+
Sabse tez-growing; pahadi/gaon me main option
Satellite
Satellite uplink/downlink (VSAT/Starlink type)
10โ200 Mbps (latency high)
Remote areas, ships, disaster relief
Leased line
Dedicated business line (guaranteed speed)
1 Mbps โ 10 Gbps (SLA ke saath)
Banks, colleges, corporates
Hinglish: ISP = "internet ka paani wala tanker" ๐ฐ. Aap unse connection lene ka subscription lete ho, aapke ghar pipe (line/fibre) aati hai, aur aap data use karte ho. Samne se router (tap) aur WiFi (ko ek hamesha chalta rehna hai). ๐ถ
Exam one-liners: ISP = Internet Service Provider โข Types: dial-up, DSL, cable, fibre, wireless, satellite, leased line โข Fibre sabse fast aur reliable โข BSNL/MTNL sarkari ISP hain, Jio/Airtel private โข ISP ke paas hota hai: backbone network + IP pool + DNS + peering arrangements (doosre networks se jodne ke liye).
5.4 Domain Name System (DNS)
DNS is a system that translates human-readable domain names (google.com) into machine-readable IP addresses (142.250.183.78). Ise "internet ki phone directory" kehte hain. Ye distributed database hai โ koi ek server nahi, poore duniya me faila hierarchy of servers.
Hinglish: Computer ko naam samajh nahi aate, usko number chahiye. Aap "google.com" likhte ho โ DNS "theek hai, iska number 142.x.x.x hai" bata deta hai โ browser wahan request bhejta hai. Jaise aap phone book/contacts me "Papa" save karte ho, phone andar se number lagata hai ๐.
DNS resolution process (exam answer):
1. Aap browser me likhte ho: www.surajmaluniversity.ac.in
2. Computer pehle apna local cache / hosts file dekhta hai
3. Nahi mila โ ISP ke "Recursive DNS Resolver" ko poochhta hai
4. Resolver chain me poochhta hai:
Root Server (.) โ TLD Server (.in) โ Authoritative Name Server (surajmaluniversity.ac.in)
5. IP address mila (jaise 103.21.xx.xx) โ browser us server se connect
6. Page load ๐ aur IP thodi der cache me save (TTL ke hisaab se โ isliye next time fast)
+ OS, browser aur resolver โ teeno level par caching hoti hai
DNS Server ka type
Kaam
Example
Recursive resolver
Aapki taraf se poori chain khud solve karta hai (ISP/public DNS)
JioFiber ka resolver, Google 8.8.8.8, Cloudflare 1.1.1.1
Root server
TLD server ka address batata hai (duniya me 13 root clusters)
. ka root โ a.root-servers.net etc.
TLD server
.com/.in/.org wale domains ka record
.in ka TLD server
Authoritative server
Us domain ka asli record (website owner ka DNS)
surajmaluniversity.ac.in ka nameserver
Domain name ke parts (example: www.bca.surajmaluniversity.ac.in)
Part
Naam
Meaning
.in
TLD (Top Level Domain)
Country code (India)
.ac
Second-level
Academic institution
surajmaluniversity
Registered name
Organisation ka naam
www / bca
Subdomain / Host
Website / section
Common TLDs: .com (commercial), .org (organisation), .net (network), .edu (education, US), .gov (government), .in (India), .uk, .io, .ai. DNS records (short note):A = naam โ IPv4, AAAA = naam โ IPv6, CNAME = alias (www โ main site), MX = mail server, NS = nameserver, TXT = verification/SPF records. URL vs Domain: Domain = naam ke hissa (google.com), URL = poora address (https://google.com/search?q=bca).
High-yield syllabus topic: "DNS kya hai? Working explain karo (5โ10 marks)" โ definition + phone directory analogy + 6-step resolution (cache โ resolver โ root โ TLD โ authoritative โ cache) + 2 examples (A record, MX record) + 1 line: DNS http/https se pehle chalta hai (URL me domain ko IP banane ke liye). ๐ฏ
5.5 Web Basics โ Introduction to Web
WWW (World Wide Web) is a collection of web pages and documents stored on web servers, linked together with hyperlinks, and accessed over the internet using a web browser. (Invented by Tim Berners-Lee in 1989โ91 at CERN.) Web ke 3 basic technologies: HTML (page likhna), HTTP (page bhejna/lena), URL (page ka address).
Internet vs Web (classic confusion): Internet = hardware/infrastructure (computers ka network, roads ๐ฃ๏ธ). Web = us network par chalne wali ek service (websites, ghar ๐ ). Internet par email, FTP, WhatsApp bhi chalte hain โ sirf web nahi. Web โ Internet.
Web ka client-server model
Role
Kaam
Example
Web client (browser)
Request bhejta hai, response ko render karta hai
Chrome, Firefox, mobile inbuilt browser
Web server
Request accept karta hai, files/DB se data lekar response bhejta hai
Apache, Nginx, IIS (software); Google ke servers (hardware)
Database + application server
Dynamic content banata hai (user ka data + business logic)
PHP/Java/Python app + MySQL
DNS
Domain ka IP batata hai
Resolver chain (upar wala section)
How a web page loads (request-response cycle):
1. Aap URL type karte ho โ browser URL ko todta hai
(protocol + domain + path)
2. DNS se IP address milta hai
3. Browser web server ko HTTP/HTTPS request bhejta hai (GET /index.html)
+ browser headers bhejta hai (cookies, language, device info)
4. Server page (HTML/CSS/JS/images) response me bhejta hai (status code ke saath)
5. Browser HTML parse karta hai โ DOM banata hai
โ CSS se style โ images/JS load โ page render (screen pe dikhta hai)
6. Tumhare clicks pe JS DOM update karta hai โ bina page reload ke bhi kuch badal sakta hai
Basis
Static web page
Dynamic web page
Content
Fixed โ file me jo likha hai wahi har user ko
Har request par database/input se banta hai
Banane me
Sirf HTML/CSS (hosting easy, sasta)
Server-side code (PHP/Python/Node) + database
Example
College ka "About Us" page, portfolio
Amazon cart, Gmail inbox, Instagram feed, ERP marks
Speed / load
Bahut fast, load kam
Server par load zyada, but personalised
Update
Har change par file dobara edit/publish
Admin panel/config change โ site turant update
Ek line me: Static = "chhapi hui kitaab", Dynamic = "har baar fresh bana khana" ๐ฒ. Aur web ke teen pillars: HTML (structure), CSS (design), JS (behaviour) โ ye teeno milkar aaj ki har website banate hain.
5.6 Web Browser
A web browser is application software used to access, retrieve and display web pages from the internet. Ye HTTP/HTTPS request bhejta hai, response (HTML/CSS/JS/images) ko parse karke screen par "render" karta hai, aur user ko interact karne deta hai.
Examples: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari, Opera, Brave, mobile me inbuilt browsers.
Part / feature
Kaam
Address bar (omnibox)
URL type karna; search bhi yahin se (Chrome me search + URL dono)
Tabs
Ek hi window me kai pages โ har tab alag process (Chrome me) taaki ek crash sabko na le doobe
Bookmarks
Pasandida pages save
Back/forward/reload, home
Navigation โ history stack me aage-peeche
History
Pichhle dinon ke visits
Extensions/add-ons
Extra features (ad-blocker, Grammarly, PDF tools)
Developer tools (F12)
HTML/CSS/JS inspect, network requests, console โ developers aur students ke liye zaroori
Service jo internet par information dhundhti hai (index + ranking)
Example: Chrome, Firefox, Edge, Safari
Example: Google, Bing, Yahoo, DuckDuckGo
Bina browser web access mushkil hai (mobile apps me bhi inbuilt browser hota hai)
Bina search internet use ho sakta hai (URL direct daal kar) โ par dhundhna mushkil
Analogy: car ๐
Analogy: Google Maps ๐บ๏ธ (Chrome browser me Google search engine default hai โ dono alag cheezein hain! Ye exam me poochhte hain)
Cookies vs cache (short note):Cookies = chhoti text files jo browser site ke saath save karta hai (login session, preferences, shopping cart) โ isse aap baar-baar login nahi karte. Cache = images/CSS/JS ki local copy โ isse page dobara fast khulta hai. Cookies "aap kaun ho" yaad rakhti hain, cache "cheezein" yaad rakhta hai. Isliye "clear cookies" se login chala jaata hai, "clear cache" se sirf speed wali copy hat ti hai.
5.7 HTTP / HTTPS
Basis
HTTP
HTTPS
Full form
HyperText Transfer Protocol
HyperText Transfer Protocol Secure
Security
Data plain text me jata hai (koi padh sakta hai)
Data encrypted (SSL/TLS certificate se)
Port
80
443
Padlock ๐ in browser
Nahi ("Not Secure" likha aata hai)
Haan โ address bar me tala dikhta hai
Kisliye use
Simple info pages (par aaj kam)
Banking, UPI, login, shopping โ jahan password/paisa ho
Speed (modern)
Same / almost same (TLS overhead negligible)
HTTP/2 + TLS se aaj ye fast hai; SEO me bhi HTTPS preferred
Method
Kaam
Example
GET
Data lena / page kholna (URL me parameters dikh jaate hain โ bookmark ho sakta hai)
Google search, page load
POST
Form data bhejna (URL me nahi dikhta โ safe-ish for data)
HTTPS me connection kaise banta hai (TLS handshake, simple version):
1. Browser server se "hello" โ kaun ho, kaunse encryption methods support karte ho?
2. Server apna SSL/TLS certificate bhejta hai (CA ne verify kiya hua)
3. Browser certificate check karta hai (domain match? valid? CA trusted?)
4. Dono ek secret session key banate hain (asymmetric โ symmetric)
5. Ab saara data us session key se encrypt hokar aata-jaata hai (padlock ๐)
Isliye https site par form bharne ka data public WiFi par bhi padha nahi ja sakta.
Safety rule: Jis site par https aur ๐ nahi hai, wahan kabhi password ya card details mat dalna โ kyunki us data ko koi beech me padh sakta hai (public WiFi par attack ka risk). Par yaad rakho: https ka matlab "site trustworthy hai" nahi โ koi bhi scam site bhi https le sakti hai. Tala sirf itna kehta hai ki "bhejna safe hai", "site sachhi hai" nahi. ๐ฏ
5.8 URL (Uniform Resource Locator)
A URL is the complete address of a resource (page, image, file) on the web. Isse browser ko pata chalta hai: kis protocol se, kis server se, kaunsi file maangni hai, kis data ke saath, aur page ke kis hisse par jaana hai.
https://www.surajmaluniversity.ac.in/bca/admission.html?year=2026#fees
โโโฌโโ โโโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโฌโโโ โโโฌโโ
protocol domain name path query fragment
โ โ โ โ โ
1 2 3 4 5
1. Protocol โ https (kis tarah baat karni hai) โ http/https/ftp
2. Domain/Host โ www.surajmaluniversity.ac.in (kis server se)
3. Port (optional) โ :443 (default chhupa hota hai โ http me 80)
4. Path โ /bca/admission.html (server me kaunsi file/page)
5. Query string โ ?year=2026 (extra data bhejna; & se kai parameters)
6. Fragment โ #fees (page ke usi section par jump)
Point
Detail
URL vs Domain
Domain = naam ke hissa (google.com), URL = poora address (https://google.com/search?q=bca) โ URL me domain + protocol + path + query sab hota hai.
URL vs URI vs URN
URI = koi bhi resource identifier (sabse bada), URL = location batata hai, URN = sirf naam (jaise ISBN: urn:isbn:9788131757851) โ URI ka ek type.
Percent-encoding
URL me sirf limited characters allowed hain โ space = %20, Hindi/emoji bhi encode hote hain (isliye kabhi URL me %20 dikhta hai).
Query vs Fragment
Query server ko jaati hai (search results badalte hain), fragment sirf browser ke paas (page ke andar scroll). Isliye #fees server ko bhejna nahi padta.
Exam question: "URL kya hai? Iske parts diagram ke saath samjhao (5 marks)" โ upar wala labelled diagram + 5โ6 points (protocol/domain/port/path/query/fragment) + URL vs domain ki ek line. Diagram zaroor banao โ uske bina marks kat jaate hain.
5.9 HTML5
HTML (HyperText Markup Language) is the standard language used to create the structure and content of web pages. Ye programming language nahi โ markup language hai (elements/tags se content ko mark karte hain). Latest version: HTML5 (2008+, audio/video support, semantic tags, mobile friendly, offline storage).
<!DOCTYPE html> <!-- browser ko batao: ye HTML5 page hai -->
<html lang="en"> <!-- page ki shuruaat, language -->
<head> <!-- meta info โ screen par nahi dikhta -->
<meta charset="UTF-8"> <!-- Hindi/emoji ke liye encoding -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My First Page</title> <!-- tab me dikhta hai -->
</head>
<body> <!-- jo dikhta hai woh yahan -->
<h1>Hello BCA!</h1> <!-- heading (h1 sabse bada) -->
<p>Ye <b>mere</b> pehla page hai.</p> <!-- paragraph -->
<a href="https://google.com">Google</a> <!-- hyperlink -->
<img src="photo.jpg" alt="mera photo" width="200">
<ul><li>HTML</li><li>CSS</li></ul> <!-- list -->
<audio controls src="song.mp3"></audio> <!-- HTML5 features -->
</body>
</html>
Hinglish: HTML = building ka dhancha (pillar, deewar, kamre ๐๏ธ). Tag = "label" jo browser ko batata hai ki ye cheez kya hai: "ye heading hai", "ye photo hai". <b> ka matlab "isse bold karo" โ bas itna hi. Aur attributes (jaise href, src, alt) tag ko extra instruction dete hain.
Exam answer (10 marks) format: HTML ki definition + document structure (doctype/head/body ka role) + 5 tags ka example program (upar wala) + HTML5 ke 4โ5 features (audio/video, semantic tags, canvas, offline storage, built-in validation) + 1 line: "HTML sirf structure deta hai โ design CSS se, behaviour JavaScript se." โ
HTML5 practice set (code likh kar output socho)
Q1. Ek page banao jisme: heading "My College", ek paragraph, ek image,
ek list (3 subjects) aur ek link ho.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My College</title>
</head>
<body>
<h1>My College</h1>
<p>Main <b>BCA</b> first year ka student hoon.</p>
<img src="college.jpg" alt="college building" width="300">
<ul>
<li>Computer Fundamentals</li>
<li>C Programming</li>
<li>Mathematics</li>
</ul>
<a href="https://surajmaluniversity.ac.in">College website</a>
</body>
</html>
Output: browser me heading, bold "BCA" wala paragraph, photo, bullet list,
aur click karne par college site khulne wala link dikhega. โ
Q2. Marksheet table banao (3 students, 3 columns: Roll, Name, Marks)
<table border="1">
<tr><th>Roll</th><th>Name</th><th>Marks</th></tr>
<tr><td>1</td><td>Ansh</td><td>78</td></tr>
<tr><td>2</td><td>Priya</td><td>85</td></tr>
<tr><td>3</td><td>Rahul</td><td>65</td></tr>
</table>
Note: <th> = heading cell (bold + center), <td> = data cell. โ
Q3. Login form banao (email + password + submit button)
<form action="/login" method="post">
<label>Email:</label>
<input type="email" name="email" required><br>
<label>Password:</label>
<input type="password" name="pass" required><br>
<button type="submit">Login</button>
</form>
Exam point: method="post" โ password GET me URL me dikh jata (security issue). โ
Q4. HTML5 ke semantic tags se page ka structure banao
<body>
<header><h1>BCA Notes</h1></header>
<nav><a href="#u1">Unit 1</a> | <a href="#u2">Unit 2</a></nav>
<main>
<section id="u1"><h2>Unit 1</h2><p>Fundamentals...</p></section>
<section id="u2"><h2>Unit 2</h2><p>CPU...</p></section>
</main>
<footer><p>ยฉ 2026 Ansh</p></footer>
</body>
Fayda: search engine aur screen reader ko page ka matlab samajh aata hai. โ
Q5. Audio/video embed karo (HTML5 ka bada feature)
<audio controls><source src="song.mp3" type="audio/mpeg"></audio>
<video width="320" controls><source src="clip.mp4" type="video/mp4"></video>
If asked to write a small HTML5 example: har tag ke aage comment likho ("<!-- heading -->") โ examiner turant samajh jaata hai ki aapko farak pata hai. Aur ending me HTML5 ke 3 features add karo: audio/video, semantic tags, mobile-friendly viewport. โ
5.10 CSS (Cascading Style Sheets)
CSS is a style-sheet language used to control the appearance (design, colour, font, layout, spacing) of HTML web pages. "Cascade" ka matlab โ ek hi element par kai rules lag sakte hain aur last/most-specific rule jeet jata hai (isliye priority order: inline > id > class > tag).
Hinglish: HTML = kankad/pillar (dhancha), CSS = paint, tiles, curtains ๐จ. Ek hi HTML ko alag-alag CSS se bilkul naya look de sakte ho โ jaise ek hi ghar ko ek din shaadi wala sajaya jaaye, ek din simple.
CSS ka syntax: selector { property: value; property: value; }
<style> /* internal CSS โ head me likha */
h1 { color: #6d28d9; text-align: center; } /* tag selector */
p { font-family: Arial; font-size: 16px; } /* tag selector */
.card { background: #fff; border-radius: 12px; padding: 16px; } /* class */
#main-title { font-size: 32px; font-weight: bold; } /* id */
h1, h2 { margin-bottom: 10px; } /* group */
a:hover { color: red; } /* pseudo-class */
</style>
<h1 id="main-title">BCA Notes</h1>
<p class="card">CSS se sundar ban gaya.</p>
Concept
Matlab
Example
Selector
Kis element pe style lagani hai
h1, .class, #id, * (sab), a:hover
Property + Value
Kya badalna hai aur kaise
color: red;, font-size: 20px;
CSS ke 3 tarike
Inline (tag ke andar), Internal (<style> head me), External (.css file โ best practice)
<link rel="stylesheet" href="style.css">
Box model
Content โ padding โ border โ margin
Har element ek dabba hai ๐ฆ
Classes vs ID
Class = kai elements pe, ID = ek unique element pe
border-radius: 12px; (rounded cards โ jaise ye notes file ๐)
Spacing & layout
margin, padding, width, display (block/inline/flex/grid), position
display: flex; se row/column layout aasan
Responsive (media query)
Screen size ke hisaab se style badalna โ mobile-friendly
@media (max-width: 600px) { ... }
Cascade & priority
Inline (1000) > ID (100) > class (10) > tag (1); !important sabko haraata hai (use na karo)
Ek hi h1 par do rules โ zyada specific wala lagta hai
Tarika
Kahan likha jaata hai
Fayda
Nuksaan
Inline CSS
Tag ke style="" attribute me
Turant, sirf usi element par
Repeat karna padta hai, HTML ganda, maintain karna mushkil
Internal CSS
<style> block head me
Ek hi page ke saare elements ko control
Sirf usi page par kaam karta hai; multi-page site me repeat
External CSS
Alag .css file + <link>
Best practice โ poori site ek file se, browser cache karta hai (fast), maintain easy
Ek extra file manage karni padti hai (chhoti site me overkill)
Worked example โ box model ka hisaab: Ek div ka CSS: width: 300px; padding: 20px; border: 5px solid; margin: 10px; Visible (border tak) width = 300 + 20 + 20 + 5 + 5 = 350 px. Layout me total jagah = 350 + 10 + 10 = 370 px. (Isi liye box-sizing: border-box; use karte hain โ tab width me padding + border lagi hui hoti hai aur hisaab simple ho jata hai.) ๐งฎ
Exam answer (5โ10 marks): CSS definition ("cascading" ka matlab 1 line) + syntax (selector { property: value; }) + 3 tarike ka table (inline/internal/external + best practice = external) + selectors (tag/class/id) + box model diagram (contentโpaddingโborderโmargin) + 1 line: "HTML structure deta hai, CSS presentation โ isliye website ka design ek file me badal sakta hai." ๐จ
Web scenario practice (HTTP/DNS/URL ke chhote sawaal)
Situation
Answer
Kyun
Aap URL me typo kar dete ho โ "gogle.com"
DNS fail / 404 type error
Naam resolve nahi hota (DNS error) ya galat path par 404
Bank site kholte ho, address bar me tala dikhta hai
HTTPS (port 443) kaam kar raha hai
TLS certificate verify hua, data encrypted
Login form ka data bhejna hai โ GET ya POST?
POST
Password URL me nahi dikhta (GET me query string me aa jaata)
Form submit karne ke baad page dobara load hua
Server ne 302 redirect bheja
"Post/Redirect/Get" pattern โ refresh par double submit nahi hota
Exam portal par "503 Service Unavailable"
Server overloaded/down
5xx = server-side problem (hazaaron students ek saath login)
Site ka page khulta hai par images/CDN blank
Kuch resources fail (404 / network)
F12 โ Network tab me har request ka status dikhta hai
Baar-baar login karna pad raha hai
Cookies block/delete ho gayi
Session cookie ke bina server pehchanta nahi
Purana page dikh raha hai, naya design nahi
Browser cache
Ctrl+F5 se hard refresh โ cache bypass
Unit 5 MCQs (answers neeche):
Internet ka protocol? (a) HTTP (b) TCP/IP (c) FTP (d) SMTP
๐ Aakhri checklist (exam se ek raat pehle): (1) Har unit ka Rapid Revision box padho. (2) Har unit-based practice topics ka answer ek baar likho. (3) Review number systems, Boolean algebra, SQL and HTTP/DNS alongside every other syllabus unit; the PDF does not publish topic weightage. (4) Diagram wale question (organization, memory hierarchy, flowchart, topologies, URL parts) me diagram banana mat bhoolna. (5) Time keep karo โ 10 mark ka answer 12โ15 minute me, short notes 3โ4 minute me. All the best! ๐ช
Model answers โ Unit 5 ke 5 sabse important questions
Q1. Internet kya hai? Features aur services explain karo. (10) Answer: Internet = global network of interconnected networks jo TCP/IP protocol use karte hain โ "network of networks". History: ARPANET 1969 โ TCP/IP 1983 โ WWW 1989โ91 (Tim Berners-Lee) โ aaj 500+ crore users. Features: global reach, 24ร7 availability, fast & cheap communication, huge information (WWW), any device (IoT), entertainment + business, open publishing, interactive. Services: WWW, e-mail (SMTP/POP3/IMAP), search engines, social media, e-commerce, e-banking/UPI, cloud storage, video conferencing, streaming, FTP, VoIP, e-learning/e-governance (SWAYAM, DigiLocker). Closing: "Internet infrastructure hai, WWW us par chalne wali ek service โ ye farak exam me likhna mat bhoolna."
Q2. Difference between logical (IP) and physical (MAC) address. (5) Answer: IP address software-level (network layer) address hai jo network admin ya DHCP server deta hai aur network badalne par badal jaata hai; IPv4 32-bit (192.168.1.1), IPv6 128-bit. MAC address hardware-level (data-link layer) address hai jo NIC par manufacturer ne factory me likha hota hai โ 48-bit/12 hex digits (00:1A:2B:3C:4D:5E), aur mostly permanent. IP router internet par device dhundhne ke liye use karta hai ("ghar ka address"), MAC switch same LAN me device identify karne ke liye ("aadhaar number"). Real example: laptop ghar/college me IP badalta hai par MAC wahi rehta hai โ isliye WiFi admin MAC se devices block kar sakta hai.
Q3. DNS kya hai? Working process explain karo. (5โ10) Answer: DNS (Domain Name System) human-readable domain names ko IP addresses me translate karta hai โ "internet ki phone directory". Working: user www.surajmaluniversity.ac.in type karta hai โ browser/OS apna cache + hosts file dekhta hai โ nahi mila to ISP ke recursive resolver ko poochhta hai โ resolver chain me Root server โ TLD server (.in) โ Authoritative nameserver se IP nikaalta hai (jaise 103.21.xx.xx) โ browser us IP par HTTP/HTTPS request bhejta hai โ page load + IP TTL ke hisaab se cache me save (agli baar fast). Records: A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail), NS (nameserver). Closing: "DNS ki wajah se humein IP address yaad rakhne ki zaroorat nahi padti."
Q4. Difference between HTTP and HTTPS. (5) Answer: HTTP (port 80) plain text me data bhejta hai โ beech me koi padh sakta hai; browser "Not Secure" dikhata hai. HTTPS (port 443) SSL/TLS certificate se data encrypt karta hai โ address bar me tala ๐ dikhta hai; TLS handshake me server ka certificate verify hota hai aur session key banti hai. Kisliye: banking, UPI, login, shopping โ jahan password/paisa ho. Common methods: GET (read), POST (form submit), PUT/PATCH (update), DELETE. Status codes: 200 OK, 301 redirect, 403 forbidden, 404 not found, 500 server error. Closing: "HTTPS bhejne ko safe karta hai, par site ke sahi hone ki guarantee certificate verification se aati hai โ isliye scam sites bhi https le sakti hain."
Q5. HTML kya hai? HTML5 ke features + example program. (10) Answer: HTML = markup language jo web page ka structure aur content banata hai (programming language nahi). Structure: <!DOCTYPE html> โ <html> (head me meta/title; body me visible content). Example program me 5 tags likho: heading <h1>, paragraph <p>, image <img>, list <ul><li>, link <a href> โ plus table/form ka mention. HTML5 features: audio/video tags (plugin-free), semantic tags (header/nav/section/article/footer โ SEO + accessibility), canvas/SVG graphics, offline storage (localStorage), built-in form validation (required/type=email), mobile-friendly viewport. Closing: "HTML structure deta hai, CSS design, JavaScript behaviour โ teeno milkar aaj ki websites banate hain."
Rapid-fire 2-mark Q&A (poore syllabus ka nichod)
Q
A (ek line me)
Data aur information me ek shabd ka farak?
Processing โ data raw hai, information processed
OSI-free version: data ka safar (client โ DNS โ server โ response)
URL ke parts ka labelled diagram
CSS box model (contentโpaddingโborderโmargin)
Sample question paper (70 marks) โ practice set
Blueprint yaad rakho: Har unit se lagbhag 14 marks aate hain. Isliye ek unit chhodna = 14 marks ka nuksaan. Neeche wala paper 5 units + mixed practice ke hisaab se bana hai โ 3 ghante me attempt karo.
Q. No.
Question
Marks
Unit
1
Define data and information; difference with examples.
Explain the generations of computers with technology and examples.
10
1
4
Explain the basic organization of a digital computer with diagram; von Neumann bottleneck kya hai?
10
1โ2
5
Difference between RAM and ROM; SRAM and DRAM.
5
2
6
Explain the program execution process of a C program (preprocessor โ loader).
10
2
7
What is an operating system? Koi 8 functions explain karo.
10
3
8
Unix me file permission kaise kaam karti hai? chmod 755 ka matlab likho + koi 6 commands examples ke saath.
6
3
9
Network topologies ke 4 types โ diagram + advantages/disadvantages.
8
3
10
Difference between file system and DBMS (koi 6 points).
5
4
11
SQL likho: (a) CREATE TABLE with constraints (b) 3 rows insert (c) SELECT with WHERE + ORDER BY (d) ek JOIN query.
10
4
12
Transaction aur ACID properties example ke saath.
5
4
13
Difference between HTTP and HTTPS; common methods + 4 status codes likho.
5
5
14
DNS kya hai? Resolution process explain karo.
6
5
15
HTML5 ke features + 5 tags ka example program; CSS ke 3 tarike.
10
5
Attempt karne ka order (exam hall strategy): pehle wahi questions karo jinke answers "pakke" hain (conversions, tables wale short notes) โ confidence banta hai aur time bachta hai. Diagram wale question last me rakho agar time kam ho, par unhe chhodna nahi โ diagram ke marks aasan hote hain. Aur har answer me heading + table/bullets use karo โ examiner ko checking me aasani, aapko marks. ๐ช
โก Unit 5 โ Rapid Revision
Internet = network of networks โข ARPANET 1969 โข Protocol: TCP/IP โข Web = internet ki ek service (Tim Berners-Lee, 1989) โข India: VSNL 1995, Jio 2016
CSS: selector { property: value } โข 3 tarike: inline, internal, external (best) โข Box model: contentโpaddingโborderโmargin โข Cascade priority: inline > id > class > tag
Syllabus-based exam-style practice questions (not predictions) โ Unit 5:
Internet kya hai? Iske features aur services explain karo. (10)
Difference between logical address and physical address (IP vs MAC). (5)
What is ISP? Types of internet connections. (5)
DNS kya hai? Iska working process explain karo. (5โ10)
Difference between HTTP and HTTPS. (5)
URL kya hai? Iske parts diagram ke saath samjhao. (5)
HTML kya hai? HTML5 ke features + 5 tags ka example program likho. (10)
CSS kya hai? Iske 3 tarike (inline/internal/external) example ke saath. (5โ10)
Short notes: Web browser, WWW vs Internet, Static vs Dynamic webpage, IPv4 vs IPv6. (5ร2)
Explain the request-response cycle of a web page. (5)
What is a web server? Client-server model of the web explain karo. (5)
HTTP methods aur status codes ke naam likho (2 examples each). (5)
Cookies aur cache me difference; browser me dev tools ka use. (5)
Domain name ke parts (subdomain, TLD) example ke saath samjhao. (5)
CSS box model explain karo with example calculation. (5)
๐ Poora Paper โ Final strategy: Unit 1 (number systems + Boolean + generations), Unit 2 (CPU/memory/printers), Unit 3 (OS functions + topologies), Unit 4 (SQL + file system vs DBMS), Unit 5 (HTTP/HTTPS + DNS + HTML/CSS) โ ye 15 topics agar pakke ho gaye, to no particular score can be predicted from the syllabus alone. Use the Rapid Revision boxes after studying each full unit; check the official examination notice for format and timing. All the best! ๐ช