Site icon Gyanodhan

Unit 2: Computer Organization and Architecture

🧠 Overview

Computer Architecture defines the design behaviors visible to software—Instruction Set Architecture (ISA), addressing modes, data types, and functional performance optimizations

Computer Organization (Microarchitecture) covers how the architecture is implemented: CPU datapaths, control logic, memory subsystems, I/O controllers, and control signals


⚙️ Key Components

1. Instruction Set Architecture (ISA)

2. Processor & Datapath

3. Memory Hierarchy:

4. System Organization & I/O

5. Architectural Models

Harvard V/s Von Neuman :-

a) Harvard Architecture, b) Von Neumann Architecture

6. Microarchitectural Enhancements

🔢 Number System (संख्या पद्धति) का परिचय:

1️⃣ Decimal Number System (दशमलव संख्या पद्धति):


2️⃣ Binary Number System (बाइनरी संख्या पद्धति):


3️⃣ Octal Number System (ऑक्टल):


4️⃣ Hexadecimal Number System (हेक्साडेसीमल):


🔄 Number System Conversion (रूपांतरण):

🔁 Decimal → Binary:

🔁 Binary → Decimal:

🔁 Binary → Octal:

🔁 Binary → Hexadecimal:

(बाकी सभी रूपांतरण इन्हीं नियमों से किये जाते हैं।)


Binary Arithmetic (बाइनरी अंकगणित):

✅ 1. Addition (जोड़)

ABSumCarry
0000
0110
1010
1101

🔸 Example:

  1011
+ 0101
= 10000

✅ 2. Subtraction (घटाव)

Simple Method with Borrow

ABDifferenceBorrow
0000
1010
1100
0111

🔸 Example:

  1010
- 0101
= 0101

✅ 3. 1’s Complement Method से Subtraction

Step:

  1. घटाने वाले (subtrahend) का 1’s complement लो।
  2. उसे जोड़ो।
  3. अगर carry आए, तो उसे final answer में जोड़ दो।

✅ 4. 2’s Complement Method से Subtraction

Step:

  1. Subtrahend का 2’s complement लो (1’s complement + 1)
  2. उसे minuend में जोड़ो
  3. Carry ignore करो अगर signed result चाहिए

✅ 5. Binary Multiplication (गुणा)

Same as decimal method:

  101
×  11
-----
  101   (101 × 1)
+1010   (101 × 1, shift 1 place)
-----
 1111

✅ 6. Binary Division (भाग)

Same as long division in decimal:

1011 ÷ 10 = 101 (Binary 11 ÷ 2 = 5)

📘 संक्षेप में:

टॉपिकविशेषताएँ
DecimalBase 10, मानव द्वारा प्रयोग
BinaryBase 2, कंप्यूटर द्वारा प्रयोग
ConversionDivide/Multiply & Grouping techniques
Binary Arithmeticजोड़, घटाव, गुणा, भाग बाइनरी में

Main Concepts Explained Simply


1. 🔢 Number Systems

These are different ways to write numbers. Computers use several number systems.

Number SystemBaseDigits UsedExample
Decimal100–9245
Binary20, 11011
Octal80–773₈ = 01111011₂
Hexadecimal160–9, A–FA5 = 165₁₀

2. 🔁 Conversions Between Number Systems

You can convert numbers from one system to another.

Examples:


3. ➕➖ Binary Arithmetic

✅ Binary Addition (Simple)

Follow these rules:

0 + 0 = 0
0 + 1 = 1
1 + 1 = 10 (carry 1)

Example:

  1011
+ 1101
------
11000

➖ Binary Subtraction

Simple Method: Like decimal subtraction but with 0s and 1s.

1’s Complement Method:

  1. Find 1’s complement (flip 0 ↔ 1)
  2. Add it to the other number
  3. Add carry if exists

2’s Complement Method:

  1. Find 2’s complement of subtracted number (flip bits + 1)
  2. Add to the other number
  3. If overflow, ignore extra bit

✔️ Most used in computers because it’s faster and easier for subtraction.


4. ✖️ Binary Multiplication (Simple)

Just like decimal multiplication, but:

Example:

   101 (5)
x   11 (3)
-------
   101   (101 × 1)
