Circle of Learning Logo CIRCLE OF LEARNING Excellence in Education
CBSE Class 11 · Computer Science 9 Chapters Session 2026-27

Class 11 Computer Science Python & Architecture Cheat Sheet (CBSE 2026-27)

Complete chapter-wise syntax guide, algorithm formulas, and architecture cheat sheet for CBSE Class 11 Computer Science (NCERT 2026-27). Number system conversions, Boolean logic, Python data structures, and cyber safety.

Jump to Chapter:

Key Principles

  • Computer Organization: Functional units: CPU (ALU + CU + Registers), Memory unit (Primary: RAM, ROM; Secondary: HDD, SSD), and Input/Output devices connected via System Bus.
  • Memory Hierarchy & Speed: Registers (fastest, smallest) -> Cache Memory -> Primary RAM -> Solid State Drive (SSD) -> Hard Disk (HDD).
  • Data Storage Units: 1 Bit = Binary 0 or 1; 1 Nibble = 4 Bits; 1 Byte = 8 Bits; 1 KB = 1024 Bytes; 1 MB = 1024 KB; 1 GB = 1024 MB; 1 TB = 1024 GB; 1 PB = 1024 TB.
  • Number Systems: Decimal (Base 10: 0-9); Binary (Base 2: 0-1); Octal (Base 8: 0-7); Hexadecimal (Base 16: 0-9, A-F where A=10, B=11, C=12, D=13, E=14, F=15).
  • Conversions: Decimal to Any Base (Successive division by target base and collecting remainders bottom-up); Any Base to Decimal (Sum of products of digits and powers of base).
  • Character Encoding Schemes: ASCII (7-bit: 128 characters; 8-bit: 256 characters; 'A' = 65, 'a' = 97, '0' = 48); ISCII (Indian Script Code for Information Interchange, 8-bit); Unicode (UTF-8, UTF-16, UTF-32, universal multi-language standard).
