NCERT Class XI Computer Science Prelims Notes (Ch 1-11)
Chapter 1: Computer System
A computer system is an electronic device that can be programmed to input data, process it, and generate output. It comprises hardware plus software.
Core components (block diagram components): Central Processing Unit (CPU), memory, input/output devices, and storage devices. Data/instructions flow through these components.
Form factors vary from high-end servers to desktops, laptops, tablets, and smartphones.
CPU (the “brain” of the computer)- Executes instructions and processes data.
Implemented on one or more integrated circuits (ICs).
Components:
Arithmetic Logic Unit (ALU): performs arithmetic and logic operations.
Control Unit (CU): coordinates data flow and instruction sequencing.
Registers: small, fast storage inside the CPU for data/instructions during processing.
Input devices: keyboard, mouse, scanner, touch screen; data is converted to digital form and stored temporarily in RAM; voice input is possible (e.g., voice search).
Output devices: display, printer, speaker, projector; convert digital data to human-understandable form. Braille displays are available for the visually impaired.
Evolution of computers (summary timeline):- Abacus, analytical engines, punched cards, vacuum tubes, transistors, integrated circuits (ICs), microprocessors, GUI, PCs, WWW, mobile devices, wearables, IoT.
Moore’s Law (concept): number of transistors on a chip doubles roughly every two years, enabling exponential growth in processing power. Expression: \text{Transistors} \ \rightarrow \text{doubling every 2 years}
Memory hierarchy and devices- Memory types: primary (RAM/ROM) and secondary storage (HDD/SSD, optical, flash).
RAM: volatile, used for temporary storage while CPU operates.
ROM: non-volatile, stores firmware and essential startup routines.
Cache: very fast memory between CPU and main memory to speed up data access for frequently used data.
Secondary memory is non-volatile and larger but slower; data must be loaded into main memory for CPU access.
Data transfer between memory and CPU- Buses: system bus comprises data bus (bidirectional), address bus (unidirectional), and control bus (unidirectional).
Memory controller manages data transfer to/from memory.
Data/address/control signals govern how the CPU reads/writes data in memory.
Memory types (in more detail):- Primary memory: RAM (volatile) and ROM (non-volatile).
Cache memory: serves CPU with faster access to frequently used data.
Secondary memory: HDD/SSD, optical drives, memory cards; used to store data permanently.
Microprocessors vs microcontrollers- Microprocessor: CPU on a single chip; requires external peripherals.
Microcontroller: CPU + RAM/ROM and peripherals on a single chip; used for dedicated tasks (e.g., home appliances, embedded devices).
Data and information- Data: raw facts/instructions; information: processed data that has meaning.
Types of data (data representation concepts):
Structured data: organized in rows/columns; easy to sort and query (e.g., attendance tables).
Unstructured data: not organized in predefined formats (e.g., images, audio, video, text).
Semi-structured data: contains tags/markers but no rigid structure (e.g., emails, HTML, CSV).
Data capture, storage, retrieval- Data capturing: collecting data from various sources (barcodes, sensors, online posts).
Data storage: storing data in files/databases; data servers in large organizations.
Data retrieval: efficient search and access from storage.
Data deletion and recovery: deletion often marks space as free; recovery is possible if deleted blocks haven't been overwritten. Data protection requires access controls and encryption.
Software (overview)- Software enables hardware to function; cannot operate hardware directly.
Classifications:
System software: OS, device drivers, system utilities.
Programming tools: editors, translators (compilers, interpreters, assemblers), IDEs.
Application software: general-purpose or customized software for user tasks (e.g., word processors, web browsers).
Freeware vs Free and Open Source Software (FOSS) vs Proprietary:
Freeware: free to use, may be restricted.
FOSS (e.g., Linux, Python, LibreOffice): source code is available; users can study, modify, and share.
Proprietary: source code is closed; licenses govern usage.
Operating System (OS)- OS is a resource manager: manages hardware resources (CPU, memory, I/O devices) and provides services to applications and device drivers.
User interfaces (types): command-based, Graphical User Interface (GUI), touch-based, voice-based, gesture-based.
Core OS services: process management, memory management, file management, device management.
OS functions (summary)- Process management: scheduling and allocation of CPU time to processes.
Memory management: allocate/free main memory to processes; ensure efficient utilization.
File management: handle creation, update, deletion, protection of files on secondary storage.
Device management: manage I/O devices and their drivers; provide security controls.
Course summaries and exam-style ideas- Distinguish between data/information, RAM/ROM, primary/secondary memory, and different data types.
Explain the role of the system bus and why the data bus is bidirectional while address/control buses are unidirectional.
Compare microprocessors and microcontrollers with examples.
Chapter 2: Encoding Schemes and Number System
Encoding and decoding concepts- Encoding maps characters to codes so computers can process text.
Common encoding schemes: ASCII, ISCII, Unicode.
Unicode provides a unique code point for every character, enabling global language support; commonly used encodings: UTF-8, UTF-16, UTF-32. Unicode is a superset of ASCII (0–128).
ASCII (American Standard Code for Information Interchange)- 7-bit ASCII originally; 128 character set.
Example value-to-character mapping: 65 -> 'A', 68 -> 'D', etc.
Conversion example: the word DATA to ASCII sequence: D=68, A=65, T=84, A=65.
ISCII (Indian Script Code for Information Interchange)- 8-bit code for Indian languages; retains ASCII 0–127 and uses 128–255 for Indian scripts; supports aksharas.
UNICODE- A universal character set to encode characters from all languages; encodings include UTF-8, UTF-16, UTF-32.
Unicode code points map to characters; the same character has consistent code points across platforms.
Number systems- Decimal (base 10): digits 0–9; positional value with base 10: \text{Value} = \sum{i} d{i} \times 10^i for integer part and negative powers for fractional part.
Binary (base 2): digits 0 and 1; used inside ICs; \text{Value} = \sum{i} b{i} \times 2^i.
Octal (base 8): digits 0–7; groups of 3 bits represent octal digits (since 2^3=8).
Hexadecimal (base 16): digits 0–9 and A–F; groups of 4 bits represent a hex digit (since 2^4=16).
Conversions among bases- Decimal to Binary/Octal/Hex: repeated division by base; remainders form the digits in reverse order.
Binary to Decimal: sum of powers of 2 for each 1-bit.
Decimal to Octal/Hex and vice versa via similar repeated division or by grouping bits (for binary \leftrightarrow octal/hex).
Fractional part conversions: multiply fractional part by target base; take integer part as next digit; repeat until fraction becomes 0 or for a limited number of steps.
Applications of number systems- Memory addressing in computer systems: addresses often shown in hexadecimal.
Color codes in web design: RGB colors use 24-bit color values typically shown in hex.
Summary points- Encoding converts characters to codes; text representation is stored in binary.
ASCII/ISCII/Unicode are encodings; Unicode is the most comprehensive standard.
Decimal/binary/octal/hex are number systems; conversions rely on base-10 math or binary grouping.
For computer data representation, grouping bits (3 for octal, 4 for hex) simplifies readability.
Chapter 3: Emerging Trends
AI (Artificial Intelligence)- Aims to simulate human cognitive functions such as learning, decision making, and problem solving.
Applications include maps routing, automated recognition in photos, digital assistants (Siri, Google Now, Cortana, Alexa).
Machine Learning (ML): subset of AI using data to learn models; training data and testing data; model accuracy improves with more data.
NLP (Natural Language Processing): interaction with humans using natural language; capabilities include text-to-speech, speech-to-text, machine translation.
Immersive experiences- VR and AR technologies create immersive experiences; VR creates a computer-generated environment; AR overlays digital information on the real world.
Applications in gaming, training (driving simulators, medical procedures), engineering, education.
Robotics- Robots are programmable machines with sensors; include wheeled/legged robots, manipulators, humanoids.
Applications across industry, medicine, research, and disaster response (e.g., drones).
Big Data- Data volumes are enormous, generated at high velocity, in various formats (structured, semi-structured, unstructured).
Five V’s: Volume, Velocity, Variety, Veracity, Value.
Data analytics (e.g., Python’s Pandas) enables deriving insights from large datasets.
Internet of Things (IoT)- Network of devices with embedded hardware/software capable of data exchange.
WoT (Web of Things) envisions connecting devices via the web for unified control interfaces.
Sensors (accelerometers, gyroscopes) enable contextual data gathering; smart cities use IoT for resource management.
Cloud computing- On-demand access to remote computing resources (software, hardware, storage) via the Internet.
Service models: IaaS (infrastructure), PaaS (platform), SaaS (software).
MeghRaj (GI Cloud) initiative in India to enable cloud services.
Grid computing- Distributed, heterogeneous resources connected to form a virtual supercomputer; two types: data grid and processor grid; middleware (e.g., Globus toolkit) enables distributed computation.
Blockchains- Decentralized, append-only ledger shared among multiple nodes; data stored in blocks linked in a chain; security via distributed consensus.
Applications include digital currencies, transparent governance, healthcare data sharing, land registries, and more.
Ethical, philosophical, and practical implications- Data privacy, security, cybersecurity; responsible use of AI; digital literacy; governance and policy implications for emerging tech.
Reflection prompts and activities (e.g., exploring IoT devices, WoT, and smart-city concepts).
Chapter 4: Introduction to Problem Solving
Problem solving with computers requires precise problem definition, a plan (algorithm), and implementation (coding).
Steps for solving problems with a computer (as per the book)- Analysing the problem: identify inputs, outputs, and constraints.
Developing an algorithm: a step-by-step plan to solve the problem; multiple algorithms possible; select best one.
Coding: implement the algorithm in a programming language; document the code.
Testing and debugging: verify output across various inputs; fix defects; follow software testing methodologies (unit, integration, system, acceptance).
Maintenance: fix issues and adapt to new requirements.
Algorithms- Definition: a finite sequence of precise steps with a clear beginning and end that solves a problem.
Characteristics: precision, uniqueness, finiteness, input, output.
Flow of algorithms can be represented via flowcharts or pseudocode.
Flowchart notation (basic shapes)- Start/End (terminator)
Process (action)
Decision (branch, yes/no)
Input/Output (data)
Arrows show flow direction.
Pseudocode- A human-readable description of the steps using keywords like INPUT, OUTPUT, IF/ELSE, WHILE, FOR, etc.
Representation choices and examples- Example: Square of a number using an algorithm; flowchart and pseudocode demonstrate steps.
Decomposition (divide-and-conquer)- Break a complex problem into smaller subproblems; solve independently; compose final solution.
Summary takeaways and practice prompts- Understand inputs/outputs, select an appropriate algorithm, verify correctness via dry runs, and study time/space complexity trade-offs.
Chapter 5: Getting Started with Python
What is Python?- High-level, interpreted, easy-to-read language with a rich standard library.
Features include: open source, portable across platforms, indentation-based blocks, dynamic typing, and a large ecosystem of libraries.
Getting started with Python- Interactive mode (REPL) vs Script mode (writing .py files and running them).
Prompt: >>>; can run statements one-by-one or execute scripts via a file.
Python keywords and identifiers- Keywords are reserved words with special meaning; identifiers are names for variables/functions, etc.
Variables, data types, and objects- Everything in Python is an object; variables reference objects by id().
Basic data types: int, float, complex, bool, str, list, tuple, set, dict, None.
Mutable vs immutable: lists/sets/dicts are mutable; tuples/strings/ints are immutable.
Data types in depth- Numbers: int, float, complex; booleans are a subtype of int.
Strings: immutable sequences of characters; indexing and slicing supported; plays with concatenation, repetition, etc.
Lists: mutable sequences; dynamic size; rich set of methods (append, extend, insert, remove, pop, etc.).
Tuples: immutable sequences; can be nested; support concatenation and repetition to form new tuples.
Sets: unordered collections of unique elements.
Dictionaries: key-value mappings; mutable; keys must be immutable; values can be mutable.
Operators and expressions- Arithmetic, relational, logical, assignment, bitwise (not covered in depth here), precedence rules.
Precedence table (high to low): exponentiation, unary +/-, multiplication/division/modulus/floordiv, addition/subtraction, comparisons, assignment, identity, membership, logical not, and, or.
Examples illustrate operator precedence and parentheses can alter it.
Input/output and type conversion- input() reads strings; conversion to numeric types can be done with int(), float(), etc.
print() outputs to screen; can combine multiple items with comma separators or string concatenation with + (requires type compatibility).
Explicit vs implicit type conversion (type casting vs coercion).
Python programming constructs- Variables and assignment; basic I/O; comments with #; everything is an object; dynamic typing.
Data types and their mutability; how objects are referenced via id(); how identity relates to object mutability.
Python programming basics: programs and examples- Simple programs for arithmetic, area/perimeter, etc.; sample code segments illustrate printing, input, casting, and formatting.
Python libraries and modules- Built-in functions (e.g., abs, divmod, max, min, pow, sum, len).
Importing modules: import module, or from module import name.
Standard library modules include math, random, statistics; using from module import function to minimize memory usage.
Docstrings and writing modules: code documentation and creating reusable modules.
Programming with Python: best practices- Use meaningful variable names; keep code readable and well-documented; use functions to modularize tasks; handle exceptions and input validation where appropriate.
Chapter 6: Flow of Control
Flow of control describes the order of execution of statements in a program.
Key concepts- Sequence: statements are executed in the order written.
Selection (decision making): use if, if-elif-else to choose among alternatives based on conditions.
Indentation: Python uses indentation to define blocks; consistent indentation is required.
Repetition (loops): for and while loops execute a block multiple times according to a condition.
Break: exits the innermost loop immediately.
Continue: skips the rest of the current loop iteration and proceeds to the next iteration.
Nested loops: loops inside loops; Python supports arbitrary nesting.
Examples and patterns- If-else example for eligibility: age >= 18
ightarrow eligible to vote; else not eligible.Nested conditionals and multi-way branching with elif.
For loops: iterating over ranges or sequences; range(start, stop, step).
While loops: continue until a condition becomes false; importance of an exit condition to avoid infinite loops.
Break/continue in practical examples (e.g., finding a limit or skipping specific iterations).
Nested loops example: printing patterns, matrices, or nested iteration results.
Practical notes- Always ensure loops have a definite termination condition.
Indentation is critical for defining blocks in Python.
Chapter 7: Functions
What is a function?- A named block of code designed to perform a specific task; can be invoked (called) from different parts of a program.
Functions promote modularity, reusability, readability, and easier debugging.
Creating and calling functions- Function header: def function_name(parameters):
Function body: indented code block; return value via return statement (optional).
Functions may have no arguments, or multiple arguments; they may or may not return a value.
Arguments and parameters- Parameter: variable in function definition.
Argument: value passed to a function during a call.
Functions can return multiple values (e.g., via tuples).
Global vs local scope- Global variables: defined outside functions; accessible everywhere after their declaration.
Local variables: defined inside a function; exist only during function execution.
The global keyword can be used inside a function to refer to a global variable.
Python standard library and modules- Built-in functions: available without import (e.g., abs, len, max, min, sum).
Modules: Python code grouped as modules; can be imported via import module; access via module.function().
from module import name: imports specific names; no module prefix required.
Example: import math; math.sqrt(4) vs from math import sqrt; sqrt(4).
Functions with return values and multiple returns- A function can return a value (or a tuple of values) using return.
If no return is specified, function returns None.
Documentation and style- Docstrings: triple-quoted strings at the start of a module/function describing its purpose.
Documentation tips