+ 1010   (101 × 1, shifted)
-------
  1111   (15)

5. ➗ Binary Division (Simple)

Like long division:

Example:

110 ÷ 10 = 11 (6 ÷ 2 = 3)

📌 Summary Table

ConceptKey Idea
DecimalBase 10 – used in daily life
BinaryBase 2 – used in computers
ConversionChange from one number system to another
Binary Addition1+1 = 10 (carry)
Binary SubtractionUse complements for faster results
Binary MultiplicationShift & add
Binary DivisionLike long division in binary

🧠 Tip to Remember


🛠️ Error Detection Codes (त्रुटि पहचान कोड)

1️⃣ Parity Bit Method (पैरिटी बिट विधि)


2️⃣ Checksum Method (चेकसम विधि)


🛠️ Error Correction Codes (त्रुटि सुधार कोड)

3️⃣ Hamming Code (हैमिंग कोड)


🔤 Alphanumeric Codes (अल्फान्यूमेरिक कोड)

4️⃣ ASCII (American Standard Code for Information Interchange)

5️⃣ EBCDIC (Extended Binary Coded Decimal Interchange Code)


🔢 Number & Special Codes

6️⃣ Excess-3 Code


7️⃣ BCD Addition Method (BCD जोड़ विधि)


8️⃣ Gray Code

🔄 Conversion:


उदाहरण:

DecimalBinaryGray Code
000000000
100010001
200100011
300110010

संक्षेप:

कोडउद्देश्यविशेषता
Parity BitError DetectionSimple, 1-bit error detect
ChecksumError DetectionData blocks के लिए
Hamming CodeError Correction1-bit error correct
ASCIICharacter EncodingStandard text code
EBCDICCharacter EncodingIBM mainframe use
Excess-3Decimal CodeBCD के लिए alternative
BCD AdditionDecimal ArithmeticCarry correction
Gray CodeError Reduction1-bit difference

Main Concepts Explained Simply


1. 🔤 Different Codes in Digital Systems

These are ways to represent data (letters, numbers, etc.) in binary so computers can understand it.

Alphanumeric Codes

Used to represent letters and symbols:


2. 💾 BCD (Binary Coded Decimal)


3. ➕ Excess-3 Code


4. 🎯 Gray Code

✅ Gray ↔ Binary Conversion:


5. 🛡️ Error Detection Codes

Used to detect mistakes during data transmission.

🔸 Parity Bit Method

🔸 Checksum Method


6. 🛠️ Error Correction Code

🔸 Hamming Code


🧠 Quick Summary Table

ConceptWhat It DoesUse Case
ASCII / EBCDICStores characters as binaryText in computers
BCDStores decimal digits in binaryCalculators, digital clocks
Excess-3 CodeError-friendly decimal codeArithmetic circuits
Gray CodeChanges only one bit at a timeMechanical sensors
Parity BitDetects 1-bit errorSimple transmission check
ChecksumDetects block errorsNetworking, file transfer
Hamming CodeFinds & fixes 1-bit errorMemory systems, data transfer

🖥️ Introduction to Ideal Microcomputer (आदर्श माइक्रोकंप्यूटर का परिचय)


🖥️ An Actual Microcomputer (वास्तविक माइक्रोकंप्यूटर):

मुख्य घटक (Components):

  1. CPU (Central Processing Unit)
    • कंप्यूटर का दिमाग, जो सारे काम और कंट्रोल करता है।
  2. Address Bus (एड्रेस बस)
    • CPU से मेमोरी तक पता (address) भेजता है कि कौन-सी लोकेशन पढ़नी या लिखनी है।
    • यह केवल एक दिशा में डेटा भेजता है।
  3. Data Bus (डेटा बस)
    • CPU और मेमोरी या I/O डिवाइस के बीच डेटा ट्रांसफर करता है।
    • यह दो-तरफा होता है।
  4. Control Bus (कंट्रोल बस)
    • CPU के निर्देशों के अनुसार मेमोरी और I/O को नियंत्रित करता है, जैसे रीड या राइट करना।

💾 Memory Types (मेमोरी के प्रकार):

  1. RAM (Random Access Memory)
    • अस्थायी मेमोरी, डेटा को रीड और राइट दोनों कर सकते हैं।
    • मुख्यतः प्रोग्राम और डेटा स्टोर करता है।