# Topic Formula Conditions & Meaning
1 Computer Memory Units Power-of-Two Progression 1 Byte = 8 Bits; 1 KB = 2¹⁰ Bytes = 1,024 Bytes; 1 MB = 2²⁰ Bytes; 1 GB = 2³⁰ Bytes; 1 TB = 2⁴⁰ Bytes Computers use binary addressing where every higher metric prefix represents an exponential multiple of 1,024 (2¹⁰) bytes.
2 Positional Number System Weight Expansion Value = d_n * B^n + d_(n-1) * B^(n-1) + ... + d_1 * B¹ + d_0 * B⁰ + d_(-1) * B^(-1) + ... Universal polynomial formula to calculate the decimal equivalent of any number in base B (e.g. Binary B=2, Octal B=8, Hexadecimal B=16).
3 Binary to Octal & Hexadecimal Grouping Rule Binary to Octal = Group 3 bits from right; Binary to Hexadecimal = Group 4 bits from right Enables instant conversion between binary and higher power-of-two bases without converting through decimal.
4 ASCII Key Numeric Code Offsets 'A'-'Z' = 65 to 90; 'a'-'z' = 97 to 122; '0'-'9' = 48 to 57; Offset 'a' - 'A' = 32 In ASCII encoding, adding 32 to an uppercase character's decimal value yields its lowercase counterpart.
5 Hexadecimal Symbolic Value Mapping A = 10, B = 11, C = 12, D = 13, E = 14, F = 15 Used extensively in computing to represent memory addresses, byte values, and RGB color hex codes (e.g. #FFFFFF).

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • Boolean Logic: Binary mathematical algebra developed by George Boole dealing with propositions that have only two possible truth values: True (1) or False (0).
  • Primary Boolean Operators: NOT (Inversion / Complementation: ~A or A'); AND (Conjunction / Logical Multiplication: A . B); OR (Disjunction / Logical Addition: A + B).
  • Universal Gates: NAND and NOR are universal gates because ANY Boolean circuit or logic gate (AND, OR, NOT) can be constructed exclusively using only NAND or only NOR gates.
  • Special Logic Gates: XOR (Exclusive-OR: output 1 when inputs are different: A ⊕ B = A'B + AB'); XNOR (Exclusive-NOR / Equivalence: output 1 when inputs are identical: A ⊙ B = AB + A'B').
  • Postulates & Theorems: Annulment (A . 0 = 0, A + 1 = 1); Identity (A . 1 = A, A + 0 = A); Idempotent (A . A = A, A + A = A); Complementarity (A . A' = 0, A + A' = 1); Involution ((A')' = A).
  • De Morgan's Laws: 1. (A + B)' = A' . B' (The complement of an OR is the AND of the complements); 2. (A . B)' = A' + B' (The complement of an AND is the OR of the complements).
  • Duality Principle: Any valid Boolean equation remains valid if AND and OR operators are interchanged (. <-> +) and 0 and 1 identity elements are interchanged (0 <-> 1).
# Topic Formula Conditions & Meaning
1 De Morgan's First Law (NOR to AND-Invert) NOT (A OR B) = (NOT A) AND (NOT B) The complement of a logical sum equals the logical product of the individual complements.
2 De Morgan's Second Law (NAND to OR-Invert) NOT (A AND B) = (NOT A) OR (NOT B) The complement of a logical product equals the logical sum of the individual complements.
3 XOR (Exclusive-OR) Logic Equation A XOR B = A'B + AB' High (1) only when an odd number of inputs are true; fundamental circuit element in binary adders (Half-Adder).
4 XNOR (Equivalence) Logic Equation A XNOR B = AB + A'B' High (1) only when both inputs are identical (both 0 or both 1); acts as a binary bit comparator.
5 Boolean Distributive Laws 1. A . (B + C) = (A . B) + (A . C); 2. A + (B . C) = (A + B) . (A + C) Notice the second distributive law (OR distributes over AND), which does not exist in conventional algebra.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • Features of Python: High-level, interpreted, dynamically typed, case-sensitive, object-oriented language created by Guido van Rossum (1991).
  • Tokens (Lexical Units): Smallest individual unit in a Python program. Five types: 1. Keywords; 2. Identifiers; 3. Literals; 4. Operators; 5. Punctuators / Delimiters.
  • Keywords: Reserved words having special meaning (e.g. False, None, True, and, as, assert, break, class, def, if, import, in, is, lambda, pass, return). Note: True, False, and None start with capital letters.
  • Identifier Rules: Can be a combination of letters, digits, and underscore (_); must NOT start with a digit; cannot be a keyword; no special characters allowed (e.g. $, @, -); case-sensitive (Total != total).
  • Data Types in Python: Numbers (int, float, complex: a + bj), Boolean (True, False), NoneType, Sequence (str, list, tuple), Mapping (dict), Sets (set).
  • Mutable vs Immutable: Immutable (value cannot be changed in-place; creates new object): int, float, bool, str, tuple. Mutable (value can be modified in-place): list, dict, set.
  • Operators in Python: Arithmetic (+, -, *, / float division, // floor division, % modulus, ** exponentiation); Relational (==, !=, >, <, >=, <=); Logical (and, or, not); Bitwise (&, |, ^, ~, <<, >>); Assignment (=, +=, etc.); Identity (is, is not); Membership (in, not in).
  • Type Casting: Implicit Type Conversion (Python automatically coerces narrower type into wider type, e.g. int + float -> float); Explicit Type Conversion (User forces type conversion using constructors: int(), float(), str(), list(), tuple()).
# Topic Formula Conditions & Meaning
1 Python Division Operator Disparity Float Division (/) yields float: 7 / 2 = 3.5; Floor Division (//) yields floor integer: 7 // 2 = 3, -7 // 2 = -4 In Python, // rounds down to the nearest lesser integer, which is why -7 // 2 evaluates to -4, not -3.
2 Python Modulus Operator Rule Modulus Equation: a % b = a - (b * (a // b)) Yields the remainder; with negative operands, sign matches the divisor (e.g. -7 % 2 = 1 because -7 - (2 * -4) = 1).
3 Operator Precedence Hierarchy () -> ** -> +x, -x, ~x -> *, /, //, % -> +, - -> <<, >> -> & -> ^ -> | -> ==, !=, >, < -> not -> and -> or PEMDAS-style order of operations; exponentiation (**) binds right-to-left (e.g. 2 ** 3 ** 2 = 2 ** 9 = 512).
4 Exponentiation Right-Associative Rule a ** b ** c = a ** (b ** c) Unlike all other binary arithmetic operators that evaluate left-to-right, exponentiation associates right-to-left.
5 Identity vs Equality Operators a == b checks value equality; a is b checks memory address identity (id(a) == id(b)) Two distinct objects can have identical values (== is True), but reside at different memory addresses (is is False).

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • Types of Control Statements: Sequential (default top-to-bottom); Selection / Decision (conditional: if, if-else, if-elif-else); Iteration / Repetition (loops: for, while).
  • Indentation: Python uses indentation (standard 4 spaces) instead of curly braces {} to define code blocks. Inconsistent indentation raises an IndentationError.
  • Conditional Statements: if condition:; if condition: ... else:; if condition1: ... elif condition2: ... else:. Conditions evaluate to True or False.
  • The range() Function: Generates a sequence of integers: range(stop) (from 0 up to stop-1); range(start, stop) (from start up to stop-1); range(start, stop, step) (increments by step, can be negative for reverse counting).
  • The while Loop: Condition-controlled loop; continues executing the code block as long as the condition remains True; loop variable must be initialized before and updated inside the loop to prevent infinite loops.
  • The for Loop: Count-controlled or sequence-traversing loop; iterates over items of any sequence (string, list, tuple, range).
  • Loop Jump Statements: break (terminates loop immediately and transfers control to statement following the loop); continue (skips the remainder of the current iteration and jumps to the next iteration); pass (null statement, does nothing, used as placeholder).
  • Loop else Clause: Both for and while loops can have an optional else block. The else block executes ONLY when the loop terminates normally (exhausts range or condition becomes false), NOT when terminated by a break statement.
# Topic Formula Conditions & Meaning
1 The range() Function Mathematical Sequence range(start, stop, step) generates: start, start+step, start+2*step, ... up to (stop - 1) End bound is strictly exclusive; step defaults to 1 if omitted; negative step decrements down towards stop + 1.
2 Number of Iterations Formula for range() Iterations = max(0, ceil((stop - start) / step)) Calculates the exact total number of loop executions produced by a given range(start, stop, step) statement.
3 Loop Else Clause Execution Condition Loop Else Runs <=> Loop Exits Naturally (No break encountered) Useful for search algorithms to execute code when an element is NOT found in the collection.
4 Break vs Continue Control Flow Action break -> Exit Loop Completely; continue -> Skip to Next Iteration break halts the entire loop immediately, while continue bypasses remaining lines in current pass and restarts.
5 Nested Loop Total Iterations Total Iterations = Outer Loop Iterations (M) * Inner Loop Iterations (N) For every single cycle of the outer loop, the inner loop executes through its entire sequence of iterations.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • String Definition: An immutable sequence of Unicode characters enclosed within single, double, or triple quotes.
  • Two-Way Indexing: Positive / Forward Indexing: 0 to len-1 (from left to right); Negative / Backward Indexing: -1 to -len (from right to left).
  • String Immutability: Elements of a string cannot be modified or replaced in-place. s[0] = 'X' raises a TypeError.
  • String Slicing: str[start : stop : step] extracts substring from start up to stop - 1 stepping by step. Omitting start defaults to 0; omitting stop defaults to length. Reversing a string: s[::-1].
  • String Operators: Concatenation (+); Repetition (*); Membership (in, not in); Comparison (==, <, >, etc. based on lexicographical ASCII/Unicode values).
  • Built-in String Methods: .len(), .lower(), .upper(), .title(), .capitalize(), .count(sub), .find(sub) (returns index or -1), .index(sub) (returns index or raises ValueError), .endswith(s), .startswith(s), .strip(), .lstrip(), .rstrip(), .replace(old, new), .split(sep), sep.join(list).
  • Character Testing Methods: .isalnum() (alphanumeric), .isalpha() (alphabetic only), .isdigit() (digits only), .islower(), .isupper(), .isspace().
# Topic Formula Conditions & Meaning
1 String Slicing Indexing Parameter Formula s[start : stop : step] extracts characters at indices: start, start+step, ... < stop Universal sequence slicing mechanism in Python; handles both positive and negative indexing gracefully.
2 String Reversal Idiom Formula Reversed String = s[::-1] Standard idiomatic Python construct for reversing strings or checking for palindromes (s == s[::-1]).
3 Two-Way Dual Indexing Relationship Negative Index = Positive Index - len(s) For any string of length L, the first character has index 0 and -L, while the last character has index L-1 and -1.
4 String Length & Index Boundaries Valid Positive Indices: 0 <= index <= len(s) - 1; Out of bounds access raises IndexError Direct index access past boundaries triggers an IndexError, though slicing beyond boundaries handles truncation without error.
5 Lexicographical Comparison Order 'A' < 'B' < 'Z' < 'a' < 'b' < 'z' (Based on Unicode / ASCII values) String comparisons compare character by character using ordinal Unicode values from left to right.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • List Definition: An ordered, mutable, heterogeneous sequence of elements enclosed in square brackets ([...]).
  • List Mutability: Unlike strings and tuples, lists are mutable. Individual items can be modified, replaced, added, or deleted in-place: lst[0] = 99.
  • Indexing & Slicing: Supports two-way indexing (0 to n-1 and -1 to -n) and slicing lst[start : stop : step]. Modifying slices: lst[1:3] = [10, 20] replaces multiple elements in-place.
  • List Operations: Concatenation (+ combines lists); Repetition (* replicates elements); Membership (in, not in); Traversal (for item in lst:).
  • Adding Elements: .append(x) (adds single element x at the end); .extend(iterable) (appends all elements of iterable to the end); .insert(i, x) (inserts element x at index i).
  • Removing Elements: .pop() (removes and returns last element); .pop(i) (removes and returns element at index i); .remove(x) (removes first occurrence of value x; raises ValueError if not found); .clear() (removes all elements); del lst[i] (deletes item or slice).
  • Built-in List Methods: len(L), L.count(x), L.index(x), L.sort() (sorts in-place, returns None), L.sort(reverse=True), sorted(L) (returns new sorted list, leaves original unchanged), L.reverse() (reverses in-place), min(L), max(L), sum(L).
  • Aliasing vs Cloning: L2 = L1 creates an alias (both variables reference the same list object). L2 = L1.copy() or L2 = L1[:] creates a shallow copy (independent list object).
# Topic Formula Conditions & Meaning
1 List Append vs Extend Behavior L.append([1, 2]) adds nested list: len increases by 1; L.extend([1, 2]) adds elements: len increases by 2 .append() adds its argument as a single object, while .extend() iterates over the collection and adds each element individually.
2 Aliasing vs Shallow Copy Identity Aliasing: b = a -> id(a) == id(b); Shallow Copy: b = a[:] -> id(a) != id(b) Modifying an aliased list changes both variables; modifying a cloned slice leaves the original list unaffected.
3 In-Place Sort vs Global sorted() L.sort() mutates L in-place and returns None; sorted(L) leaves L unchanged and returns new list Common bug: assigning L = L.sort() overwrites L with None!
4 List Pop vs Remove Distinction L.pop(index) removes by position and returns value; L.remove(value) removes by search value and returns None .pop() works with index positions (defaults to last element); .remove() searches for matching values.
5 Linear Search Algorithm Complexity Comparisons in List: Best Case = 1 (First item); Worst Case = N (Last item or absent); Average = N / 2 Standard search algorithm across unsorted lists; time taken grows linearly with list length.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • Tuples Definition: An ordered, immutable sequence of elements enclosed in parentheses ((...)). Single element tuple requires a trailing comma: t = (5,) (without comma, (5) is an integer).
  • Tuple Operations: Indexing, Slicing, Concatenation (+), Repetition (*), Membership (in, not in). Immutability: elements cannot be added, removed, or modified once created.
  • Tuple Packing & Unpacking: Packing: t = 10, 20, 30 packs values into a tuple. Unpacking: a, b, c = t extracts elements into variables (number of variables must exactly match tuple length).
  • Tuple Methods: t.count(x) (number of occurrences of x); t.index(x) (index of first occurrence of x); Built-in functions: len(t), min(t), max(t), sum(t), sorted(t) (returns a sorted list).
  • Dictionary Definition: An unordered (ordered insertion from Python 3.7+), mutable collection of key-value pairs enclosed in curly braces ({key: value}).
  • Dictionary Key Rules: 1. Keys must be unique (duplicate keys overwrite earlier values); 2. Keys must be of an IMMUTABLE data type (string, number, tuple); lists cannot be keys!
  • Accessing & Modifying Dictionaries: Access by key: d[key] (raises KeyError if absent); Safe access: d.get(key, default) (returns default or None if absent); Adding/updating: d[key] = value; Deleting: del d[key], d.pop(key) (returns value and removes key).
  • Dictionary Methods: d.keys() (view of all keys), d.values() (view of all values), d.items() (view of (key, value) tuples), d.update(d2) (merges d2 into d), d.clear() (empties dictionary).
# Topic Formula Conditions & Meaning
1 Single-Element Tuple Comma Requirement t = (5,) is a tuple; t = (5) is an integer Parentheses without a trailing comma are treated as standard mathematical grouping operators.
2 Tuple Packing and Unpacking Equivalence Packing: t = a, b, c; Unpacking: x, y, z = t (Length must match exactly: 3 == 3) Elegant Python mechanism used for parallel variable assignment and swapping variables (a, b = b, a).
3 Dictionary Key Hashability Invariant Valid Key <=> Immutable & Hashable (Strings, Numbers, Tuples; NOT Lists or Dicts) Dictionaries use hash tables for O(1) average lookup; mutable objects cannot produce permanent hash values.
4 Dictionary Lookup Time Complexity d[key] Lookup: Average Case = O(1) Constant Time (Hash Table Mapping) Accessing values by key in a dictionary is dramatically faster than linear searching through lists.
5 Dictionary Safe Retrieval via get() d.get(k, default) returns d[k] if k in d, else returns default (Prevents KeyError) Standard defensive programming method to query dictionaries without risking runtime KeyErrors.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • What is a Module: A Python file (.py) containing function definitions, classes, and variables that can be imported and reused in other programs.
  • Importing Modules: 1. import module_name (access via module.func()); 2. from module_name import func1, func2 (direct access via func1()); 3. from module_name import * (imports all names; discouraged due to namespace pollution); 4. import module as alias (renames module).
  • The math Module: Standard mathematical functions: math.sqrt(x), math.ceil(x) (smallest integer >= x), math.floor(x) (largest integer <= x), math.pow(x, y) (returns float), math.fabs(x) (absolute float), math.sin(x), math.cos(x), math.pi, math.e, math.gcd(a, b).
  • The random Module: Random number generation: random.random() (float in [0.0, 1.0)); random.randint(a, b) (integer in [a, b] inclusive of BOTH endpoints!); random.randrange(start, stop, step) (integer in [start, stop) exclusive of stop!); random.choice(seq) (random element from sequence).
  • The statistics Module: statistics.mean(data), statistics.median(data), statistics.mode(data).
  • Built-in Functions: abs(), divmod(a, b) (returns (a//b, a%b)), max(), min(), sum(), pow(), round(x, n), len(), type(), id(), input(), print().
  • User-Defined Functions: Defined using def function_name(parameters):; return statement sends values back to caller (functions without return implicitly return None); Default parameters must follow non-default parameters.
# Topic Formula Conditions & Meaning
1 Random Module Range Differences random() in [0.0, 1.0); randint(a, b) in [a, b] (INCLUSIVE); randrange(a, b) in [a, b) (EXCLUSIVE) Critical board exam distinction: randint includes the upper limit, while randrange excludes the upper limit.
2 Math Ceil and Floor Integer Bounds floor(x) <= x <= ceil(x); math.ceil(3.2) = 4; math.floor(3.8) = 3; math.ceil(-3.8) = -3; math.floor(-3.2) = -4 ceil always rounds up towards positive infinity; floor always rounds down towards negative infinity.
3 The divmod() Tuple Return Formula divmod(a, b) = (a // b, a % b) Calculates integer quotient and modulus simultaneously in a single efficient CPU operation.
4 Default Parameter Rule Syntax def func(a, b=10): Valid; def func(a=10, b): SyntaxError: non-default argument follows default argument In function definitions, all parameters with default values must appear after all parameters without default values.
5 Statistics Module Measures of Central Tendency Mean = sum(x)/N; Median = Middle value in sorted data; Mode = Most frequent value Standard descriptive statistical functions provided by Python's built-in statistics library.

Showing 5 of 10 formulas. View all 10 formulas →

Key Principles

  • Digital Footprint: The trail of data left behind when using the internet. Active digital footprint (data submitted intentionally: social media posts, emails, online forms) vs Passive digital footprint (data collected without user's direct knowledge: browsing history, IP address, geolocation cookies).
  • Net Etiquette (Digital Citizenship): Ethical behavior online: respectful communication, respecting privacy, avoiding plagiarism, not using offensive language, citing sources.
  • Cyber Crimes: Cyber Bullying (harassing, humiliating or threatening someone online); Phishing (fraudulent emails/websites pretending to be banks to steal passwords and financial credentials); Identity Theft (stealing personal data to impersonate someone and commit financial fraud); Hacking (unauthorized access to computer systems: Ethical White Hat vs Malicious Black Hat).
  • Malware Types: Viruses (malicious code that attaches to files and replicates when executed); Worms (standalone self-replicating programs that spread across networks without human intervention); Trojans (disguised as legitimate software to gain backdoor access); Ransomware (encrypts user files and demands ransom payment); Spyware (secretly monitors keystrokes and user activity).
  • Cyber Law & IT Act: Indian Information Technology (IT) Act, 2000 (amended in 2008) provides legal framework for electronic governance, recognizes electronic records/digital signatures, and prescribes penal provisions for cyber crimes (Section 66: hacking; Section 66C: identity theft; Section 66D: cheating by personation; Section 66E: privacy violation).
  • Intellectual Property Rights (IPR): Legal rights protecting creations of the mind. Copyright (literary, artistic, software works); Patent (inventions, technological processes); Trademark (brand names, logos, symbols).
  • Open Source Software & Licensing: Free and Open Source Software (FOSS / FLOSS); GNU General Public License (GPL); Creative Commons (CC) licenses; Proprietary Software (source code private and paid); Freeware (free to use, but source code closed); Shareware (free trial period, then requires payment).
# Topic Formula Conditions & Meaning
1 Digital Footprint Classification Matrix Digital Footprint = Active Footprint (Forms/Posts/Emails) + Passive Footprint (Cookies/IP/Geo-tracking) Digital trails are permanent and searchable, shaping online reputation, college admissions, and employment background checks.
2 Indian Information Technology Act Key Sections IT Act 2000 Penal Code: Sec 66 (Hacking) + Sec 66C (Identity Theft) + Sec 66D (Phishing) + Sec 66E (Privacy) The primary cyber law in India regulating electronic commerce, computer security, and digital crime prosecution.
3 Malware Taxonomic Distinction Virus = Host File Required; Worm = Standalone Self-Replicating; Trojan = Deceptive Legit Camouflage Differentiates malware based on transmission mechanisms, host dependency, and execution triggers.
4 Password Entropy & Strength Security Rule Strong Password = Length >= 12 + Uppercase + Lowercase + Digits + Special Symbols (!@#$) Prevents brute-force dictionary attacks; combined with Multi-Factor Authentication (MFA / 2FA) for robust account security.
5 Intellectual Property Rights (IPR) Triad IPR = Copyright (Artistic/Code) + Patent (Functional Invention) + Trademark (Commercial Identity/Brand) Protects creators against theft, unauthorized reproduction, and commercial piracy.

Showing 5 of 10 formulas. View all 10 formulas →