๐Ÿ’ป 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.
BasisDataInformation
MeaningRaw facts, no meaning aloneProcessed data, has meaning
FormUnorganised, scatteredOrganised, structured
UseInput for processingOutput, used in decision making
DependencyIndependent (data apne aap me poora)Depends on data (data ke bina possible nahi)
Example85, 90, 78 (marks)Class average = 84.3%
RepresentationNumbers, text, images, audio, video โ€” kisi bhi form meTables, charts, reports, dashboards, totals, averages
ProcessingNot processed (ya minimal, jaise sorting/storing)Processed, analysed, summarised, verified
VolumeUsually very large (crore records)Compact โ€” bade data ka nichod
ValueLow value till it is processedHigh value โ€” decisions me direct use
OrderNo order / random orderOrdered, labelled, time-stamped
Who needs itData entry operator, sensors, appsManager, principal, doctor, policy maker
Decision makingAlone it cannot take any decisionBase of every good decision

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.

TypeMeaningFormat / StructureExamplesHow it is stored
Structured dataWell-organised data that fits neatly into rows and columnsFixed schema (fields, types, length defined)Student roll no, marks, fees, bank transactions, attendance registersRelational databases (MySQL, Oracle), Excel sheets โ€” SQL se easy search
Semi-structured dataPartially organised โ€” data ke saath tags/labels hote hain, par rigid table nahiSelf-describing (keyโ€“value pairs, tags)JSON, XML, CSV with headers, email (To/Subject/Body), HTML pagesDocument stores, web services, MongoDB โ€” tags se meaning pata chalta hai
Unstructured dataNo fixed format; meaning samajhne ke liye special tools (AI/ML) chahiyeNo schemaPhotos, videos, WhatsApp voice notes, doctor's handwritten notes, CCTV footageFile 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.

LevelQuestion it answersTemperature exampleCollege example
DataKya likha hai? (what)40 (just a number)85, 90, 78, 33
InformationIska matlab kya? (what + context)"Aaj ka temperature 40ยฐC hai.""Class average 72% hai, aur 33 fail hua."
KnowledgeIsse 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."
WisdomAb 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.

#QualityMeaningExample / counter-example
1AccuracyCorrect aur error-free honi chahiye"Aapka balance โ‚น5,000 hai" โ€” agar actually โ‚น4,500 hai to decision galat
2TimelinessRight time par mile โ€” late information useless ho jaati haiStock market ka price 1 ghante late = nuksaan
3RelevanceJis kaam ke liye chahiye, usi se related hoPlacement cell ko CGPA chahiye, favourite colour nahi
4CompletenessSaara zaroori hissa shamil hoMarksheet me practical ke marks missing = adhoori information
5ClaritySimple, unambiguous, sahi format meChart/table me dikhana, dense paragraph nahi
6Cost-effectivenessInformation nikalne ka kharcha uske fayde se kam hoโ‚น50,000 lagakar โ‚น10,000 ka fayda = bekaar
7Verifiability / ReliabilitySource trusted ho, cross-check ho sakeAadhaar/census data vs WhatsApp forward ๐Ÿ˜…
8AccessibilityZaroorat 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.
StageKaamTypical devices / parts involvedUPI payment example
1. InputData aur instructions ko system me le jaana; unhe machine-readable form me convert karnaKeyboard, mouse, scanner, mic, camera, touch screen, sensors (plus input ke liye device drivers)Aapne โ‚น500 ka amount, payee ka UPI ID aur PIN type kiya = input
2. ProcessingData par operations โ€” calculation, comparison, logical decision, validation (rules check karna)CPU (ALU + CU + registers), RAM me program aur dataBank server ne balance check kiya, PIN verify kiya, fraud rules check kiye, paisa cut kiya = processing
3. OutputResult ko usable form me user tak pahunchana (softcopy ya hardcopy)Monitor, printer, speaker, projector, haptic feedback (vibration)"Payment Successful โ€” โ‚น500 sent to Rahul" screen par dikha = output
4. StorageData/result ko baad ke liye save rakhna โ€” permanent ya temporaryHDD, SSD, pen drive, cloud, database server (RAM = temporary working storage)Transaction ki entry history me save ho gayi, receipt bhi = storage
5. Communication optional 5thResult ko doosri machine/user tak network ke through bhejnaNIC, Wi-Fi, router, internet (TCP/IP), email/SMS gatewayMerchant 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

FeatureMeaningReal-life proof
SpeedLakhs of instructions per second (MIPS); aaj ke processors billions of cycles per second (GHz)Google 1 second me lakhs of results
AccuracyHigh accuracy when input, program and hardware are correct; errors can still arise from software, data, hardware or operationUPI me paisa exact kat ta hai
DiligenceNahi thakta, same kaam baar-baar bina bore huye karta haiATM 24ร—7 cash deta hai
VersatilityEk hi machine, kai kaam (typing, video, coding, editing)Smartphone = camera + calculator + bank + classroom
StorageHuge data store kar sakta hai aur turant wapas nikaal sakta haiEk pen drive me 5,000 photos; data centre me crores of records
AutomationEk baar program likho, kaam khud chalne lagta hai (no manual step)Traffic light automatic chalti hai
No IQ / No feelingsKhud soch nahi sakta, emotions nahi, apni galti mahsoos nahi kartaComputer galti ki maafi nahi maangta ๐Ÿ˜…
EconomicalKaam sasta padta hai, roz ka kharcha kam, ek machine kai logon ka kaam1 computer = 100 files ka kaam
Reliability / ConsistencySame input, same output โ€” har baar. Boredom ki wajah se quality nahi girtiBank statement ka total har baar same nikalta hai
Power of rememberingData 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).
YearInventionInventorKey point (yaad rakhne wali baat)
~3000 BCAbacusBabylonians/ChineseWorld ka pehla counting device (ginti ki machine); aaj bhi shops me dekho ๐Ÿ˜„
1614Napier's BonesJohn NapierMultiplication ke liye; logarithm ke inventor bhi
1622Slide RuleWilliam OughtredCalculator ka ancestor; ~300 saal tak engineers ka main tool
1642PascalineBlaise PascalFirst mechanical calculator (add/subtract); aage chalkar Pascal programming language ka naam isi se
1671Stepped ReckonerGottfried LeibnizMultiply + divide bhi kar sakta tha; binary system idea (0 aur 1)
1801Jacquard LoomJoseph JacquardPunch cards โ€” data storage aur machine instructions ka pehla idea
1822/1837Difference Engine / Analytical EngineCharles BabbageFather of Computer. Analytical engine = pehla programmable computer ka design (ALU, memory, I/O sab socha)
1843First Computer ProgramAda LovelaceFirst Programmer (world ki pehli programmer, female) ๐Ÿ‘ฉโ€๐Ÿ’ป; notes me loop ka idea bhi diya
1890Tabulator (punch card machine)Herman HollerithUS Census ke liye; uski company aage chal kar IBM bani
1936Turing Machine (concept)Alan TuringTheoretical model of computation โ€” aaj ke "computable kya hai" ka base; AI ka father bhi
1937โ€“44ABC, Harvard Mark IAtanasoff-Berry, Howard AikenElectro-mechanical computers
1946ENIACEckert & MauchlyFirst general-purpose electronic computer; ~18,000 vacuum tubes, 30 ton, 150 kW โ€” 167 mยฒ room bhar
1947TransistorBardeen, Brattain, Shockley (Bell Labs)Vacuum tube ki jagah transistor โ€” computer chhota, sasta, reliable; 2nd generation ki shuruaat
1949EDVAC / EDSACvon NeumannStored Program Concept โ€” program bhi memory me hi rahega (instruction aur data ek hi jagah)
1951UNIVAC IEckert & MauchlyFirst commercial computer (business ke liye becha gaya)
1958Integrated Circuit (IC)Jack Kilby, Robert NoyceEk chip par kai transistors โ€” 3rd generation, machines aur chhoti
1971Intel 4004 (Microprocessor)Intel (Ted Hoff)"Computer on a chip" โ€” 4th generation ka darwaza khola
1975Altair 8800MITSPehla popular personal computer kit; Bill Gates/Paul Allen ka BASIC yahin bech se shuru hua
1981IBM PCIBMPersonal Computer ka revolution โ€” ghar-ghar computer
1984Apple MacintoshAppleGUI + mouse ko popular banaya
1989โ€“91World Wide WebTim Berners-Lee (CERN)Internet par websites ka system โ€” duniya ek "click" ki doori par
2007+SmartphonesApple (iPhone), Google (Android)Jeb me computer โ€” ~500 crore users
2010sโ€“presentCloud, AI/ML, quantum researchGoogle, OpenAI, IBM & othersComputing 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.

GenPeriodMain TechnologyMemoryLanguage / OSExamples
1st1940โ€“56Vacuum tubesPunch cards, magnetic drumsMachine language (0/1)ENIAC, EDVAC, UNIVAC
2nd1956โ€“63TransistorsMagnetic coreAssembly, FORTRAN, COBOLIBM 1401, IBM 7094
3rd1964โ€“71Integrated Circuits (IC)Magnetic diskHigh-level languages, OS cameIBM 360, ICL 1900
4th1971โ€“80Microprocessor / VLSISemiconductor memory (chips)GUI, PC softwareIBM PC, Apple II/Macintosh
5th1980โ€“presentULSI + AI, parallel processingFlash, cloudAI, voice recognition, machine learningSmartphones, laptops, supercomputers, ChatGPT-type AI
GenSpecial featuresAdvantagesLimitations
1stBahut bade, room-filling machines; hazaaron vacuum tubes; heat + bijli bahut; plugboard/wire se programming; punch card I/OPehli electronic speed โ€” vacuum tube ne mechanical parts hata diyeTubes jal jaate (frequent failure), maintenance nightmare, bijli + AC kharcha, sirf machine language
2ndTransistor = chhota, sasta, kam heat; magnetic core memory; dheere-dheere printers/tapeZyaada reliable aur fast; assembly + FORTRAN/COBOL se programming aasan hui; business use shuruAvailability limited, big organisations tak hi; software development mushkil; networking nahi
3rdICs โ€” ek chip par kai transistors; keyboard-monitor I/O; time-sharing shuruChhote, sasta, tez; ek machine par kai users (time-sharing); OS + high-level languages ka zamanaIC manufacturing costly thi; machines phir bhi institution-level; software maintenance ka issue
4thMicroprocessor โ€” ek chip par poora CPU; RAM chips; GUI + mouse; PC revolution; networks shuruGhar-ghar computer, sasta aur powerful; GUI se aam aadmi ka use; internet era ki neevSoftware piracy/security shuru; hardware fast purana ho jaata tha; early PCs me memory kam
5thULSI + parallel computing + AI; mobile + cloud + IoT; touch/voice interfaceSuper speed, portable, AI-based services; har device internet se judaPrivacy/security chunauti, e-waste, dependence on electricity + internet, "digital divide"
Trick: "Vacuum Tube โ†’ Transistor โ†’ IC โ†’ Microprocessor โ†’ AI" = V-TIM-A ("Ve Time Aa Gaya!" ๐Ÿ•). Technology chhoti hoti gayi (tube โ†’ chip), speed badhti gayi, price girti gayi, aur users badhte gaye.
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.

A) Working ke hisaab se (type of data)

TypeKaam kaisaFeaturesExamples
AnalogContinuous physical quantity (voltage, speed, temperature, pressure) se kaam; exact values nahi, smoothContinuous signal, infinite values possible, measurement-based, low accuracy, no memory/programmability in the digital sense, simple and cheapThermometer, analog clock, speedometer, old weighing scale, ECG graph (continuous waveform), mercury barometer
DigitalDiscrete data (0/1) pe kaam; accurate results, aaj ka sab computersDiscrete values, high accuracy, programmable, memory + storage, logical decisions, outputs can be copied without lossLaptop, calculator, smartphone, digital watch, digital camera, ATM
HybridDono 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 haiECG machine, ICU ventilator, petrol pump machine (petrol flow analog + amount digital), hybrid car, digital thermostat, MRI machines
BasisAnalog computerDigital computerHybrid computer
SignalContinuous (smooth curve)Discrete (0/1)Analog in โ†’ converted โ†’ digital process
AccuracyKam (readings approximate)Bahut zyada (exact)High (conversion ke baad digital)
SpeedReal-time, turant (physical process jaisa hi)Bahut fast calculationReal-time input + fast digital processing
Memory / storagePractically nahiHaan โ€” RAM/HDD/cloudInput analog, storage digital
ProgrammabilityNahi (fixed circuit se kaam)Haan (program badlo, kaam badal jaayega)Haan, digital hissa programmable
Cost & maintenanceSada, sasta, kam preciseGenerally mehnga, par versatileSabse mehnga (ADC/DAC + processor)
Where usedMeasurement/indicating devicesHar jagah โ€” ghar, office, industry, AIMedical, 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

TypeSize & usersSpeed / costExamplesDetail
Microcomputer (PC)Ek user, table/jeb meKam cost (โ‚น20,000 se shuru)Laptop, desktop, tablet, smartphoneUnit 2 ยง2.1 me full detail
Minicomputer (mid-range)10โ€“100 users (ek chhota organisation)Medium costDepartmental server, lab serverUnit 2 ยง2.1 me full detail
MainframeHazaaron users ek saathHigh cost, 24ร—7 reliableIRCTC, bank core system, IBM zSeriesUnit 2 ยง2.1 me full detail
SupercomputerResearch organisations, governmentSabse tez, sabse mehngaPARAM, Pratyush, FrontierUnit 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.
INPUT UNIT Keyboard, Mouse, Scanner, Mic CPU (Central Processing Unit) ALU + - ร— รท logic CU controls all MEMORY UNIT Primary (RAM, ROM, Cache) + Secondary (HDD, SSD, Pen Drive) OUTPUT UNIT Monitor, Printer, Speaker data in result out data & instructions (read/write) All units connected by BUSES: Data Bus (data), Address Bus (kahan), Control Bus (commands)

Five units โ€” kaam kya hai

UnitKaamExamples / parts
Input UnitBahar ki duniya se data + instructions lena aur unhe 0/1 form me convert karke system me daalnaKeyboard, mouse, scanner, mic, camera, touch screen, barcode reader, sensors
Memory UnitData, instructions aur results ko store karna โ€” chalte waqt (primary) aur permanently (secondary)Primary: RAM, ROM, cache; Secondary: HDD, SSD, pen drive
ALUArithmetic (+ โˆ’ ร— รท) aur logical (compare, AND/OR/NOT) operations karnaHar calculation ka asli kaam yahin hota hai
Control UnitPoore system ka "traffic police" โ€” instruction fetch, decode, aur baaki units ko command dena (kya, kab, kahan)Clock ke saath synchronise hokar poora instruction cycle chalata hai
Output UnitResult ko machine form se human-readable form me convert karke dikhana/denaMonitor, printer, speaker, projector

Buses โ€” units ke beech ki "sadkein"