2. SRAM (Static RAM):

3. DRAM (Dynamic RAM):

4. ROM (Read Only Memory)


    🕰️ History of Microprocessor (माइक्रोप्रोसेसर का इतिहास):


    🔧 Microcontroller (माइक्रोकंट्रोलर) (Application Only)


    🎯 Addressing Techniques (एड्रेसिंग तकनीकें):


    Introduction to Digital Electronics (डिजिटल इलेक्ट्रॉनिक्स का परिचय):


    🔲 Logic Gates (लॉजिक गेट्स):

    GateSymbolOperationTruth Table Example
    Inverter (NOT)¬AOutput = Opposite of inputA=0 → Y=1, A=1 → Y=0
    AND GateA·BOutput = 1 जब दोनों 1 हों1 AND 1 = 1
    OR GateA + BOutput = 1 जब कोई एक 1 हो0 OR 1 = 1
    NAND Gate¬(A·B)AND का उल्टा (NOT AND)1 NAND 1 = 0
    NOR Gate¬(A + B)OR का उल्टा (NOT OR)0 NOR 0 = 1
    EX-OR GateA ⊕ BOutput = 1 जब अलग-अलग हों1 XOR 0 = 1
    EX-NOR Gate¬(A ⊕ B)EX-OR का उल्टा1 XNOR 1 = 1

    📐 De Morgan’s Theorems (डी मॉर्गन के नियम):

    1. (A·B)’ = A’ + B’
      (AND का NOT = OR के NOT का योग)
    2. (A + B)’ = A’·B’
      (OR का NOT = AND के NOT का गुणन)

    इसे याद रखने के लिए:


    ✅ Easy Explanation of Key Concepts


    🖥️ Microcomputer Basics

    ✅ Ideal vs Actual Microcomputer

    🔧 Components:


    💾 Memory Types

    TypeDescription
    RAMTemporary memory; loses data when power is off
    SRAMFast, expensive, used in cache
    DRAMSlower, cheaper, used in main memory
    ROM TypeDescription
    ROMRead-Only Memory; permanent storage
    PROMProgrammable once
    EPROMErasable with UV light
    UVEPROMSame as EPROM (UV = ultraviolet)
    EEPROMElectrically erasable and reprogrammable

    🧠 Microprocessor & Microcontroller


    📍 Addressing Techniques

    How instructions refer to memory locations:


    💡 Digital Electronics Basics

    🔌 Logic Gates – Building blocks of digital circuits:

    GateSymbolOutput Rule
    NOT (Inverter)¬A or A̅Opposite of input
    ORA + B1 if any input is 1
    ANDA • B1 if both inputs are 1
    NOR¬(A + B)1 if all inputs are 0
    NAND¬(A • B)0 only if all inputs are 1
    XORA ⊕ B1 if inputs are different
    XNOR¬(A ⊕ B)1 if inputs are same

    📐 De Morgan’s Theorems

    These help simplify logic expressions:

    1. ¬(A + B) = ¬A • ¬B
    2. ¬(A • B) = ¬A + ¬B

    Used in logic gate design and Boolean algebra.



    📌 Summary Table

    ConceptKey Point
    MicrocomputerIncludes CPU, memory, I/O
    RAM vs ROMRAM is temporary, ROM is permanent
    MicrocontrollerAll-in-one chip (used in gadgets)
    Logic GatesPerform basic logical operations
    De Morgan’s TheoremsUsed to simplify logic expressions

    🔄 Universal Gates (सर्वजन्य गेट्स)

    NAND से लॉजिक गेट बनाना:

    NOR से लॉजिक गेट बनाना:


    📊 K-Map Simplifications (कर्नोमैप सरलीकरण)

    Grouping Types:

    Don’t Care Condition:


    ➕➖ Arithmetic Logic Unit (ALU)

    Half Adder (हाफ़ एडर):

    ABSumCarry
    0000
    0110
    1010
    1101

    Full Adder (फुल एडर):


    Binary Adder (बाइनरी एडर):


    2’s Complement Adder-Subtractor (2 का पूरक एडर-सब्ट्रेक्टर):

    Exit mobile version