BusKaamDirectionWidth (typical)Example
Data BusActual data/instruction bytes ek unit se doosre tak le jaana (bi-directional)Both ways32/64 bitRAM se CPU me 5, 8, 13 wale bytes
Address BusBatata hai ki memory ya device ka kaunsa address access karna hai (unidirectional โ€” CPU se bahar)CPU โ†’ memory/I-O32/64 bit (jitni badi, utni memory addressable โ€” 32-bit = 4 GB limit)"RAM ke location 1024 se data lao"
Control BusCommands aur status signals โ€” read, write, interrupt, clock, resetMostly CPU se, kuch signals wapas1 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 modelLimitation
Program badalne ke liye hardware nahi badalna padta โ€” sirf naya program load karovon 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 hainSecurity 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.
SystemBaseDigits usedKaha use hota hai
Binary20, 1Computer ka andar ka sab kuch (transistor on/off)
Octal80โ€“7Binary ka short form (Unix file permissions: 755)
Decimal100โ€“9Humara roz ka hisaab
Hexadecimal160โ€“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:

Decimal0123456789101112131415
Binary0000000100100011010001010110011110001001101010111100110111101111
Octal012345671011121314151617
Hex0123456789ABCDEF

Conversion Methods (step-by-step, exam me aise likho)

1) Decimal โ†’ Binary (2 se baar-baar divide karo; remainders ulta likho โ€” bottom to top):

(25)โ‚โ‚€ โ†’ Binary
25 รท 2 = 12  remainder 1  โ† LSB (last likhne wala)
12 รท 2 =  6  remainder 0
 6 รท 2 =  3  remainder 0
 3 รท 2 =  1  remainder 1
 1 รท 2 =  0  remainder 1  โ† MSB (pehla likhne wala)
Read bottom โ†’ top: 1 1 0 0 1
=> (25)โ‚โ‚€ = (11001)โ‚‚ โœ”
Verify: 16 + 8 + 0 + 0 + 1 = 25 โœ”

Second example: (100)โ‚โ‚€ โ†’ Binary
100 รท 2 = 50 r0
 50 รท 2 = 25 r0
 25 รท 2 = 12 r1
 12 รท 2 =  6 r0
  6 รท 2 =  3 r0
  3 รท 2 =  1 r1
  1 รท 2 =  0 r1
=> (100)โ‚โ‚€ = (1100100)โ‚‚ โœ” [64+32+4 = 100]

2) Binary โ†’ Decimal (positions ka weight = 2โฟ, phir jodo):

(11001)โ‚‚ = 1ร—2โด + 1ร—2ยณ + 0ร—2ยฒ + 0ร—2ยน + 1ร—2โฐ
         = 16 + 8 + 0 + 0 + 1 = 25  => (25)โ‚โ‚€ โœ”

(1001011)โ‚‚ = 64 + 0 + 0 + 8 + 0 + 2 + 1 = 75 => (75)โ‚โ‚€ โœ”
(position weights right se: 1, 2, 4, 8, 16, 32, 64)

3) Decimal โ†’ Octal / Hex โ€” same tareeka, bas 8 ya 16 se divide karo:

(345)โ‚โ‚€ โ†’ Octal                 (500)โ‚โ‚€ โ†’ Hex
345 รท 8 = 43 r1                 500 รท 16 = 31 r4   (4)
 43 รท 8 =  5 r3                 31 รท 16 =  1 r15   (F)
  5 รท 8 =  0 r5                  1 รท 16 =  0 r1    (1)
=> (531)โ‚ˆ โœ”                     => (1F4)โ‚โ‚† โœ”
Check: 5ร—64 + 3ร—8 + 1 = 345     Check: 1ร—256 + 15ร—16 + 4 = 500 โœ”
(745)โ‚โ‚€ โ†’ Hex = (2E9)โ‚โ‚† โœ”

4) Binary โ†’ Octal (3-3 bits ka group, right se):

(11010110)โ‚‚ โ†’ groups from right: 011 | 010 | 110
                                 3  |  2  |  6   => (326)โ‚ˆ โœ”
Check: 192 + 16 + 6 = 214 = binary 11010110 โœ”
Note: group banate waqt left me 0 add karke 3 bits poore karo.

5) Binary โ†’ Hex (4-4 bits ka group):

(11001011)โ‚‚ โ†’ groups from right: 1100 | 1011
                                  C   |  B    => (CB)โ‚โ‚† โœ”
Check: 12ร—16 + 11 = 203 โœ”

6) Octal / Hex โ†’ Binary โ€” ulta karo: har digit ko 3 (octal) ya 4 (hex) bits me kholo:

(72)โ‚ˆ   = 111 010        = (111010)โ‚‚ โœ”  [= 58 decimal]
(2F)โ‚โ‚†  = 0010 1111      = (00101111)โ‚‚ โœ” [= 47 decimal]
(345)โ‚ˆ  = 011 100 101    = (011100101)โ‚‚ โœ” [= 229 decimal]
(A5)โ‚โ‚†  = 1010 0101      = (10100101)โ‚‚ โœ” [= 165 decimal]
ConversionMethod (one line)Trick / note
Decimal โ†’ any baseRepeated division by base; remainders bottom-to-topRemainder hi digit hai; last remainder sabse pehla (MSB) digit
Any base โ†’ DecimalDigit ร— base^position, sab jodoRightmost position ka power = 0
Binary โ†’ Octal / Hex3-bit / 4-bit groups (right se), then table se replaceLeft side 0 se pad karo
Octal / Hex โ†’ BinaryHar digit ko 3 / 4 bits me khol doSabse fast method โ€” decimal me jaane ki zaroorat nahi

Binary Arithmetic

OperationRules
Addition0+0=0 | 0+1=1 | 1+0=1 | 1+1=10 (0 likho, carry 1) | 1+1+1 = 11 (1 likho, carry 1)
Subtraction0โˆ’0=0 | 1โˆ’0=1 | 1โˆ’1=0 | 0โˆ’1=1 (borrow 1 from left, borrow value = 2)
Multiplication0ร—0=0 | 0ร—1=0 | 1ร—0=0 | 1ร—1=1 โ€” aur left shift karke jodna (decimal jaisa hi)
DivisionDecimal division jaisa โ€” repeated subtraction / long division, sirf digits 0 aur 1
ADDITION: 1010 + 0111          SUBTRACTION: 1101 โˆ’ 1011
   1 0 1 0  (10)                   1 1 0 1  (13)
 + 0 1 1 1  ( 7)                 โˆ’ 1 0 1 1  (11)
 --------                         --------
 1 0 0 0 1  (17) โœ”                 0 0 1 0  ( 2) โœ”
 (carry ko jodna na bhoolo)      (haan, borrow lagega: 10โˆ’1 = 1)

MULTIPLICATION: 101 ร— 11        DIVISION: 1100 รท 10
     1 0 1   (5)                     1 1 0    (answer 110 = 6)
  ร—    1 1   (3)                  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  ---------                       1 0 ) 1 1 0 0
     1 0 1   (ร—1)                      โˆ’ 1 0
   1 0 1     (ร—1, ek left shift)      โ”€โ”€โ”€โ”€โ”€
  ---------                             1 0 0
   1 1 1 1   (15) โœ”                      โˆ’ 1 0 0
                                        โ”€โ”€โ”€โ”€โ”€
                                            0 0  โ†’ remainder 0
                                     => quotient (110)โ‚‚ = 6 โœ”
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.

(-5) ko 8-bit me kaise likhein?
   5            = 0000 0101
   1's complement = 1111 1010        (saare bits ulto)
   2's complement = 1111 1011       โœ” yahi hai (-5)

Check subtraction 7 โˆ’ 5 using 2's complement:
   7            = 0000 0111
  -5 (2's form) = 1111 1011
  -----------------------------
   sum          = 1 0000 0010
   โ†’ carry (left wala 1) ko chhod do
   โ†’ 0000 0010 = 2 โœ”  (7 โˆ’ 5 = 2)

Another example: 12 โˆ’ 9
   12 = 0000 1100
    9 = 0000 1001 โ†’ 1's = 1111 0110 โ†’ 2's = 1111 0111 = (โˆ’9)
   0000 1100 + 1111 0111 = 1 0000 0011 โ†’ carry hatao โ†’ 0000 0011 = 3 โœ”

Negative answer: 25 โˆ’ 40 = โˆ’15
   25 = 0001 1001,  -40 = 1101 1000
   sum = 1111 0001 โ†’ sign bit 1 = answer negative hai
   magnitude nikaalne ke liye 2's complement wapas karo:
   1111 0001 โ†’ 1's = 0000 1110 โ†’ +1 = 0000 1111 = 15
   => answer = โˆ’15 โœ”
Method (8-bit)+5โˆ’5Notes
Sign-Magnitude0000 01011000 0101Sign bit alag; do zero (+0 = 0000 0000, โˆ’0 = 1000 0000) โ€” confusion
1's Complement0000 01011111 1010Do zero phir bhi; addition me "end-around carry" chahiye โ€” slow
2's Complement0000 01011111 1011Ek hi zero; subtraction = addition; range โˆ’128 se +127 (8-bit)
BitsUnsigned rangeSigned (2's complement) range
4-bit0 to 15โˆ’8 to +7
8-bit0 to 255โˆ’128 to +127
16-bit0 to 65,535โˆ’32,768 to +32,767
32-bit0 to ~4.29 billionโˆ’2,147,483,648 to +2,147,483,647

Related terms โ€” BCD, ASCII, EBCDIC, Unicode

CodeKaise kaam karta haiExampleUse
BCD (Binary Coded Decimal)Har decimal digit ko alag 4-bit code โ€” sirf 0000โ€“1001 valid29 = 0010 1001Digital clocks, calculators, electric meters (display ke liye easy)
ASCII7-bit code, 128 characters (aaj 8-bit extended = 256)'A' = 65, 'a' = 97, '0' = 48, space = 32, Enter = 13Text files, keyboards, programming (C me char ASCII hi hai)
EBCDIC8-bit IBM mainframe codeDifferent ordering from ASCIIPurane IBM mainframes, banking systems
Unicode / UTF-8Modern universal code โ€” har language, symbol aur emoji ka unique number'โ‚น' = U+20B9, '๐Ÿ˜€' = U+1F600, 'โ‚ฌ' = U+20ACAaj 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.

Q1. (156)โ‚โ‚€ โ†’ Binary
156 รท 2 = 78 r0
 78 รท 2 = 39 r0
 39 รท 2 = 19 r1
 19 รท 2 =  9 r1
  9 รท 2 =  4 r1
  4 รท 2 =  2 r0
  2 รท 2 =  1 r0
  1 รท 2 =  0 r1
=> (10011100)โ‚‚   Check: 128+16+8+4 = 156 โœ”

Q2. (10110110)โ‚‚ โ†’ Decimal
= 128 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 182
=> (182)โ‚โ‚€ โœ”

Q3. (999)โ‚โ‚€ โ†’ Hex
999 รท 16 = 62 r7
 62 รท 16 =  3 r14 (E)
  3 รท 16 =  0 r3
=> (3E7)โ‚โ‚†    Check: 3ร—256 + 14ร—16 + 7 = 768+224+7 = 999 โœ”

Q4. (1110101)โ‚‚ โ†’ Octal
groups from right: 1 | 110 | 101  โ†’  1 | 6 | 5
=> (165)โ‚ˆ โœ”  (decimal check: 117 = 64+48+5 โœ”)

Q5. (A3F)โ‚โ‚† โ†’ Decimal and Binary
Decimal: 10ร—256 + 3ร—16 + 15 = 2560 + 48 + 15 = 2623
Binary : A=1010, 3=0011, F=1111 โ†’ (1010 0011 1111)โ‚‚
=> 2623โ‚โ‚€ = (101000111111)โ‚‚ โœ”

Q6. (77)โ‚ˆ โ†’ Decimal / Binary
Decimal: 7ร—8 + 7 = 63
Binary : 111 111 โ†’ (111111)โ‚‚ โœ”

Q7. (45)โ‚โ‚€ โ†’ Octal
45 รท 8 = 5 r5
 5 รท 8 = 0 r5
=> (55)โ‚ˆ โœ” (5ร—8+5 = 45)

Q8. (โˆ’20) ko 8-bit 2's complement me likho
  20 = 0001 0100
1's  = 1110 1011
2's  = 1110 1100  โ† yahi hai (โˆ’20) โœ”

Q9. 2's complement se subtract karo: 20 โˆ’ 13
20  = 0001 0100
13  = 0000 1101 โ†’ (โˆ’13) = 1111 0010 + 1 = 1111 0011
Sum = 0001 0100 + 1111 0011 = 1 0000 0111
carry chhodo โ†’ 0000 0111 = 7 โœ”

Q10. 2's complement se subtract karo: 15 โˆ’ 25 (answer negative aayega)
15  = 0000 1111
25  = 0001 1001 โ†’ (โˆ’25) = 1110 0110 + 1 = 1110 0111
Sum = 0000 1111 + 1110 0111 = 1111 0110
Sign bit 1 = negative. Magnitude: 1's of 1111 0110 = 0000 1001, +1 = 0000 1010 = 10
=> answer = (โˆ’10) โœ”
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)

  1. Binary number system ki base kya hai? (a) 2 (b) 8 (c) 10 (d) 16
  2. (1101)โ‚‚ ka decimal value? (a) 11 (b) 12 (c) 13 (d) 14
  3. Hexadecimal me "F" ka value? (a) 12 (b) 13 (c) 14 (d) 15
  4. (25)โ‚โ‚€ ka binary? (a) 11001 (b) 10101 (c) 11010 (d) 10011
  5. 8-bit signed number ka range? (a) โˆ’127 to +127 (b) โˆ’128 to +127 (c) 0 to 255 (d) โˆ’255 to +255
  6. ASCII me 'A' ka code? (a) 61 (b) 63 (c) 65 (d) 67
  7. (11111111)โ‚‚ ka decimal? (a) 255 (b) 256 (c) 127 (d) 128
  8. BCD me 29 kaise likha jaata hai? (a) 0010 1001 (b) 0011 0001 (c) 1001 0010 (d) 1010 1001
Answers: 1-(a) 2-(c) 3-(d) 4-(a) 5-(b) 6-(c) 7-(a) 8-(a). (Galat hue to wapas method dekh lo โ€” sirf answer ratna kaam nahi aayega.)

1.8 Boolean Algebra & Logic Gates High-yield syllabus topic

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') โ€” inverterAND (AยทB, AโˆงB) โ€” "dono chahiye"OR (A+B, AโˆจB) โ€” "koi ek kaafi hai"
AY = A'ABY = AยทBABY = A+B
01000000
10010011
โ€”โ€”100101
โ€”โ€”111111

Aur ek useful derived truth table (NAND, NOR, XOR, XNOR) โ€” ye 4 har exam me kisi na kisi form me aate hain:

ABNAND (ยฌ(AยทB))NOR (ยฌ(A+B))XOR (AโŠ•B) โ€” alag-alag hone par 1XNOR โ€” barabar hone par 1
001101
011010
101010
110001
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

GateBoolean expressionOutput 1 kab hota haiReal-life use
NOTY = A'Input 0 ho toInverter, signal ulta karna
ANDY = AยทBDono inputs 1 hoBank locker (do chaabi), "username AND password sahi"
ORY = A+BKoi ek (ya dono) input 1 hoGhar ki bell (front door OR back door button)
NANDY = (AยทB)'Koi ek input 0 hoUniversal gate โ€” chips me sabse zyada use (fast + sasta)
NORY = (A+B)'Dono inputs 0 hoUniversal gate, memory circuits
XORY = AโŠ•BInputs alag ho (Aโ‰ B)Adder ka sum bit, parity check, encryption
XNORY = (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

LawAND formOR form
IdentityAยท1 = AA+0 = A
Null / DominationAยท0 = 0A+1 = 1
IdempotentAยทA = AA+A = A
ComplementAยทA' = 0A+A' = 1
Double negation(A')' = A
CommutativeAยทB = BยทAA+B = B+A
Associative(AยทB)ยทC = Aยท(BยทC)(A+B)+C = A+(B+C)
DistributiveAยท(B+C) = AยทB + AยทCA+(BยทC) = (A+B)ยท(A+C)
AbsorptionAยท(A+B) = AA+(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):

ABAยทB(AยทB)'A'B'A' + B'
0001111
0101101
1001011
1110000
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 SoftwareApplication Software
Computer ko chalane/manage karne ke liyeUser 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), utilitiesExamples: MS Word, Tally, Chrome, WhatsApp, Games
Machine-dependent, complexity highGenerally machine-independent
Computer ke saath pre-installed ya baad me installUser apni zarurat se install karta hai
Size generally large, rarely uninstalledChhote-bade kai, kabhi bhi uninstall
Without it, computer start hi nahi hogaWithout it, computer chalega par kaam nahi hoga
Example proper: Windows 11, Linux kernel, printer driverExample 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).

UtilityKaamExample
AntivirusVirus/malware detect aur remove karna, real-time protectionQuick Heal, McAfee, Windows Defender, Avast
Disk DefragmenterHDD par files ke tukde (fragments) ko sahi order me lagana โ€” speed improveWindows "Defragment and Optimize Drives"
Disk CleanupJunk/temp files delete karke space free karnaWindows Disk Cleanup, CCleaner
Backup softwareData ka copy rakhna (schedule par)Windows Backup, Google Drive sync
Compression toolsFiles ko chhota karke zip banana / kholnaWinRAR, 7-Zip
FirewallNetwork traffic filter karna โ€” unauthorised entry blockWindows Firewall, router firewall
Disk formatter / partition toolDrive ko format/partition karnaWindows Disk Management
Task Manager / monitoringCPU, RAM, process dekhna aur band karnaTask Manager, top/htop (Linux)
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

BasisHardwareSoftware
Kya haiPhysical parts โ€” chhu sakte hoPrograms/instructions โ€” sirf chala sakte ho
ManufactureFactory me assemble hota haiProgrammers likhte hain (develop karte hain)
Damage / wearPurana hota hai, kharab ho sakta haiWear nahi hota, par corrupt ho sakta hai
Change karnaReplace ya upgrade karna padta hai (paisa lagta hai)Update/patch se badal jaata hai (often free)
DependencySoftware ke bina bekaarHardware ke bina chal nahi sakta
ExamplesCPU, RAM, keyboard, monitorWindows, Chrome, MS Word, antivirus

1.10 Computer Languages & Translators

LevelLanguageFormTranslatorPoints
Low (1st gen)Machine LanguageDirect 0/1 binary codeKoi nahi (direct chalega)Fastest execution, machine-dependent, likhna sabse mushkil, no portability
Low (2nd gen)Assembly LanguageMnemonics: MOV A, B, ADD, SUBAssemblerMachine-dependent but readable; embedded systems/drivers me use
High (3rd gen)High-Level LanguageEnglish-like: C, C++, Java, PythonCompiler / InterpreterEasy to learn, portable (same code chalega kisi bhi machine pe โ€” recompile), aaj sab yahi use
4th gen4GLSQL, report generatorsDBMS engineKaam "kya chahiye" batate hain, "kaise" nahi โ€” non-programmer friendly
5th gen5GL / AIProlog, AI toolsAI engineLogic + 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

BasisCompilerInterpreterAssembler
KaamPoora HLL program ek saath machine code me translateEk line padhi โ†’ translate โ†’ execute, phir agli lineAssembly language โ†’ machine code
OutputObject code / .exe file banti haiKoi file nahi banti, direct runObject code
Speed of executionFast (translation ek baar)Slow (har baar translate hoga)Fast
Error reportingSaari errors ek saath list me (end me)Pehli error par ruk jata hai, line-by-lineLine-by-line
MemoryZyada chahiye (poora program + symbol table)Kam chahiyeKam chahiye
DebuggingMushkil thoda (list dekh kar)Aasan (ek-ek line par rukta hai)Medium
ExamplesC, 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)NaamUse
Oval / rounded rectangle (โฌญ)TerminalStart / Stop
Parallelogram (โ–ฑ)Input / OutputRead / Print (data lena-dena)
Rectangle (โ–ญ)ProcessCalculation, assignment (SUM = A+B)
Diamond (โ—‡)DecisionCondition check (A > B?) โ€” Yes/No branches
Circle (โ—‹)ConnectorDiagram ke parts jodna (A, B, 1, 2)
Arrow (โ†’)Flow lineDirection of flow
Half-oval bottom (โฌ’)DocumentPrinted report / output on paper
Double-sided rectangle (โŒท)Predefined processCall to a function / subroutine
Cylinder (๐Ÿ—„)Magnetic disk / storageDatabase / 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

BasisAlgorithmFlowchartPseudocode
FormWritten steps (text)Diagram (symbols)Text + code keywords
LanguageSimple EnglishSymbols/shapesMixed (English + keywords)
Coding se pehleYes (step 1) Algorithm ke baadAlgorithm ke baad / parallel
Best forLogic clarityVisual understanding, debugging logicDirect code me convert karna
LimitationBade problems me lamba ho jata haiChhota change = poora redrawStandard 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)

  1. Abacus kis kaam ke liye tha? (a) Multiply (b) Counting (c) Printing (d) Storage
  2. "Father of Computer"? (a) Ada Lovelace (b) Hollerith (c) Charles Babbage (d) Pascal
  3. ENIAC kis saal bana? (a) 1943 (b) 1946 (c) 1949 (d) 1951
  4. Stored program concept kis machine se juda hai? (a) ENIAC (b) EDVAC (c) UNIVAC (d) IBM PC
  5. GIGO ka matlab? (a) Garbage In Great Output (b) Garbage In Garbage Out (c) Great Input Good Output (d) None
  6. Kaunsa gate universal nahi hai? (a) NAND (b) NOR (c) XOR (d) Teeno universal hain
  7. CPU ke teen parts kya hain? (a) ALU, RAM, ROM (b) ALU, CU, Registers (c) CU, Cache, RAM (d) ALU, HDD, CU
  8. Interpreter ka kaam? (a) Poora program ek saath translate (b) Line-by-line translate + run (c) Assembly โ†’ machine code (d) File load karna
Answers: 1-(b) 2-(c) 3-(b) 4-(b) 5-(b) 6-(c) 7-(b) 8-(b).

Unit 1 short-note practice (model answers ki outline ke saath)

Ye 6 short notes likhne ki practice karo (exam me 5ร—2 = 10 marks aate hain):
  1. Utility software
  2. Firmware
  3. Translator (compiler/interpreter/assembler)
  4. Flowchart symbols
  5. GIGO aur iska practical matlab
  6. Abacus se ENIAC tak ka safar (5 milestones)
Model answer โ€” "Flowchart symbols" (5 marks): (1) Oval = Start/Stop (terminal). (2) Parallelogram = Input/Output (read/print). (3) Rectangle = Process (calculation/assignment). (4) Diamond = Decision (condition, Yes/No branches). (5) Circle = Connector (diagram ke hisse jodna), Arrow = flow direction. Bonus line: "flowchart algorithm ka pictorial roop hai โ€” chhota change karne par poora redraw karna padta hai." Har symbol ke saath chhota shape banao โ€” examiner shape dekhta hai. โœ๏ธ
Comparison questionAnswer ke 4 bases (yaad rakho)
Data vs InformationMeaning โ€ข Form โ€ข Use โ€ข Dependency (example ke saath)
Analog vs Digital vs HybridSignal โ€ข Accuracy โ€ข Programmability โ€ข Example
Compiler vs InterpreterTranslation (poora vs line-by-line) โ€ข Output file โ€ข Speed โ€ข Error reporting + examples
System vs Application softwareKaam โ€ข Interaction โ€ข Dependency โ€ข Examples
Low-level vs High-level languageReadability โ€ข Portability โ€ข Speed โ€ข Translator
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)

TermEk line me
DataRaw, unorganised facts โ€” input
InformationProcessed, meaningful data โ€” decision ke liye
GIGOGarbage In Garbage Out โ€” galat input, galat output
IPOSInput โ†’ Process โ†’ Output โ†’ Storage (+ communication)
DIKWData โ†’ Information โ†’ Knowledge โ†’ Wisdom
RadixNumber system ki base (2, 8, 10, 16)
MSB / LSBMost/Least Significant Bit โ€” sabse bada/sabse chhota weight wala bit
2's complementNegative number likhne ka tarika (1's complement + 1)
BCDHar decimal digit ka 4-bit code (29 = 0010 1001)
ASCII / UnicodeCharacter codes โ€” 'A'=65; Unicode har language/emoji ke liye
Universal gateNAND/NOR โ€” inse baaki sab gates ban jaate hain
De Morgan(AB)' = A'+B' aur (A+B)' = A'ยทB'
FirmwareROM me fixed software (BIOS/UEFI)
Compiler / InterpreterPoora vs line-by-line translation
AlgorithmFinite, well-defined steps โ€” FIDO-E qualities
FlowchartAlgorithm 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)

Syllabus-based exam-style practice questions (not predictions) โ€” Unit 1:
  1. Define data and information. Difference with examples. (5)
  2. Characteristics of computer kya hain? Explain with examples. (5)
  3. Generations of computers ko explain karo (technology + examples). (10)
  4. Explain the basic organization of a digital computer with diagram. (10)
  5. Convert: (a) 25 decimalโ†’binary (b) 11010110 binaryโ†’octal (c) 11001011 binaryโ†’hex (d) โˆ’5 ko 2's complement me likho. (5โ€“10)
  6. Boolean operators ki truth tables likho + De Morgan's theorems verify karo. (5โ€“10)
  7. Difference between compiler and interpreter (10 points). (5)
  8. What is an algorithm? Qualities likho + even/odd ka algorithm aur flowchart banao. (10)
  9. System software vs application software (differences + examples). (5)
  10. Short notes: Utility software, Firmware, Translator, Flowchart symbols. (5ร—2)
  11. Write short notes: DIKW model, types of data (structured/unstructured), bus system of computer. (5ร—2)
  12. Explain the information processing cycle with a block diagram. (5)
  13. Difference between analog, digital and hybrid computers. (5)
  14. Simplify: (a) AยทB + AยทB' (b) (AยทB + C)' using boolean laws. (5)
  15. Perform binary arithmetic: 1010+0111, 1101โˆ’1011, 101ร—11. (5)

UNIT 2 โ€” Classification & Anatomy of a Computer

2.1 Classification of Digital Computer Systems

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.

TypeSize / PowerFeaturesKahan use hota haiExamples
Microcomputer (PC)Ek user, chhota (table/desk/jeb me)Ek microprocessor, sasta, desktop/laptop/tablet/smartphone form factors; personal kaamGhar, school, office, dukaan ka billing, freelance work, gamingHP laptop, Dell desktop, iPhone, Raspberry Pi
Minicomputer (Mid-range)Chhote organisation, 10โ€“100 usersMulti-user (10โ€“100 log), multiple terminals, server ki tarah; mainframe se sasta aur chhotaCollege ka admission server, bank branch, factory ka process control, small office LANPDP-11 (purane), aaj ke blade servers, HP/IBM mid-range servers
MainframeBade organisation, hazaaron users ek saathHazaaron users ek saath, bahut bada storage, 24ร—7 reliability (99.999% "five nines"), bulk data processing, high I/O throughput, virtualizationBank ke central records, IRCTC, railway reservation, insurance, census, hospital chain, UPI ke core systemsIBM zSeries (z15/z16), IBM ES/9000, UNIVAC (purana)
SupercomputerDuniya ka sabse tez + mehngaLakhs of processors parallel me, "FLOPS" me speed count hoti hai (petaflops/exaflops), AC + special liquid cooling, bahut bada floor space aur bijliWeather forecast, ISRO satellite simulation, nuclear research, drug discovery, AI training, oil exploration, genome analysisIndia: PARAM (C-DAC), Pratyush/Arka (IITM), AIRAWAT. World: Frontier, El Capitan, Fugaku
BasisMicrocomputerMinicomputerMainframeSupercomputer
Users ek saath110โ€“100HazaaronSpecial research teams
Relative speedLowโ€“medium (GHz level)MediumHigh (MIPS bahut zyada)Sabse high (FLOPS/PFLOPS)
Physical sizeDesk/jebKabinet/rackBade racks, special roomHall-floor, building scale
Costโ‚น20,000 se lakhLakhsCroresSau crore+
Cooling/ACNormalNormal + fanAC roomLiquid cooling + special power
Main usePersonal kaamDepartment/organisation serverBulk transactions, recordsResearch, simulation, AI
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:

PartKaamReal-life note
MotherboardMain 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 socketJahan processor chip lagta haiIntel/AMD processor โ€” socket model motherboard se match hona zaroori
RAM slotsMemory modules lagane ki slots (DDR4/DDR5)8GB โ†’ 16GB upgrade = system noticeably fast (multi-tasking improve)
HDD / SSD baySecondary storage lagane ki jagahSSD lagane se Windows 10 sec me boot ho jata hai (HDD me 40โ€“60 sec)
SMPS / PSUPower supply โ€” AC ko DC me convert karke sab parts ko alag-alag voltage deta hai650W PSU gaming ke liye; ghatiya PSU se poora system jal sakta hai
GPU / Graphics cardImage/video rendering, heavy graphics (games, video editing, AI/ML)NVIDIA RTX, AMD Radeon; integrated GPU sirf normal kaam ke liye kaafi
Cooling fans / heat sinkCPU 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 cardWi-Fi card, sound card, TV tuner card
PortsUSB, HDMI, VGA, Ethernet (LAN), audio jack, power portPen drive USB port me, monitor HDMI me, internet LAN cable me
CMOS batteryDate/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.

RegisterFull nameKaam
PC / IPProgram CounterAgla instruction kahan hai, uska address rakhta hai (fetch ke baad +1)
IRInstruction RegisterAbhi jo instruction chal raha hai, wo rakhta hai
MARMemory Address RegisterMemory ka address (kahan) rakhta hai โ€” address bus se juda
MDR / MBRMemory Data RegisterMemory se aaya/jaane wala data rakhta hai โ€” data bus se juda
ACCAccumulatorALU ke results store karta hai
GPRsGeneral Purpose RegistersAX, BX, CX, DX โ€” temporary data aur addresses
SP / FLAGSStack Pointer / Status flagsStack 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 / EraMicroprocessorsKey feature
1971โ€“78Intel 4004, 8008, 8085, 80864-bit โ†’ 8-bit โ†’ 16-bit; PC revolution ki shuruaat; 8086 me segmented memory
1979โ€“9380286, 386, 486Protected mode, 32-bit computing, floating-point math, GUI (Windows) ko possible banaya
1993โ€“2005Pentium series, Core 2Pipelining, superscalar, MMX/SSE, GHz race; dual-core shuru
2006โ€“presentCore i3/i5/i7/i9, AMD RyzenMultiple cores (2โ€“24+), turbo boost, integrated GPU, AI instructions
Mobile/ARM eraSnapdragon, Apple M-series, DimensityRISC-based, power-efficient (battery), ARM ko laptop me bhi laaya (Apple M1+)
Performance factorMatlabEffect
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
CoresEk chip par kitne independent processors (dual=2, quad=4, octa=8)"Ek dimaag ki jagah 8 dimaag" โ€” parallel kaam, multi-tasking fast
Cache sizeCPU ke paas ki tez memory (L1/L2/L3)Bada cache = baar-baar RAM ke paas nahi jaana padta = fast
Word sizeCPU 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 complexRISC simple + fast chips (mobile), CISC program chhota (desktop)
RISCCISC
Reduced Instruction Set ComputerComplex 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 simpleProgram chhota likhna, hardware complex
Zyada instructions chahiye same kaam ke liye, par compiler ko optimize karna aasanKam 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

UnitSize (loosely)Memory me kya aa sakta hai (approx.)
Bit0 ya 1 (smallest)โ€”
Nibble4 bits1 hex digit
Byte8 bits1 character (jaise 'A')
KB (Kilobyte)1024 bytes (โ‰ˆ10ยณ)1 chhota text page
MB (Megabyte)1024 KB1 MP photo / 1 min song
GB (Gigabyte)1024 MB~250 songs / 1 HD movie (~2 GB)
TB (Terabyte)1024 GBLaptop ka 1 TB HDD = ~2 lakh songs
PB (Petabyte)1024 TBNetflix ka 1 din ka content scale
EB / ZB / YB1024ร— aageGoogle/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)

Registers (fastest, smallest, costliest) CPU ke andar โ€” nanoseconds Cache Memory (L1 โ†’ L2 โ†’ L3) CPU chip par/paas โ€” often-used data Primary Memory (RAM / ROM) Volatile/non-volatile โ€” program chalte waqt Secondary Storage (HDD, SSD, Pen Drive, Cloud) Slowest, largest, sasta โ€” permanent data
LevelWhereSpeedSizeCostKya rakha hota hai
RegistersCPU ke andarFastest (sub-ns)Bytesโ€“KBCostliest per byteAbhi chal raha data/instruction
Cache (L1โ†’L2โ†’L3)CPU chip par/paasBahut fastKBโ€“MBBahut mehngaFrequently used data/instructions
Primary (RAM/ROM)Motherboard parFastGBMediumChalte hue program + data
Secondary (HDD/SSD)Bay/port meSlow (SSD medium)TBSastaPermanent files, OS, software
Tertiary / CloudRemote data centreSlowest (network)Unlimited (paid)SubscriptionBackup, 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 gayabNon-volatile โ€” data bana rehta hai
Read + Write donoNormally sirf Read (writes special process se)
Programs/data chalte waqt yahan aate hainStartup instructions (BIOS/firmware) yahan
8/16 GB typical aajKBs se MBs
Types: SRAM (fast, costly, cache), DRAM (sasta, refresh chahiye, main memory)Types: PROM (ek baar likho), EPROM (UV se erase), EEPROM (electrically erase โ€” aaj Flash)
BasisSRAM (Static RAM)DRAM (Dynamic RAM)
CellFlip-flop (6 transistors) โ€” data tab tak rehta hai jab tak power haiCapacitor + 1 transistor โ€” charge ko periodically refresh karna padta hai
SpeedBahut fastSlower than SRAM
Cost & densityMehnga, kam densitySasta, high density (zyada GB ek chip par)
UseCache (L1/L2/L3), small buffersMain 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 widthMax addressable memory (2โฟ)Practical meaning
8-bit2โธ = 256 bytesPurane microcontrollers
16-bit2ยนโถ = 65,536 bytes = 64 KB8086 era, chhote chips
20-bit2ยฒโฐ = 1,048,576 bytes = 1 MB8086 ke 1 MB limit wali classic problem
24-bit2ยฒโด = 16 MBShuruaati embedded systems
32-bit2ยณยฒ = 4,294,967,296 bytes = 4 GBPurane Windows ka "4 GB se zyada RAM nahi dikhta" issue
36-bit2ยณโถ = 64 GBServer CPUs (PAE type extensions)
64-bit2โถโด = 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. โœ”
CheezTypical sizeKitni 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 GB1 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. ๐Ÿงฎ

Unit 2 MCQs โ€” storage/memory

  1. 1 GB = kitne MB? (a) 100 (b) 1000 (c) 1024 (d) 512
  2. Kaun volatile memory hai? (a) ROM (b) RAM (c) HDD (d) Flash
  3. BIOS kis memory me hota hai? (a) RAM (b) ROM (c) SSD (d) Cache
  4. Sabse fast memory kaunsi hai? (a) Cache (b) RAM (c) Registers (d) SSD
  5. 32-bit address bus max kitni memory address kar sakta hai? (a) 1 GB (b) 4 GB (c) 16 GB (d) 64 GB
  6. SRAM kis kaam me use hoti hai? (a) Main memory (b) Cache (c) Secondary storage (d) Virtual memory
  7. SSD me moving parts kitne hote hain? (a) 1 (b) 2 (c) 0 (d) 4
  8. CD ki capacity? (a) 700 MB (b) 4.7 GB (c) 25 GB (d) 1.4 MB
Answers: 1-(c) 2-(b) 3-(b) 4-(c) 5-(b) 6-(b) 7-(c) 8-(a).

2.5 Secondary Storage Devices

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.
DeviceTechnologyCapacityNotes
HDD (Hard Disk Drive)Magnetic platters + read/write head, ghoomti hai (5400/7200 RPM)500 GB โ€“ 10 TBSasta, zyada storage, par slow + loud + girne pe kharab
SSD (Solid State Drive)NAND Flash chips, koi moving part nahi128 GB โ€“ 8 TBBahut fast (boot 10 sec), silent, mehnga
Pen Drive / Flash DriveFlash memory + USB8 GB โ€“ 512 GBFile carry karne ka sabse common tarika
Memory Card (SD/microSD)Flash4 GB โ€“ 1 TBPhone, camera me
Optical: CD / DVD / Blu-rayLaser se padhna (reflection)CD 700 MB, DVD 4.7 GB (dual-layer 8.5), Blu-ray 25/50 GBAaj kam use (films, old software, archival)
External HDD/SSDUSB se connect1โ€“20 TBBackup ke liye
Cloud StorageInternet par doosri company ke servers5 GB โ€“ unlimited (paid)Google Drive, OneDrive, iCloud. Kahin bhi access, par internet chahiye + privacy question
Magnetic TapeSequential magnetic tape (cartridge)Multiple TB (LTO)Enterprise backup/archive me aaj bhi โ€” sasta per TB, par access sequential (slow)
BasisHDDSSD
PartsMechanical โ€” spinning platter + moving headElectronic โ€” 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 / heatAawaz karta hai + heatSilent, kam heat, battery life better
DurabilityGirne/vibration se kharab (head + platter)Shock-proof, par write cycles ki limit (TBW)
Cost per GBSastaMehnga (2โ€“4ร—)
Best useSasta bulk storage, backup, CCTV recordingOS 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.
DeviceKaamReal-life example
KeyboardLetters, numbers, commands type karna (104 keys: typing, function, numeric pad, shortcut keys)Chat, coding, form filling; QWERTY layout
MouseCursor move, click, select, drag (left/right/middle click, scroll wheel)Kuch bhi kholna/band karna; optical/wireless mouse
Trackball / Touchpad / Joystick / GamepadAlternative pointing devices โ€” space bachane ya gaming ke liyeLaptop touchpad, PUBG mobile controller, flight simulator joystick
Touch screenTouch se direct input (input+output dono ek hi device me)ATM, smartphone, ticket kiosk, self-order KFC screen
Light pen / Stylus / DigitizerPen se likhna/draw karna, design bananaGraphic tablet, designer ka stylus, digital signature pad
ScannerPaper document ko digital image me convert karnaDocuments scan karke PDF banana, marksheet upload
OMR (Optical Mark Reader)Pencil se bhare bubbles padhna (mark ki presence/absence)Competitive exam ki OMR sheet โœ… (speed: hazaaron sheets/hour)
OCR (Optical Character Reader)Printed/handwritten text ko characters me convert karnaAadhaar/PAN scan karke details auto-fill, DigiLocker, cheque amount reading
MICR (Magnetic Ink Character Reader)Cheque ke neeche wale special magnetic ink numbers padhnaBank cheque processing (speed + security; special E-13B font)
Barcode ReaderBlack-white lines (barcode) padhna โ€” product ID nikaalnaKirana shop ka billing, product tag, library books, courier parcels
QR Code Scanner2D square code padhna (zyada data, fast)UPI payment scan & pay ๐Ÿ˜, menu card, ticket check
Biometric (fingerprint/iris/face)Unique body feature se pehchan karna (authentication)Aadhaar authentication, mobile face unlock, attendance machine, DigiYatra
MicrophoneSound input โ€” voice ko digital signals meVoice typing, Google Assistant, video call, music recording
WebcamVideo input (live frames)Online class, video call, interview recording, security camera
Card Reader / Magnetic Strip ReaderCard ki magnetic strip/chip padhnaATM me card swiping (aaj mostly chip + NFC tap)
Sensors (IoT)Temperature, motion, light, pressure, gas โ€” physical duniya se readingSmartwatch steps, AC ka thermostat, automatic door, smart farming soil sensor

Input devices ke categories (short note ready)

CategoryDevicesKya input dete hain
Typing/textKeyboard, OCR, MICR, barcode/QR readerText, numbers, codes
PointingMouse, touchpad, trackball, joystick, light pen, stylus, touch screenPosition, click, drag, sketch
Scanning/readingScanner, OMR, barcode readerImages, marks, product codes
Audio/visual captureMicrophone, webcam, digital cameraSound, video, photos
Dedicated/biometricFingerprint/iris/face scanner, card readerIdentity, authentication
Sensing (IoT)Temperature, motion, gas, light, pressure sensorsPhysical-world readings (automatic input)
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.
DeviceTypeNotesReal life
MonitorSoftcopyCRT (purana), LCD, LED, OLED, touchscreen; resolution (1920ร—1080 FHD, 4K), refresh rate (60 Hz, 120 Hz)Laptop/Monitor screen
ProjectorSoftcopyBade screen pe image; LCD/DLP/LaserClass lecture, cinema, PPT presentation
Printer โ€” InkjetHardcopy, Non-impactSasta printer, mehnga ink (cartridge), ghar ke liye, colour photos achheGhar pe photos/assignments
Printer โ€” LaserHardcopy, Non-impactToner use, fast, office ke liye best, quality behtar, per-page cost kamBank passbook statement, office documents
Printer โ€” Dot MatrixHardcopy, ImpactPins se punch, shor karta hai, sasta print + carbon copy bana sakta haiPurane bank passbook printers, shop bills, GST invoices (multi-copy)
Thermal PrinterHardcopy, Non-impactHeat se print, roll paper, no inkATM receipt, Swiggy/Zomato bill, bus ticket
PlotterHardcopyBade technical drawings print karta hai (pen/inkjet plotter)Map, building ka blueprint, design drawings, banners
Speakers / HeadphonesSoftcopy (audio)Sound outputMusic, movie, online class
3D PrinterHardcopyLayer-by-layer 3D object banata hai (additive manufacturing)Prototypes, models, medical implants, school projects
Haptic devices (vibration motor)Softcopy (touch)Vibration/force feedbackPhone vibration, gaming controller rumble
ImpactNon-impact
Hammer/pins paper ko chhoote hain (hit karke print)Bina touch โ€” ink spray, toner/laser, heat
Shor zyadaSilent
Carbon copy ban sakti hai (multiple copies)Sirf ek copy
Speed kam, quality mediumSpeed tez, quality best
Examples: dot matrix, daisy wheel, line printerExamples: inkjet, laser, thermal, plotter

Monitor ke types (short note ready)

TypeTechnologyGoodBad
CRT (Cathode Ray Tube)Electron beam screen parColour depth achha (designers use karte the)Bada, bhaari, bijli zyada, aaj khatam
LCDLiquid crystal + backlightFlat, halka, sastaColours/contrast average, viewing angle kam
LEDLCD with LED backlightBrighter, kam power, patlaBlacks perfect nahi (backlight bleed)
OLEDHar pixel khud roshni deta haiBest contrast, infinite blacks, fastMehnga, 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)

ScenarioSahi deviceKyun
Bank ko roz 500 cheques process karne hain (numbers padh kar)MICR readerCheque ke magnetic ink numbers special font me โ€” fast + tamper-proof
School ko 20,000 OMR sheets check karni hainOMR readerBubbles ki position padhna โ€” speed hazaaron sheets/hour
Aadhaar card se form auto-fill karna haiOCR scannerPrinted text ko characters me convert karta hai
Kirana shop ka billing fast karna haiBarcode readerProduct code scan โ€” 1 second me entry, manual typing nahi
Petrol pump par petrol flow (analog) aur amount (digital) dikhana haiHybrid computer (ADC + display)Analog input ko digital me convert karke calculate karta hai
ATM receipt dena hai (roll paper, koi ink nahi)Thermal printerHeat se print, maintenance kam, sasta per receipt
Ghar par 10 pages colour assignment print karne hainInkjet printerColour quality achhi, initial cost kam
Office me roz 500 black-white pages print karne hainLaser printerPer-page cost kam (toner), speed fast, quality behtar
Building ka 6 feet ka blueprint print karna haiPlotterBade format drawings ke liye bana hua hai
Fingerprint se attendance lagani haiBiometric scannerUnique 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 ๐ŸŽ‰
StepToolInputOutputErrors jo yahan milti hain
PreprocessingPreprocessorhello.cExpanded .i codeMissing header file, bad macro
CompilationCompiler (gcc/Turbo C)Preprocessed codeAssembly (.s)Syntax errors, undefined variable
AssemblyAssemblerAssembly (.s)Object file (.o/.obj)Assembly-level errors, symbol issues
LinkingLinkerObject + librariesExecutable (.exe)Undefined reference (printf ka code na milna)
Loading/RunLoader (OS).exeRunning processRuntime 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 stepRegister/bus me kya huaValue
Fetch (1)PC me agla address โ†’ MAR โ†’ address busPC = 2000 (instruction ka address)
Fetch (2)Memory se instruction MDR me aayaMDR = "ADD R1,R2"
Fetch (3)Instruction IR me load, PC = PC + 1IR = ADD R1,R2, PC = 2001
DecodeCU ne samajha: add karna hai, operands R1 aur R2โ€”
ExecuteALU ne R1 + R2 nikala5 + 3 = 8
Store (writeback)Result R1 me wapas likha gayaR1 = 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, powerfulWashing machine/AC โ€” dedicated single kaam
Costly, bijli zyada, speed zyadaSasta (โ‚น50โ€“โ‚น500), kam bijli, chhota
Operating system chahiye (Windows/Linux)Mostly OS ke bina (bare-metal program ya RTOS)
Examples: Intel Core i5, AMD RyzenExamples: 8051, Arduino (ATmega328P), ESP32, PIC16F877A, Raspberry Pi Pico

Microcontroller ke parts

PartKaam8051/Arduino me
CPU coreInstructions chalana (program)8051 ka 8-bit core, Arduino ka ATmega328P
Flash/ROMProgram permanently store (firmware)Arduino Uno me 32 KB flash
RAMChalte waqt variables/dataArduino Uno me 2 KB SRAM
Timers/CountersTime delay, PWM (motor speed, LED brightness)3 timers
ADC (Analog to Digital Converter)Sensor ki analog value (0โ€“5V) ko digital number me10-bit ADC (0โ€“1023)
Serial ports (UART/SPI/I2C)Doosre chips/sensors/PC se baatUART se PC par data bhejna
GPIO pinsLED, motor, relay, button connect karnaArduino 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)

ChipYearBitsKyun yaad rakhna hai
Intel 400419714-bitWorld ka pehla microprocessor (calculator ke liye bana tha)
Intel 8085 / 80861976 / 19788 / 16-bitBCA labs ka classic โ€” 8085 assembly aaj bhi padhaate hain
Intel 80286 / 3861982 / 198516 / 32-bitProtected mode, multitasking โ€” Windows possible hua
Intel Pentium199332-bitGhar-ghar PC ka doar; multimedia (MMX) shuru
Core i5 / i72008+64-bitMultiple cores, turbo boost, integrated graphics
Apple M1/M2/M3, Snapdragon2020+64-bit ARM (RISC)Power-efficient chips โ€” laptop aur phone dono me
Short-note practice (5โ€“7 line me likho):
  1. Registers โ€” kaunse 5 important hain aur kya karte hain.
  2. Cache memory โ€” kyun zaroori hai (speed gap RAM vs CPU).
  3. Virtual memory โ€” RAM full hone par kya hota hai.
  4. SSD vs HDD โ€” 5 points.
  5. Microprocessor vs microcontroller โ€” 5 points.
  6. 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

TermEk line me
MicroprocessorCPU ek chip par (Intel 4004 se shuru)
MicrocontrollerCPU + memory + I/O ek chip me (8051, Arduino)
ALU / CUCalculation/logic vs control (traffic police)
RegisterCPU ke andar ki sabse fast memory (PC, IR, MAR, MDR, ACC)
CacheFrequently used data ki tez copy (L1/L2/L3)
RAM / ROMVolatile working memory vs non-volatile firmware memory
SRAM / DRAMFast costly cache vs dense cheap main memory
VolatilePower jaane par data gayab (RAM, cache)
Virtual memoryDisk ka hissa RAM ki tarah use karna (swap/page file)
HDD / SSDMagnetic slow-cheap vs flash fast-costly
OMR / OCR / MICRExam bubbles / text reading / cheque numbers
Impact printerHit karke print (dot matrix) โ€” carbon copy banti hai
Thermal printerHeat se print โ€” ATM/Swiggy receipts
Instruction cycleFetch โ†’ Decode โ†’ Execute โ†’ Store
RISC / CISCSimple fast instructions vs complex rich instructions
FLOPSFloating-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

Syllabus-based exam-style practice questions (not predictions) โ€” Unit 2:
  1. Classification of digital computers โ€” explain with examples. (10)
  2. Basic organization of computer / CPU ke parts explain karo. (10)
  3. Difference between RAM and ROM, SRAM and DRAM. (5)
  4. Memory hierarchy explain karo with diagram. (5)
  5. Difference between impact and non-impact printers. (5)
  6. OMR, OCR, MICR, Barcode โ€” difference + applications. (5)
  7. Explain the program execution process of a C program (compilerโ†’loader). (10)
  8. Microprocessor vs Microcontroller difference with applications. (5)
  9. Short notes: Mainframe vs Supercomputer, SSD vs HDD, Registers, Virtual memory, Touch screen. (5ร—2)
  10. Draw and explain memory hierarchy + storage units table (bitโ†’TB). (5)
  11. Explain the instruction cycle with the help of registers (PC, IR, MAR, MDR). (5)
  12. Parts of a motherboard / anatomy of a computer โ€” explain. (5)
  13. Explain input devices with categories and 2 examples each. (5)
  14. Explain monitor types (CRT/LCD/LED/OLED) in short. (5)
  15. 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)

#FunctionDetail + Example
1Process ManagementKaunsa program kab chalega, kitna CPU time milega, process create/stop/schedule karna. (Chrome ke 10 tabs, sabko CPU time milta hai)
2Memory ManagementRAM ka allocation/deallocation, virtual memory, kisi program ki memory doosre se protect karna. (Ek app crash ho to poora PC crash na ho)
3File ManagementFiles banana, kholna, copy/delete, folders, permissions (read/write).
4Device / I/O ManagementKeyboard, printer, mouse sab ke liye device drivers, spooling (printing queue), plug-and-play.
5Security & ProtectionPassword/login, file permissions, user accounts, firewall support.
6User InterfaceGUI (icons, mouse, windows) ya CLI (commands).
7Error Detection & Handling"Not responding" ki jagah error message dena, crash se bachana, log banana.
8Job Scheduling & AccountingKaunsa job pehle chalega (queues), kis user ne kitna resource use kiya (billing/log).
9Program ExecutionProgram ko memory me load karna, run karna, khatam hone par resources free karna.
10Communication / NetworkingDo 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).
StateMatlabReal-life
NewProcess ban raha haiApp icon tap kiya, load hona shuru
ReadyChalane ke liye tayyar, CPU ka waitQueue me laga app โ€” bas CPU khali hote hi chalega
RunningAbhi CPU par chal raha haiScreen par jo app active hai
Waiting / BlockedKisi I/O (file load, net, user input) ka waitApp "loading..." dikha raha hai
TerminatedKaam khatam, resources freeApp 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

TypeKya karta haiExample
Batch OSJobs ko batches me collect karke ek saath process karta hai, user interact nahi kar saktaPurane mainframe systems, payroll processing, bank statement generation
Time-sharing / Multi-userEk CPU, kai users; CPU time slices me divide hota hai, sabko turant response feel hota haiUnix, Linux servers, college ka multiuser lab
MultiprogrammingEk 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
MultitaskingEk user, kai tasks ek saath (time slicing)Windows 11, macOS โ€” song + typing + download
Multiprocessing / ParallelDo 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 criticalAirbag, rocket, ICU ventilator, robotics, VxWorks, FreeRTOS
Distributed OSKai computers ek system ki tarah kaam karte hain (network ke through)Google ka data centre, blockchain clusters
Embedded OSChhote device ke andar fixed kaam ke liye (resource-limited)Washing machine, smart TV, WiFi router, Arduino/Raspberry Pi
Mobile OSTouch UI, apps, battery-friendly, permissions modelAndroid, iOS, HarmonyOS
TypeKiska faydaNuksaan / limit
BatchSetup cost kam, bade volume ka kaam ek saath (throughput high)User ko dekh nahi sakta ki chal raha hai; error ka wait lamba; debugging mushkil; CPU idle (I/O me)
Time-sharingKai users ek machine par, interactive responseTime-slice overhead, ek user galat kare to doosron par bhi asar; server me performance tapering
MultiprogrammingCPU utilisation bahut improve (CPU idle nahi baithta)Memory me kai programs โ€” management complex; ek bug se system disturb
MultitaskingUser ek saath kai kaam โ€” productivityRAM/CPU load, ek heavy app poore system ko slow kar deta hai
MultiprocessingTrue parallel โ€” heavy kaam (video render, simulation) fastCostly hardware, software ko parallel support karna padta hai; coordination overhead
RTOSDesigned to meet defined deadlines; hard RTOS timing failures can be criticalDesign costly + complex, general apps nahi bhaage, hard testing
DistributedScalability + reliability (ek node gaya, kaam chalta rahe)Network failures, security, complexity bahut zyada
EmbeddedFixed kaam me sasta, ekdum reliable, kam bijliProgram badalna mushkil (firmware), resource bahut kam
MobileTouch-friendly, power-efficient, app ecosystem + permissionsBattery/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

TermMatlabExamples
System programsOS ke saath aate hain, system chalane/sambhalne ke liye. (OS khud + uske tools)File manager, command shell, device drivers, compiler, BIOS utilities
Application programsUser ke kisi kaam ke liye โ€” user apni zarurat se install karta haiMS Word, Tally, Photoshop, Instagram, games
UtilitiesSystem ki maintenance/optimisation ke chhote programsAntivirus, Disk Defragmenter, Disk Cleanup, Backup, WinRAR, Task Manager
BasisSystem softwareApplication software
Kaun chalata hai (machine)Machine-dependent (hardware ke hisaab se likha)Generally machine-independent (same app Windows/Mac me)
Kab installPre-installed (OS ke saath) ya hardware ke driver ke roop meUser ki zarurat par baad me
User ka interactionDirect use kam karta hai (background me kaam)Rozana direct use
Bina iskeComputer start hi nahi hogaComputer chalega par kaam nahi hoga
Update ka tareekaOS 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).
FeatureMatlabFayda
Multi-userEk hi system par kai users ek saath (har user ka apna account/home)College lab, servers โ€” cost per user bahut kam
MultitaskingKai processes ek saath (foreground + background)Server ek saath web + database + mail chala sakta hai
PortableCode chhote-bade badlav ke saath doosre hardware par chal jaataAaj Unix/Linux har chip (mobile se supercomputer) par hai
Hierarchical file systemTree structure โ€” root / se shuru, sab folder usi ke neecheOrganised storage, permissions easy
Security + permissionsHar file par owner/group/others ke read-write-execute rightsEk user doosre ka data nahi chhed sakta
Shell + scriptingCommand interpreter; commands ko script me likhkar automate karnaRozana ke admin kaam automatic โ€” scripting Unix ki superpower
Pipes aur redirectionEk 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.

CommandKaamExample
pwdPrint working directory (aap kahan ho)pwd โ†’ /home/ansh
lsFiles list karnals -l (details), ls -a (hidden bhi), ls -lh (human-readable size)
cdChange directory (folder change)cd notes, cd .. (ek folder peeche), cd ~ (home)
mkdirNaya folder bananamkdir bca, mkdir -p a/b/c (nested)
rmdirKhali folder deletermdir bca
catFile ka content dikhana / nayi file bananacat file.txt, cat > new.txt
cpCopycp a.txt b.txt, cp -r folder1 folder2 (folder copy)
mvMove / renamemv a.txt docs/, mv old.txt new.txt (rename)
rmDeleterm file.txt, rm -r folder (folder), rm -rf (force โ€” sambhal ke! โš ๏ธ)
touchKhali nayi file banana (ya timestamp update)touch test.c
manKisi command ki help/manualman ls (q dabakar bahar)
whoami / whoKaun user logged in hai / kaun-kaun haiwhoami
date / calDate-time / calendarcal 2026
chmodFile permission badalna (read=4, write=2, execute=1)chmod 755 script.sh
grepFile me text/pattern dhundhnagrep "BCA" students.txt, grep -i -n (case-insensitive, line numbers)
ps / killRunning processes dekhna / band karnaps -ef, kill 1234 (PID se), kill -9 1234 (force)
df / duDisk space check (free / used)df -h, du -sh folder
clearScreen saaf karnaclear
echoText print karna / file me likhnaecho "Hi" > a.txt (overwrite), echo "Bye" >> a.txt (append)
head / tailFile ki pehli / aakhri lineshead -5 marks.txt, tail -5 marks.txt
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)Sirf zaroori cheezein kernel me, baaki bahar (Minix, QNX, macOS ka XNU hybrid, seL4)
Fast (sab andar hi) par ek bug = poora system crashStable + secure (driver crash ho to sirf usi process ko asar) par message passing se thoda slow
Drivers bhi kernel ke andar โ€” naya driver = kernel rebuild/reloadDriver user space me โ€” crash ho to restart, bina poora OS hilaye
Size bada, debugging mushkil (sab kuch ek jagah)Kernel chhota (hazaaron lines), verifiable โ€” isliye safety-critical systems me
Example: purana Unix, Linux (mostly), Windows NT (hybrid)Example: QNX (BlackBerry), Minix 3, seL4, L4 family; hybrid me macOS
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)
TypeMatlabKab
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 loadLab computers, thin clients, corporate IT
Dual bootEk PC me do OS (Windows + Linux), startup pe choice screen (GRUB)Students/devs jo dono use karte hain
BasisBIOS (legacy)UEFI (modern)
InterfaceText, keyboard-only, purana lookGraphical, mouse support, settings easy
Disk supportMBR โ€” max 2 TB, 4 primary partitionsGPT โ€” 9 ZB tak, kai partitions, backup copy
SpeedSlow boot, ek-ek device checkFast boot, parallel initialisation
SecurityNahi (BOOT sector me virus ho sakta tha)Secure Boot (sirf signed OS boot ho), Fast Boot
ExamplesPurane 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 ๐Ÿ˜„.
ComponentKaamDevice example
NIC (Network Interface Card)Computer ko network se jodne wala adapter; har NIC ka unique MAC addressEthernet card, WiFi adapter
SwitchLAN ke andar devices ko jodta hai, MAC address dekh kar data sahi device ko bhejta haiLab ka 24-port switch
RouterDo alag networks jodta hai, IP ke hisaab se best path choose karta haiGhar ka WiFi router (JioFiber/Airtel)
Modem / ONTISP ki line (fiber/coax/phone) ke signal ko digital data me convert karta haiONT box, ADSL modem
Access PointWired network ko wireless (WiFi) banata haiCollege ka WiFi AP
Repeater / ExtenderSignal ko boost karke range badhata haiWiFi range extender
Cable / mediaWired connection ka rastaCat6 Ethernet, coaxial, optical fibre
TypeFull formRangeExample
PANPersonal Area Network~10 metrePhone + Bluetooth earbuds, smartwatch, hotspot to laptop
LANLocal Area NetworkEk building/campusCollege lab, ghar ka WiFi (fast, 100 Mbpsโ€“1 Gbps, apna malik)
MANMetropolitan Area NetworkEk shaharCable internet ek city me, bank branches ka network, metro ka network
WANWide Area NetworkDesh/duniyaInternet, railway reservation network (slow, public/leased lines)
BasisPANLANMANWAN
SpeedHighest local (Bluetooth ~2โ€“50 Mbps)Very high (100 Mbpsโ€“10 Gbps)High (fibre, Mbpsโ€“Gbps)Lower effective (line/latency par depend)
OwnershipPersonal device kaPrivate (school/company)Private + public mix (ISP/city)Public (ISPs, governments, telecoms)
CostSabse kam (built-in)Kam (ek switch + cables)Medium (fibre backbone)Bahut zyada (undersea cables, satellites)
SecurityPairing-based (physical proximity)Control apne haath me (firewall)ISP + org securityComplicated (encryption, VPN zaroori)
MediumKaisaSpeed / rangeKahan
Twisted pair (Cat5e/Cat6)Do insulated copper wire (twisted)100 Mbpsโ€“10 Gbps, ~100 m per segmentGhar/office LAN, RJ-45 plug
Coaxial cableCopper core + shieldMedium speed, longer runOld cable TV/internet, CCTV
Optical fibreGlass/silica strand, light se dataBahut fast (Gbpsโ€“Tbps), bahut lamba (km)ISP backbone, undersea cables, FTTH
Wireless (radio)WiFi/Bluetooth/4G-5G/microwaveConvenient, speed mediumโ€“highGhar WiFi, mobile data, point-to-point links
SatelliteUplinkโ€“downlink via satelliteSlow-medium speed, poor for gaming (latency high)Pahadi/remote areas, ships โ€” Starlink type
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 nahiEk central powerful server, baaki sab clients
Har computer apni file share kar sakta haiFiles/data server par centralised
Sasta, chhota network (2โ€“10 PCs), setup easyMehnga, bada network, setup me expert chahiye
Security kamzorSecurity/password control strong
Ek PC band = bas usi ka data gayaServer band = poora kaam ruk gaya (single point of failure)
Example: ghar me 2 laptop file sharing, Torrent/BitTorrentExample: 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.
TopologyStructureAdvantagesDisadvantages
BusEk main cable (backbone), sab uspe jude (T-connector)Sasta, cable kam, chhote network ke liye simpleMain cable cut = poora network down; fault dhundhna mushkil; slow when busy
StarSab devices ek central hub/switch se judeEk cable fail = bas wahi PC down; easy fault finding; easy expand. Aaj sabse commonHub/switch fail = poora network down; zyada cable
RingSab devices ek loop (circle) me, data ek direction me ghoomta haiData collision nahi, har device ko equal chanceEk node down = poora ring ruk sakta hai; add/remove hard
MeshHar device har device se jude (poora ya partial)Sabse reliable + secure; multi-path (ek link gaya to doosra)Bahut mehnga, wiring zyada
TreeStar networks ek backbone se jude (hierarchy)Bade campus me structured expansionRoot fail = bahut kuch down
HybridDo ya zyada topologies ka mixFlexible, real networks aise hi hote hainComplex + 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 / DeviceKaam / Matlab (simple Hinglish)
NodeNetwork se juda koi bhi device (PC, phone, printer)
HubSabse simple device โ€” jo aaya use sabko bhej deta hai (dumb device, collision hota hai). Purana. "Mic wala teacher jisko pura class sunta hai" ๐Ÿ˜„
SwitchHub 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
RouterDo 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
ModemDigital โ†” analog signal convert karta hai (line/cable pe data bhejne ke liye). Router me modem built-in hota hai aaj (JioFiber ONT)
GatewayDo 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
RepeaterSignal ko boost/refresh karta hai taaki door tak pahuche (range badhata hai)
BridgeDo LAN segment jodta hai (same type network)
Access Point (AP)WiFi signal deta hai โ€” wired network ko wireless banata hai
BandwidthData 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
ProtocolRules 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)
PacketData ko chhote tukdon me todkar bhejna โ€” har packet me sender + receiver ka address. (Chhote parcel jaise)
Web serverWo computer/software jo websites serve karta hai (Apache, Nginx, IIS). "Dukaan" jahan se aapko page milta hai
FirewallNetwork ka chowkidaar ๐Ÿš” โ€” unauthorised traffic block karta hai (Windows Defender Firewall)
IP AddressHar device ka unique network address (192.168.1.1) โ€” "ghar ka address"
MAC AddressNIC ka permanent hardware address (12 hex digits) โ€” "aadhaar card" of the device
Topology / Node / HostLayout / 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. ๐Ÿ“ฌ

Network calculation practice (solutions ke saath)

Formula yaad rakho: Bytes/s = (Mbps ร— 10โถ) รท 8. Simple shortcut: Mbps รท 8 = MB/s. Example: 100 Mbps โ†’ 12.5 MB/s.
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 speed1 GB file ka time
2 Mbps0.25 MB/s~68 minute
8 Mbps1 MB/s~17 minute
25 Mbps3.125 MB/s~5.5 minute
50 Mbps6.25 MB/s~2 min 44 s
100 Mbps12.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)

  1. College ke 60 computers ko ek switch se joda gaya hai โ€” kaunsi topology? (Star)
  2. Ek lab me 5 computers ek hi backbone cable par T-connector se jude hain โ€” kaunsi? (Bus)
  3. Bank ke 12 branches ko ek dusre se point-to-point lines se joda gaya โ€” kaunsi? (Mesh)
  4. University me 4 departments ke apne star networks ek central backbone se jude hain โ€” kaunsi? (Tree)
  5. Kaunsi topology me ek node fail hone par poora loop ruk sakta hai? (Ring)
  6. 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

ScenarioSahi OS typeKyun
ICU ka ventilator, jo 5 ms ke andar alarm bajaata haiRTOSDeadline miss hui to patient ki jaan khatre me โ€” deterministic timing zaroori
Bank ka raat ka interest calculation job (11 baje se 3 baje)Batch OSKoi user interact nahi karta; bada volume ek saath process
College lab ka server jahan 40 students ek saath login hote hainTime-sharing (multi-user)CPU time slices me baant ta hai, sabko response feel hota hai
Smart TV / washing machine ka control systemEmbedded OSFixed kaam, kam resource, bijli kam
Google ka data centre (hazaaron servers ek system jaise)Distributed OSKaam nodes me bant ta hai; ek node gaya to kaam chalta rahe
Android/iOS phoneMobile OSTouch UI, battery efficiency, app permissions
Gaming PC me do CPU sockets + Windows me song + download + gameMultiprocessing + multitaskingDo CPU parallel me + time slices se ek user ke kai tasks
Purana bank system: jobs punch cards me collect karke raat me processBatch OSClassic 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):
  1. OS ka main kaam? (a) Sirf printing (b) User aur hardware ke beech interface + resources manage (c) Sirf antivirus (d) Sirf internet
  2. RTOS ka example? (a) Payroll batch (b) Airbag system (c) Excel (d) Chrome
  3. 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
  4. Sabse common LAN topology? (a) Bus (b) Ring (c) Star (d) Mesh
  5. Hub aur switch me farak? (a) Hub smart (b) Switch MAC dekh kar bhejta hai (c) Dono same (d) Switch purana hai
  6. 100 Mbps par 1 GB file? (a) ~82 second (b) ~10 second (c) ~5 minute (d) ~2 second
  7. Microkernel ka fayda? (a) Speed hamesha zyada (b) Reliability/security โ€” driver crash se OS nahi girta (c) Sasta hardware (d) Koi nahi
  8. MAC address kitne bits ka hota hai? (a) 32 (b) 48 (c) 64 (d) 128
Answers: 1-(b) 2-(b) 3-(b) 4-(c) 5-(b) 6-(a) 7-(b) 8-(b: 48 bits = 12 hex digits).

Unit 3 โ€” key terms glossary

TermEk line me
KernelOS ka core jo hardware ke sabse kareeb hai
ShellUser aur kernel ke beech command interpreter (bash)
Process vs programChalta hua program (state + resources) vs disk par pada code
Context switchCPU ek process se doosre par jaana (state save/restore)
MultitaskingEk user ke kai tasks time-slicing se
RTOSReal-Time OS โ€” designed to meet timing deadlines (e.g., control systems); correctness includes timing
BootingOS ko memory me load karke machine start karna
POSTPower On Self Test โ€” BIOS ka hardware check
BIOS / UEFILegacy firmware (MBR, slow) vs modern (GPT, Secure Boot)
File permissionr=4, w=2, x=1 โ€” chmod 755 etc.
NodeNetwork se juda koi bhi device
Hub / Switch / RouterBroadcast / MAC-based smart forwarding / do networks jodna
ProtocolRules ka set (TCP/IP, HTTP, SMTP)
PacketData ka chhota tukda (sender + receiver address ke saath)
Bandwidth vs LatencyCapacity (Mbps) vs delay (ms)
TopologyNetwork 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

Syllabus-based exam-style practice questions (not predictions) โ€” Unit 3:
  1. What is an operating system? Functions explain karo (kisi bhi 8). (10)
  2. Classification of operating systems with examples. (10)
  3. Unix commands likho aur samjhao (koi 10). (5โ€“10)
  4. Microkernel based OS kya hai? Monolithic se difference. (5)
  5. Booting process explain karo. Cold boot vs warm boot. (5)
  6. Types of network (PAN/LAN/MAN/WAN) difference with examples. (5)
  7. Network topologies ke types โ€” advantages/disadvantages with diagram. (10)
  8. P2P vs Client-Server network. (5)
  9. Short notes: Hub vs Switch vs Router, Firewall, Protocol, Bandwidth, Packet, Web server. (5ร—2)
  10. What is a process? Explain process states with diagram. (5)
  11. BIOS vs UEFI โ€” difference in points. (5)
  12. Explain any 4 network devices with their working. (5)
  13. Write short notes on transmission media (twisted pair, coaxial, fibre). (5)
  14. 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)

BasisFile SystemDBMS
Data storageData alag-alag files me (flat files) rakha jata haiCentral database, tables me organised
Redundancy (duplication)Zyada โ€” same data kai files me repeatKam โ€” normalization se controlled
ConsistencyEk jagah update, doosri jagah purana = inconsistencyConsistency maintained (single source)
Data sharingMushkil, multi-user ke liye nahi banaEasy โ€” kai users ek saath, permissions ke saath
SecuritySirf file-level (poori file ka access)User-level + table/row/column level permissions
Query / searchManual program likhna padta hai har search ke liyeSQL se 1 line me query (SELECT * FROM ...)
Concurrency (ek saath)Do users ek hi file edit karein = data bigad sakta haiTransaction + locking se safe
Backup & recoveryManual, mushkilBuilt-in tools, auto-recovery (crash ke baad bhi data safe)
Data integrityKoi check nahi (galat age bhi chal jayegi)Constraints (CHECK, UNIQUE, FK) se rules lagte hain
Cost/ExampleSasta, chhote kaam ke liye (CSV, Excel file)Mehnga thoda, bade kaam ke liye (MySQL, Oracle)
Program-data independenceProgram me file ka structure hard-coded โ€” structure badla to program badlaSchema alag, programs alag (independence) โ€” structure badalna aasan
Access control granularityPoore file par ya kuch nahiRow/column level tak control (GRANT/REVOKE)

DBMS ke advantages & limitations

AdvantagesLimitations / kahan file system better hai
Data redundancy kam, consistency high; ek hi jagah updateCostly: license, hardware, DBA ki training
Data sharing + multi-user concurrency (locking/transactions)Complex โ€” design, tuning, migration ka kaam
SQL se fast query, reports, joinsChhote/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 safeDBMS 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)

ComponentKaamAndar kya aata hai
Query processorSQL query ko samajhkar plan banata hai aur execute karta haiParser (syntax check), optimiser (best plan chunna), executor
Storage managerDisk par data file/block level par sambhalta hai โ€” read/write efficient banata haiBuffer manager (RAM me pages), file manager, index + B-tree
Transaction managerTransactions (COMMIT/ROLLBACK), locking aur recovery sambhalta haiConcurrency control, logging, recovery manager
Data dictionary (metadata)Tables, columns, types, constraints, users ki info rakhta hai โ€” apne aap updateSystem catalog โ€” DBMS ka "naksha"
User interfaces + APICLI (mysql prompt), GUI (phpMyAdmin), aur programming APIs (JDBC/ODBC)Aapka client app yahi se baat karta hai
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)

DomainKya store hota haiReal example
BankingAccounts, transactions, loans, ATM records, KYCAapka balance galat nahi hota โ€” do updates (debit+credit) ek transaction me
Railway / Airline reservationSeats, PNR, timings, fare, waitlistDouble booking nahi hona โ€” DBMS ka locking aur transaction ka catch
EducationAdmission, attendance, results, fees, hostelCollege ka ERP; result declaration ek query se
E-commerceProducts, orders, payments, delivery tracking, reviewsFlipkart/Amazon inventory live update
HospitalPatients, appointments, prescriptions, lab reports, billingPatient history ek search me โ€” zaroori treatment ke liye
Social mediaUsers, posts, likes, chats, followersCrores of records, but "feed" milliseconds me banta hai (NoSQL + cache)
Telecom & GovernmentCall records, Aadhaar, PAN, tax, voter list, censusCrore-scale data, high security
Library, Payroll, Inventory, Insurance, Credit cardsBooks/borrowers, salary, stock, policies, transactionsClassic textbook examples โ€” har ek me tables + reports

Database Users (kaun-kaun use karta hai)

UserKaamExample
End user (naive/parametric)App/ATM/website se daily data entry-query karta hai โ€” database ka structure nahi jaantaBank clerk, receptionist, aap (UPI app se)
Application programmerApps banata hai jo database se baat karti hain (Java/Python + SQL)ERP ka developer, mobile app team
Sophisticated userComplex 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, recoveryCollege ka DBA, bank ka database team
System analyst / DesignerRequirement samajh kar database ka structure (schema) design karta haiProject 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).

CategoryFull formKaamCommands
DDLData Definition LanguageTable/database ka structure banana ya badalnaCREATE, ALTER, DROP, TRUNCATE, RENAME
DMLData Manipulation LanguageData (rows) ke saath kaam โ€” insert/update/delete/selectINSERT, UPDATE, DELETE, SELECT
DCLData Control LanguageAccess/permission controlGRANT, REVOKE
TCLTransaction Control LanguageTransaction save/undo karnaCOMMIT, ROLLBACK, SAVEPOINT
DQLData Query Language (kuch books me)Data fetch karnaSELECT
CommandCategoryEk line meDanger level
CREATE TABLEDDLNayi table + columns + constraints banata haiSafe (galat design future me pareshani)
ALTER TABLEDDLColumn add/modify/drop ya constraint changeMedium (badi table par slow ho sakta hai)
TRUNCATE TABLEDDLSaari rows ek jhatke me delete, structure rahegaHigh (rollback normally nahi)
DROP TABLEDDLTable hi delete โ€” structure + data donoSabse high โš ๏ธ
INSERT / UPDATE / DELETEDMLRows add / badlo / hatao (WHERE ke saath)Medium (transaction se safe)
SELECTDQL/DMLData padho (kuch bhi nahi badalta)Zero โ€” sirf padhna
GRANT / REVOKEDCLPermission do / chhinoHigh (galat GRANT = security hole)
COMMIT / ROLLBACK / SAVEPOINTTCLTransaction pakka karo / cancel karo / beech ka pointMedium
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 ๐Ÿ“ฆ

4.4 Data Types in SQL

CategoryTypeKaamExample
NumericINT, SMALLINT, BIGINT, DECIMAL(p,s), FLOAT, NUMERICNumbers, marks, fees, IDs; p = total digits, s = decimal ke baadmarks INT, fees DECIMAL(8,2)
Character / StringCHAR(n) (fixed), VARCHAR(n) (variable), TEXTNaam, address, email; VARCHAR me sirf jitna data utni jagahname VARCHAR(50), roll_no CHAR(8)
Date & TimeDATE, TIME, DATETIME, TIMESTAMP, YEARDOB, admission date, order time; TIMESTAMP ka use audit ke liyedob DATE, created_at TIMESTAMP
Binary / OtherBOOLEAN, BLOB, ENUM, JSONTrue/false, images/files (BLOB), fixed choices, semi-structured datais_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);
ConstraintKaamReal-life example
PRIMARY KEYHar row ki unique identity, NULL nahi ho sakta, ek hi per tableAadhaar/Roll number โ€” duplicate nahi
FOREIGN KEYDo tables ko jodna; jo value doosri table me ho wahi allowedstudent.course_id sirf course table me existing ho
UNIQUEValue repeat nahi ho sakti (par NULL ho sakta hai)Email, mobile number
NOT NULLYe column khali nahi chhod sakteName compulsory hai
CHECKCondition laganaage >= 17, marks 0โ€“100, gender 'M'/'F'
DEFAULTValue na do to ye apne aap lag jaayegacity DEFAULT 'Kichha', status DEFAULT 'pending'

Keys in SQL (short-note practice)

KeyMatlabExample
Super keyKoi bhi column(s) ka set jo row ko uniquely identify kareroll_no, email, (roll_no+name) โ€” sab super keys
Candidate keyMinimal super key โ€” isse chhota karne par uniqueness jaati hairoll_no, email (dono candidate keys)
Primary keyChuna hua ek candidate key โ€” table ka main identity, NULL nahiroll_no PRIMARY KEY
Alternate keyBaaki bache candidate keys (primary ke alawa)email UNIQUE
Foreign keyDoosri table ki primary key ka reference โ€” relationship banata haistudent.course_id โ†’ course.course_id
Composite keyDo ya zyada columns mil kar primary keyattendance: (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_nonameemailagecitymarkscourse_id
1Anshansh@mail.com19Kichha78101
2Priyapriya@mail.com20Haldwani85102
3Rahulrahul@mail.com18Kichha65101
4Nehaneha@mail.com21Rudrapur91103
5Amanaman@mail.com19Kichha55102
course table
course_idcourse_namefees
101BCA25000
102BBA22000
103BCom18000
-- 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';
namecity
AnshKichha
AmanKichha
(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)
574.89155
(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;
cityCOUNT(*)
Kichha3
Haldwani1
Rudrapur1
(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;
namecourse_namefees
AnshBCA25000
PriyaBBA22000
RahulBCA25000
NehaBCom18000
AmanBBA22000
(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)
CommandKaamExample
GRANTUser ko permission dena (SELECT/INSERT/UPDATE/DELETE/ALL)Accountant ko sirf SELECT par GRANT
REVOKEDi hui permission wapas lenaEmployee chhoda โ†’ REVOKE ALL
COMMITTransaction ke saare changes permanent kar denaPayment success par COMMIT
ROLLBACKTransaction ke changes undo kar denaError/exception par ROLLBACK
SAVEPOINTTransaction ke beech me ek point โ€” us tak partial rollbackLong transaction me safe points

ACID properties โ€” explain each property with a transaction example

PropertyMatlabBank transfer example
AtomicityTransaction 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
ConsistencyTransaction ke baad database valid state me hamesha (constraints tute nahi)Total paisa pehle bhi 8,000 tha, baad me bhi 8,000
IsolationDo transactions ek saath chalein to bhi ek doosre ko disturb na kareinEk hi account se do jagah withdrawal โ€” locking serialise kar deti hai
DurabilityCOMMIT ke baad data safe โ€” bijli gayi, system crash hua, data zinda rahegaCommit 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

QueryErrorKyun
INSERT INTO student VALUES (1, 'Ravi', 'ravi@mail.com', 19, 'Kichha', 70, 101);Duplicate entry '1' for key 'PRIMARY'roll_no 1 pehle se hai โ€” PRIMARY KEY unique hona chahiye
INSERT INTO student VALUES (6, 'Ravi', 'ansh@mail.com', 19, 'Kichha', 70, 101);Duplicate entry 'ansh@mail.com' for key 'email'UNIQUE constraint โ€” email repeat nahi ho sakta
INSERT INTO student VALUES (6, NULL, 'r@mail.com', 19, 'Kichha', 70, 101);Column 'name' cannot be nullNOT NULL constraint
INSERT INTO student VALUES (6, 'Ravi', 'r@mail.com', 15, 'Kichha', 70, 101);CHECK constraint 'age>=17' is violatedage 17 se kam nahi ho sakti
INSERT INTO student VALUES (6, 'Ravi', 'r@mail.com', 19, 'Kichha', 150, 101);CHECK constraint 'marks BETWEEN 0 AND 100' violatedmarks 100 se zyada nahi
INSERT INTO student VALUES (6, 'Ravi', 'r@mail.com', 19, 'Kichha', 70, 999);Cannot add or update a child row: a foreign key constraint failscourse_id 999 course table me exist nahi karta
DELETE FROM course WHERE course_id = 101;Cannot delete or update a parent row: foreign key failsstudent 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):
  1. DDL command kaun hai? (a) INSERT (b) CREATE (c) GRANT (d) COMMIT
  2. Table ki saari rows fast delete, structure rahe? (a) DELETE (b) TRUNCATE (c) DROP (d) ALTER
  3. Do tables jodne wali query? (a) GROUP BY (b) JOIN (c) HAVING (d) ORDER BY
  4. Group par filter lagane ke liye? (a) WHERE (b) HAVING (c) ORDER BY (d) LIMIT
  5. ACID ka "A"? (a) Atomicity (b) Availability (c) Access (d) Array
  6. Transaction cancel karne ke liye? (a) COMMIT (b) ROLLBACK (c) GRANT (d) DROP
  7. FOREIGN KEY ka kaam? (a) Duplicate rokna (b) Do tables ke beech relationship + valid reference (c) Sorting (d) Backup
  8. NULL ko check karne ka sahi tarika? (a) = NULL (b) IS NULL (c) == NULL (d) IN NULL
Answers: 1-(b) 2-(b) 3-(b) 4-(b) 5-(a) 6-(b) 7-(b) 8-(b).

Unit 4 โ€” key terms glossary

TermEk line me
DatabaseOrganised collection of related data
DBMSSoftware jo database create/manage/secure/query karta hai
RDBMSRelational DBMS โ€” tables (rows + columns) me data (MySQL, Oracle)
SchemaDatabase/table ka structure (columns, types, constraints)
Tuple / AttributeRow (record) / column (field)
Primary keyRow ki unique identity, NULL nahi
Foreign keyDo tables ke beech link โ€” valid reference
ConstraintDatabase-level rule (PK, FK, UNIQUE, NOT NULL, CHECK, DEFAULT)
DDL / DML / DCL / TCLStructure / data / permissions / transaction commands
QuerySQL statement jo data maangta ya badalta hai
Aggregate functionCOUNT, SUM, AVG, MIN, MAX โ€” groups par kaam
JOINDo tables ko common column se jodna
TransactionOperations ka group โ€” all-or-nothing
ACIDAtomicity, Consistency, Isolation, Durability
RedundancySame data kai jagah โ€” DBMS ise kam karta hai
DBADatabase administrator โ€” design, backup, security, performance

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

Syllabus-based exam-style practice questions (not predictions) โ€” Unit 4:
  1. File system vs DBMS (koi 10 points). (10)
  2. What is DBMS? Advantages aur limitations likho. (5โ€“10)
  3. Database ke users kaun-kaun hote hain? DBA ki responsibilities likho. (5)
  4. SQL ke 4/5 sub-languages + commands ka table banao. (5)
  5. Difference between DELETE, TRUNCATE and DROP. (5)
  6. Write SQL: table banana (constraints ke saath), 3 rows insert, ek SELECT with WHERE, ek UPDATE. (10)
  7. Constraints kya hain? Koi 5 explain karo with example. (5โ€“10)
  8. Primary key vs unique key; candidate key vs primary key. (5)
  9. GROUP BY vs HAVING; WHERE vs HAVING. (5)
  10. Explain aggregate functions with examples (COUNT, SUM, AVG, MIN, MAX). (5)
  11. GRANT/REVOKE kis liye? Example likho. (5)
  12. Transaction kya hai? ACID properties explain karo. (5โ€“10)
  13. JOIN kya hai? Do tables ka example dekar join query likho. (5)
  14. 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.
YearDevelopmentKyun important hai
1969ARPANET (4 universities ke beech pehla packet-switched network)Internet ki neev โ€” "packet switching" idea
1974/1983TCP/IP protocol suite (Vint Cerf & Bob Kahn); 1983 me ARPANET ne ise apnayaAaj ka internet TCP/IP par hi chalta hai โ€” isliye "internet ka protocol" bolte hain
1989โ€“91World Wide Web (Tim Berners-Lee, CERN) โ€” HTML + HTTP + URLInternet ko aam aadmi ke liye usable banaya (pages + links)
1995India me internet (VSNL) โ€” public internet service shuruIndia ka digital safar shuru
2016Jio ka data revolution โ€” sasta 4G sabke liyeBharat me ~95 crore internet users (duniya me sabse bada me se ek), UPI/online class har kasbe me
2020s5G, fiber (FTTH), IoT, cloud, AI servicesInternet 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

Internet Applications & Services

ServiceKaamExample
WWW (World Wide Web)Web pages ka system (Tim Berners-Lee, 1989โ€“91)Safari/Chrome me websites
E-mailElectronic-mail โ€” messages + attachmentsGmail, Outlook (SMTP/POP3/IMAP protocol)
Search EnginesInformation dhundhna (index + ranking)Google, Bing, Yahoo
Social MediaConnect + share (posts, reels, stories)Instagram, WhatsApp, X, Facebook, LinkedIn
E-commerceOnline kharidna-bechana, payments, delivery trackingAmazon, Flipkart, Meesho, Zomato
E-banking / UPIOnline payment, banking, balance checkNEFT, IMPS, PhonePe, Paytm, Google Pay
Cloud storageFiles internet par store + syncGoogle Drive, iCloud, Dropbox
Video conferencingLive video meetingsZoom, Google Meet
StreamingOnline video/music (on-demand)YouTube, Netflix, Spotify
FTP / File sharingFiles transferWeTransfer, Google Drive link, SFTP
Chatting & VoIPMessage + voice/video calls over internetWhatsApp call, JioCall, Telegram
E-learning / e-governanceOnline padhai + sarkari servicesSWAYAM, DigiLocker, UMANG, Aadhaar
Blog/Vlog, Forums, News portalsContent publish aur discussionMedium, Quora, Reddit, Dainik Jagran
IoT / smart devicesSensors/devices ka internet se data exchangeSmart AC, CCTV, fitness band, smart farming
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

BasisLogical Address (IP Address)Physical Address (MAC Address)
Kya haiSoftware wala address, network layer (Layer 3) kaHardware wala address, NIC chip par likha hua, data-link layer (Layer 2)
Kaun deta haiNetwork admin ya DHCP serverManufacturer (factory me fixed)
Badal sakta hai?Haan โ€” network badla to IP badal jaata haiNahi โ€” permanent (mostly)
FormatIPv4: 4 numbers (192.168.1.1) โ€ข IPv6: 8 groups hex12 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 useRouter internet pe aapko dhundhta hai (device kahan hai is network me)Same LAN ke andar device ko identify karta hai (switch use karta hai)
StructureIPv4 = 32-bit (network + host parts, classes Aโ€“E / CIDR), IPv6 = 128-bit6 bytes = 3 bytes OUI (manufacturer) + 3 bytes device serial
IPv4IPv6
32-bit, ~4.3 billion addresses (khatam ho rahe the)128-bit, almost unlimited (340 undecillion)
Format: 192.168.1.1 (dotted decimal)Format: 2001:0db8:85a3::8a2e:0370:7334 (colon hex)
NAT se kai devices ek public IP share karte hainHar device ko apna address possible โ€” NAT ki zaroorat kam
Header simple, options limitedHeader 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 typeKaise chalta haiSpeedAaj ka status
Dial-up (purana)Phone line par modem ka beep-da-da-dee; call ke time net band56 kbpsKhatam โ€” sirf history/exam ke liye
DSL / BroadbandTelephone line par high-frequency data (phone + net ek saath)1โ€“100 MbpsPurane areas me chal raha
Cable internetCable TV wali coaxial line par data10โ€“500 MbpsLocal operators ke paas common
Fibre (FTTH)Ghar tak optical fibre โ€” light se data100 Mbps โ€“ 1 Gbps+Aaj ka best โ€” JioFiber/Airtel Xstream
Wireless (4G/5G hotspot)Mobile network ka data โ€” SIM/dongle/router4G 10โ€“100 Mbps, 5G 100 Mbps+Sabse tez-growing; pahadi/gaon me main option
SatelliteSatellite uplink/downlink (VSAT/Starlink type)10โ€“200 Mbps (latency high)Remote areas, ships, disaster relief
Leased lineDedicated 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 typeKaamExample
Recursive resolverAapki 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 serverTLD 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 serverUs domain ka asli record (website owner ka DNS)surajmaluniversity.ac.in ka nameserver

Domain name ke parts (example: www.bca.surajmaluniversity.ac.in)

PartNaamMeaning
.inTLD (Top Level Domain)Country code (India)
.acSecond-levelAcademic institution
surajmaluniversityRegistered nameOrganisation ka naam
www / bcaSubdomain / HostWebsite / 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

RoleKaamExample
Web client (browser)Request bhejta hai, response ko render karta haiChrome, Firefox, mobile inbuilt browser
Web serverRequest accept karta hai, files/DB se data lekar response bhejta haiApache, Nginx, IIS (software); Google ke servers (hardware)
Database + application serverDynamic content banata hai (user ka data + business logic)PHP/Java/Python app + MySQL
DNSDomain ka IP batata haiResolver 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
BasisStatic web pageDynamic web page
ContentFixed โ€” file me jo likha hai wahi har user koHar request par database/input se banta hai
Banane meSirf HTML/CSS (hosting easy, sasta)Server-side code (PHP/Python/Node) + database
ExampleCollege ka "About Us" page, portfolioAmazon cart, Gmail inbox, Instagram feed, ERP marks
Speed / loadBahut fast, load kamServer par load zyada, but personalised
UpdateHar change par file dobara edit/publishAdmin 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 / featureKaam
Address bar (omnibox)URL type karna; search bhi yahin se (Chrome me search + URL dono)
TabsEk hi window me kai pages โ€” har tab alag process (Chrome me) taaki ek crash sabko na le doobe
BookmarksPasandida pages save
Back/forward/reload, homeNavigation โ€” history stack me aage-peeche
HistoryPichhle dinon ke visits
Extensions/add-onsExtra features (ad-blocker, Grammarly, PDF tools)
Developer tools (F12)HTML/CSS/JS inspect, network requests, console โ€” developers aur students ke liye zaroori
Cookies & cache managerLogin session aur speed ke liye data store karna
Security featuresHTTPS warning, phishing/malware warning, popup blocker, private/incognito mode
Rendering engineHTML/CSS ko pixels me badalna (Chrome: Blink, Firefox: Gecko, Safari: WebKit)
JavaScript engineJS code chalana (Chrome: V8) โ€” button click, animations, form validation
BrowserSearch engine
Software jo page kholta aur dikhata haiService jo internet par information dhundhti hai (index + ranking)
Example: Chrome, Firefox, Edge, SafariExample: 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

BasisHTTPHTTPS
Full formHyperText Transfer ProtocolHyperText Transfer Protocol Secure
SecurityData plain text me jata hai (koi padh sakta hai)Data encrypted (SSL/TLS certificate se)
Port80443
Padlock ๐Ÿ”’ in browserNahi ("Not Secure" likha aata hai)Haan โ€” address bar me tala dikhta hai
Kisliye useSimple 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
MethodKaamExample
GETData lena / page kholna (URL me parameters dikh jaate hain โ€” bookmark ho sakta hai)Google search, page load
POSTForm data bhejna (URL me nahi dikhta โ€” safe-ish for data)Login, signup, fee payment form
PUTPoora record update/replaceProfile update
PATCHPartial update (kuch fields)Sirf phone number badalna
DELETERecord deleteAccount/posting delete
HEADSirf headers (body nahi) โ€” file exists/size checkDownload link check
Status codeClassMatlabExample
2002xx SuccessSab theek, page mil gayaPage load OK
301 / 3023xx RedirectPage doosri jagah shift (permanent/temporary)Purana college URL naye site par
4004xx Client errorRequest me galat inputGalat form data
401 / 4034xxUnauthorised (login needed) / Forbidden (permission nahi)Bina login dashboard kholna
4044xxNot Found โ€” page exist nahi kartaTypo URL ๐Ÿ˜…
500 / 5035xx Server errorServer me problem / busySite down, exam portal overload
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)
PointDetail
URL vs DomainDomain = 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 URNURI = koi bhi resource identifier (sabse bada), URL = location batata hai, URN = sirf naam (jaise ISBN: urn:isbn:9788131757851) โ€” URI ka ek type.
Percent-encodingURL me sirf limited characters allowed hain โ€” space = %20, Hindi/emoji bhi encode hote hain (isliye kabhi URL me %20 dikhta hai).
Query vs FragmentQuery 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>
CategoryTagsKaam
Structure<html>, <head>, <body>, <title>Page ka dhancha
Text<h1>โ€“<h6>, <p>, <br>, <b>, <i>, <u>, <strong>, <em>Heading, paragraph, break, bold/italic/underline (strong/em = meaning wala bold/italic)
Links & media<a>, <img>, <audio>, <video>Hyperlink, images, media
Lists<ul>, <ol>, <li>Bullet / number wali list
Tables<table>, <tr>, <th>, <td>, <caption>Marksheet, timetable
Forms<form>, <input>, <select>, <textarea>, <button>Login form, admission form (input types: text, password, email, number, date, radio, checkbox, file, submit)
Semantic (HTML5)<header>, <nav>, <section>, <article>, <footer>, <main>, <aside>Matlab wale tags โ€” SEO + accessibility me helpful (div se behtar)
Others<div>, <span>, <iframe>, <meta>Layout boxes, embedding, meta info
HTML (purana)HTML5
Video/audio ke liye Flash/plugins chahiye the<video>, <audio> tags built-in (plugin-free)
Structure ke liye sirf div + classSemantic tags: header, nav, section, article, footer
Mobile/touch ke liye khaas support nahiViewport meta + responsive API โ€” mobile-first
Offline storage nahi (cookies chhote)localStorage/sessionStorage, offline app cache (PWA)
Graphics sirf images se<canvas> + SVG se drawing/animations
Form validation ke liye JavaScript likhna padtarequired, type="email", pattern โ€” browser khud validate
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>
ConceptMatlabExample
SelectorKis element pe style lagani haih1, .class, #id, * (sab), a:hover
Property + ValueKya badalna hai aur kaisecolor: red;, font-size: 20px;
CSS ke 3 tarikeInline (tag ke andar), Internal (<style> head me), External (.css file โ€” best practice)<link rel="stylesheet" href="style.css">
Box modelContent โ†’ padding โ†’ border โ†’ marginHar element ek dabba hai ๐Ÿ“ฆ
Classes vs IDClass = kai elements pe, ID = ek unique element pe.card kai jagah, #main sirf ek
Text propertiescolor, font-family, font-size, font-weight, text-align, line-heighttext-align: center;
Background & borderbackground-color/image, border, border-radius, box-shadowborder-radius: 12px; (rounded cards โ€” jaise ye notes file ๐Ÿ˜Ž)
Spacing & layoutmargin, padding, width, display (block/inline/flex/grid), positiondisplay: flex; se row/column layout aasan
Responsive (media query)Screen size ke hisaab se style badalna โ€” mobile-friendly@media (max-width: 600px) { ... }
Cascade & priorityInline (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
TarikaKahan likha jaata haiFaydaNuksaan
Inline CSSTag ke style="" attribute meTurant, sirf usi element parRepeat karna padta hai, HTML ganda, maintain karna mushkil
Internal CSS<style> block head meEk hi page ke saare elements ko controlSirf usi page par kaam karta hai; multi-page site me repeat
External CSSAlag .css file + <link>Best practice โ€” poori site ek file se, browser cache karta hai (fast), maintain easyEk 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)

SituationAnswerKyun
Aap URL me typo kar dete ho โ€” "gogle.com"DNS fail / 404 type errorNaam resolve nahi hota (DNS error) ya galat path par 404
Bank site kholte ho, address bar me tala dikhta haiHTTPS (port 443) kaam kar raha haiTLS certificate verify hua, data encrypted
Login form ka data bhejna hai โ€” GET ya POST?POSTPassword URL me nahi dikhta (GET me query string me aa jaata)
Form submit karne ke baad page dobara load huaServer ne 302 redirect bheja"Post/Redirect/Get" pattern โ€” refresh par double submit nahi hota
Exam portal par "503 Service Unavailable"Server overloaded/down5xx = server-side problem (hazaaron students ek saath login)
Site ka page khulta hai par images/CDN blankKuch resources fail (404 / network)F12 โ†’ Network tab me har request ka status dikhta hai
Baar-baar login karna pad raha haiCookies block/delete ho gayiSession cookie ke bina server pehchanta nahi
Purana page dikh raha hai, naya design nahiBrowser cacheCtrl+F5 se hard refresh โ€” cache bypass
Unit 5 MCQs (answers neeche):
  1. Internet ka protocol? (a) HTTP (b) TCP/IP (c) FTP (d) SMTP
  2. MAC address kitne bits? (a) 32 (b) 48 (c) 128 (d) 64
  3. HTTPS ka port? (a) 80 (b) 443 (c) 21 (d) 25
  4. DNS ka kaam? (a) File transfer (b) Naam โ†’ IP (c) Email (d) Printing
  5. 404 ka matlab? (a) Server error (b) Not found (c) Success (d) Redirect
  6. HTML ka kaam? (a) Design (b) Structure (c) Behaviour (d) Database
  7. CSS me class selector? (a) #box (b) .box (c) box (d) *box
  8. Sabse fast internet connection type? (a) Dial-up (b) DSL (c) Fibre (d) Satellite
Answers: 1-(b) 2-(b) 3-(b) 4-(b) 5-(b) 6-(b) 7-(b) 8-(c).

CSS practice set (solutions ke saath)

Q1. Heading ko purple + center karo
h1 { color: #6d28d9; text-align: center; }

Q2. Ek "card" class banao: white background, rounded corners, shadow, padding
.card { background:#fff; border-radius:12px; box-shadow:0 2px 8px rgba(0,0,0,.1);
        padding:16px; margin:12px 0; }

Q3. Link par hover effect (mouse le jaane par colour badle)
a:hover { color: red; text-decoration: underline; }

Q4. Do classes: "pass" green, "fail" red (result page ke liye)
.pass { color:#059669; font-weight:bold; }
.fail { color:#dc2626; font-weight:bold; }
Use: <span class="pass">Pass</span> / <span class="fail">Fail</span>

Q5. Box model ka hisaab: width:200px; padding:10px; border:2px solid; margin:8px;
Total visible width = 200 + 10 + 10 + 2 + 2 = 224 px
Layout me jagah     = 224 + 8 + 8 = 240 px โœ”
(Aur box-sizing: border-box; lagane par width 200 hi rehti hai โ€” padding/border andar count.)

Q6. Mobile-friendly (responsive) banane ke liye
@media (max-width: 600px) {
  .card { padding: 10px; font-size: 15px; }
  nav a { display: block; }   /* nav links ek ke neeche ek */
}
TaskKaunsa selectorKyun
Saare paragraphs ka font badalnap (tag selector)Sabhi p elements par ek saath
Sirf "card" waale boxes design karna.card (class)Class kai elements par lag sakti hai
Page ka main heading special banana#main-title (id)ID unique hota hai โ€” sirf ek element par
Heading aur paragraph dono ka margin set karnah1, p (group)Ek hi rule kai selectors par
Mouse le jaane par button ka rang badalnabutton:hover (pseudo-class)Interaction-based style
Exam me CSS ka answer aise likho: definition (1 line: "cascading = last/most specific rule jeetta hai") โ†’ syntax โ†’ 3 tarike (inline/internal/external + best = external) โ†’ selectors table โ†’ box model (contentโ†’paddingโ†’borderโ†’margin ka diagram/calc) โ†’ ek example. Ye 6 hisse = 10 marks. ๐ŸŽจ

Unit 5 โ€” key terms glossary

TermEk line me
InternetGlobal network of networks (TCP/IP)
WWWWeb pages ka system (Tim Berners-Lee, 1989)
ISPInternet Service Provider โ€” connection deta hai
IP addressLogical address (IPv4 32-bit / IPv6 128-bit), badal sakta hai
MAC addressPhysical hardware address (48-bit, NIC par fixed)
DNSNaam โ†’ IP translation (phone directory)
TLDTop-Level Domain (.com, .in, .org)
HTTP / HTTPSWeb protocol (port 80) vs secure encrypted (port 443)
URLResource ka poora address: protocol://domain:port/path?query#fragment
Web serverSoftware/hardware jo pages serve karta hai (Apache, Nginx)
Cookie / CacheLogin/preferences yaad rakhna vs files ki local copy (speed)
Status code200 OK, 301 redirect, 404 not found, 500 server error
HTMLMarkup language โ€” page ka structure
HTML5Modern version โ€” audio/video, semantic tags, canvas, offline storage
CSSStyle sheets โ€” design (colours, fonts, layout), box model
JavaScriptBehaviour โ€” interactivity (button click, validation, animations)
๐Ÿ“Œ 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)

QA (ek line me)
Data aur information me ek shabd ka farak?Processing โ€” data raw hai, information processed
GIGO ka full form?Garbage In, Garbage Out
Computer ka "baap"?Charles Babbage
First programmer (female)?Ada Lovelace
Stored program concept kis machine se?EDVAC (von Neumann)
5th generation ka main technology?ULSI + AI / parallel processing
CPU ke 3 parts?ALU, CU, Registers
Agla instruction ka address kis register me?PC (Program Counter)
1 KB = kitne bytes?1024 bytes (2ยนโฐ)
Cache ke 3 levels?L1, L2, L3
BIOS kis memory me hota hai?ROM (firmware)
Exam ki OMR sheet padhne wala device?OMR (Optical Mark Reader)
ATM receipt wala printer?Thermal printer
Fetch-Decode-Execute ke baad ka step?Store (writeback)
Microcontroller ka ek example?8051 / Arduino (ATmega328P) / ESP32
OS ke 3 functions?Process, Memory, File management (PM-FID-SUE-C)
chmod 755 ka matlab?Owner rwx, group r-x, others r-x
Airbag kis type ka OS use karta hai?RTOS
Boot ke steps ka pehla hardware test?POST (Power On Self Test)
Sabse common LAN topology?Star (central switch)
100 Mbps ka actual download speed?12.5 MB/s (8 se divide)
DBMS ke 2 examples?MySQL, Oracle (ya PostgreSQL, MongoDB)
Row ki unique identity?Primary key (NULL nahi)
ACID ka "D"?Durability โ€” COMMIT ke baad data permanent
Internet ka protocol suite?TCP/IP
DNS ka kaam?Domain name โ†’ IP address
HTTPS ka port?443 (HTTP 80)
404 ka matlab?Page not found (client error)
HTML vs CSS vs JS?Structure vs design vs behaviour
HTML5 ka ek semantic tag?<header> / <nav> / <section> / <article> / <footer>

Diagram practice list (in sab ko ek baar haath se banao)

  1. Basic organization of computer (5 units + buses) + von Neumann diagram
  2. Memory hierarchy (registers โ†’ cache โ†’ RAM โ†’ secondary โ†’ cloud)
  3. Generations timeline (V-TIM-A wala flow)
  4. Instruction cycle (fetchโ†’decodeโ†’executeโ†’store ka loop)
  5. C program ka build flow (preprocessโ†’compileโ†’assembleโ†’linkโ†’loadโ†’run)
  6. Booting steps ka sequence
  7. Network topologies (bus, star, ring, mesh โ€” chhote diagrams)
  8. OSI-free version: data ka safar (client โ†’ DNS โ†’ server โ†’ response)
  9. URL ke parts ka labelled diagram
  10. 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.QuestionMarksUnit
1Define data and information; difference with examples.51
2Convert: (a) 156โ‚โ‚€ โ†’ binary (b) 11010110โ‚‚ โ†’ octal (c) A3Fโ‚โ‚† โ†’ binary (d) โˆ’20 ka 8-bit 2's complement.61
3Explain the generations of computers with technology and examples.101
4Explain the basic organization of a digital computer with diagram; von Neumann bottleneck kya hai?101โ€“2
5Difference between RAM and ROM; SRAM and DRAM.52
6Explain the program execution process of a C program (preprocessor โ†’ loader).102
7What is an operating system? Koi 8 functions explain karo.103
8Unix me file permission kaise kaam karti hai? chmod 755 ka matlab likho + koi 6 commands examples ke saath.63
9Network topologies ke 4 types โ€” diagram + advantages/disadvantages.83
10Difference between file system and DBMS (koi 6 points).54
11SQL likho: (a) CREATE TABLE with constraints (b) 3 rows insert (c) SELECT with WHERE + ORDER BY (d) ek JOIN query.104
12Transaction aur ACID properties example ke saath.54
13Difference between HTTP and HTTPS; common methods + 4 status codes likho.55
14DNS kya hai? Resolution process explain karo.65
15HTML5 ke features + 5 tags ka example program; CSS ke 3 tarike.105

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

Syllabus-based exam-style practice questions (not predictions) โ€” Unit 5:
  1. Internet kya hai? Iske features aur services explain karo. (10)
  2. Difference between logical address and physical address (IP vs MAC). (5)
  3. What is ISP? Types of internet connections. (5)
  4. DNS kya hai? Iska working process explain karo. (5โ€“10)
  5. Difference between HTTP and HTTPS. (5)
  6. URL kya hai? Iske parts diagram ke saath samjhao. (5)
  7. HTML kya hai? HTML5 ke features + 5 tags ka example program likho. (10)
  8. CSS kya hai? Iske 3 tarike (inline/internal/external) example ke saath. (5โ€“10)
  9. Short notes: Web browser, WWW vs Internet, Static vs Dynamic webpage, IPv4 vs IPv6. (5ร—2)
  10. Explain the request-response cycle of a web page. (5)
  11. What is a web server? Client-server model of the web explain karo. (5)
  12. HTTP methods aur status codes ke naam likho (2 examples each). (5)
  13. Cookies aur cache me difference; browser me dev tools ka use. (5)
  14. Domain name ke parts (subdomain, TLD) example ke saath samjhao. (5)
  15. 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! ๐Ÿ’ช