Basic Introduction to Microprocessor, Microcomputer, Microcontroller
A microprocessor is a small electronic chip that processes data and performs tasks in a computer. It is also called a processor or CPU (Central Processing Unit).
Building Blocks of microprocessor:

Components of microprocessor:
A microprocessor has three main parts
1.Arithmetic Logic Unit (ALU): It does math calculations (Sum, Subtract etc) and logical decisions (and , or etc) using data from input devices or memory.
2.Control Unit (CU): It directs the flow of data and instructions inside the microprocessor.
3.Register Array: A group of small, fast storage units that temporarily hold data and instructions while the microprocessor works.
একটি মাইক্রোপ্রসেসর হলো একটি ছোট ইলেকট্রনিক চিপ(chip) যা একটি কম্পিউটারে ডেটা প্রসেস করে এবং বিভিন্ন কাজ সম্পন্ন করে। একে প্রসেসর বা সিপিইউ (CPU – Central Processing Unit)-ও বলা হয়।
মাইক্রোপ্রসেসরের প্রধান অংশ (Building Blocks of microprocessor)

একটি মাইক্রোপ্রসেসরের তিনটি প্রধান অংশ রয়েছে:
১. ALU – Arithmetic Logic Unit): এটি ইনপুট ডিভাইস বা মেমরি থেকে ডেটা ব্যবহার করে গাণিতিক গণনা (যোগ, বিয়োগ ইত্যাদি) এবং লজিক্যাল (and, or operation) সিদ্ধান্ত নেয়।
২. (CU – Control Unit): এটি মাইক্রোপ্রসেসরের অভ্যন্তরে ডেটা এবং নির্দেশাবলীর(instruction) প্রবাহকে (flow) পরিচালনা করে।
৩. (Register Array): এটি ছোট, দ্রুত স্টোরেজ ইউনিটের একটি গ্রুপ, যা মাইক্রোপ্রসেসর কাজ করার সময় অস্থায়ীভাবে ডেটা এবং নির্দেশাবলী (instruction) ধারণ করে।
A microcomputer is a small, complete computer system built around a microprocessor. It has a CPU (microprocessor), memory, input/output devices (like keyboard and monitor), and storage.
Building Blocks of microcomputer:

Components of Microcomputer:
1.Central Processing Unit (CPU): The brain of the computer that processes instructions and controls other parts.
2.Memory: Stores data and programs temporarily (RAM) or permanently (hard drive/SSD).
3.Input Devices: Tools like a keyboard and mouse that allow users to enter data.
4.Output Devices: Devices like monitors and printers that display or produce the results of processing.
একটি মাইক্রোকম্পিউটার হলো একটি ছোট, সম্পূর্ণ কম্পিউটার সিস্টেম যা একটি মাইক্রোপ্রসেসরের ওপর ভিত্তি করে তৈরি করা হয়। এতে একটি সিপিইউ (CPU) (মাইক্রোপ্রসেসর), মেমরি, ইনপুট/আউটপুট ডিভাইস (যেমন কিবোর্ড ও মনিটর) এবং স্টোরেজ থাকে।
মাইক্রোকম্পিউটারের প্রধান অংশ (Building Blocks of Microcomputer)

একটি মাইক্রোকম্পিউটারের প্রধান অংশগুলো হলো:
১. সেন্ট্রাল প্রসেসিং ইউনিট (CPU): এটি কম্পিউটারের মস্তিষ্ক, যা নির্দেশাবলী প্রসেস করে এবং অন্যান্য অংশকে নিয়ন্ত্রণ করে।
২. মেমরি (Memory): এটি ডেটা এবং প্রোগ্রাম সাময়িকভাবে (RAM) অথবা স্থায়ীভাবে (হার্ড ড্রাইভ/SSD) সংরক্ষণ করে।
৩. ইনপুট ডিভাইস (Input Devices): কিবোর্ড ও মাউসের মতো টুলস, যা ব্যবহারকারীদের ডেটা ইনপুট করার সুযোগ দেয়।
৪. আউটপুট ডিভাইস (Output Devices): মনিটর ও প্রিন্টারের মতো ডিভাইস, যা প্রসেসিং-এর ফলাফল প্রদর্শন বা তৈরি করে।
A microcontroller is a complete computing system fully implemented on a single chip. It includes a microprocessor (CPU), memory (RAM and ROM), and input/output peripherals all integrated together.

Uses of Microcontroller:
- Home Appliances: Controls washing machines, microwave ovens, air conditioners, etc.
- Automobiles: Manages engine control, airbag systems, ABS, and other car electronics.
- Consumer Electronics: Found in remote controls, cameras, and gaming consoles.
- Industrial Automation: Controls machines, robots, and assembly lines.
- Medical Devices: Used in heart rate monitors, blood pressure devices, and other medical instruments.
- Embedded Systems: Powers smart devices like IoT gadgets, smart meters, and wearables.
একটি মাইক্রোকন্ট্রোলার হলো একটি সম্পূর্ণ কম্পিউটিং সিস্টেম যা একটি মাত্র চিপে পুরোপুরি বাস্তবায়িত হয়। এতে একটি মাইক্রোপ্রসেসর (CPU), মেমরি (RAM এবং ROM), এবং ইনপুট/আউটপুট পেরিফেরালস সবই একসাথে সমন্বিত থাকে।

মাইক্রোকন্ট্রোলারের ব্যবহার (Uses of Microcontroller)
- গৃহস্থালী সরঞ্জাম (Home Appliances): ওয়াশিং মেশিন, মাইক্রোওয়েভ ওভেন, এয়ার কন্ডিশনার ইত্যাদি নিয়ন্ত্রণ করে।
- অটোমোবাইলস (Automobiles): ইঞ্জিনের নিয়ন্ত্রণ, এয়ারব্যাগ সিস্টেম, ABS এবং অন্যান্য গাড়ির ইলেকট্রনিক্স পরিচালনা করে।
- কনজিউমার ইলেকট্রনিক্স (Consumer Electronics): রিমোট কন্ট্রোল, ক্যামেরা এবং গেমিং কনসোলে পাওয়া যায়।
- শিল্পে অটোমেশন (Industrial Automation): মেশিন, রোবট এবং অ্যাসেম্বলি লাইন নিয়ন্ত্রণ করে।5
- চিকিৎসা সরঞ্জাম (Medical Devices): হার্ট রেট মনিটর, ব্লাড প্রেসার ডিভাইস এবং অন্যান্য চিকিৎসা যন্ত্রপাতিতে ব্যবহৃত হয়।
- এমবেডেড সিস্টেম (Embedded Systems): আইওটি গ্যাজেট, স্মার্ট মিটার এবং পরিধানযোগ্য (wearables) ডিভাইসের মতো স্মার্ট ডিভাইসগুলোকে শক্তি জোগায়।
A microprocessor is the brain of a computer that performs arithmetic, logic, and control operations. Since its invention, it has evolved through five major generations, each bringing significant improvements in speed, power, and capability.
1. First Generation (1971–1978)
The first generation began with the Intel 4004, the world’s first commercially available microprocessor. It was originally designed for calculators.
- Intel 4004: 4-bit processor, 2300 transistors, 740 kHz clock speed. It could process 4 bits of data at once.
- Intel 8008: 8-bit processor introduced in 1972. It laid the foundation for early personal computers like the Altair 8800.
Limitation: Low processing power and speed, but it opened the path for microcomputers.
2. Second Generation (1978–1980)
This generation introduced improved 8-bit processors with better performance and energy efficiency.
- Intel 8085: Clock speed of 3 to 5 MHz, required fewer external components due to better integration.
- Zilog Z80: Popular in early home computers, backward compatible with Intel 8080 software.
Use: Advanced personal computers, gaming consoles, and programmable devices.
3. Third Generation (1979–1985)
The third generation brought 16-bit processors that could handle more complex tasks and support multitasking.
- Intel 8086: 16-bit processor with 5 to 10 MHz clock speed. Used segmented memory addressing to support larger programs.
- Motorola 68000: Clock speed of 4 to 16.67 MHz, special instructions for BCD arithmetic. Used in Unix workstations and Apple MacOS systems.
Use: Sophisticated personal computers, gaming systems, and industrial automation control systems.
4. Fourth Generation (1985–2000)
Known as the age of advanced computing, this generation introduced 32-bit processors and reduced the gap between personal and professional computing.
- Intel 80386: First full 32-bit x86 processor. Supported modern operating systems, virtual memory, and multitasking.
- PowerPC Processor: Developed by Apple-IBM-Motorola (AIM) for high-performance and energy-efficient computing.
Key milestones: On-chip L1 cache memory was introduced to reduce memory access delays, and transistor density increased significantly.
5. Fifth Generation (2000–Present)
The current generation features 64-bit processors with multiple cores and capabilities for AI and graphics.
- Intel Pentium 4: 32-bit processor with clock speed over 3 GHz, paving the path of modern computing.
- AMD x86-64 Architecture: Supports both 32-bit and 64-bit applications.
Advanced capabilities:
- Multi-core functionality up to 64 cores for better performance and multitasking.
- Integrated graphics support for gaming, video editing, and robotics.
- Higher energy efficiency compared to earlier g

enerations.
Microprocessor হলো computer-এর brain যা arithmetic, logic, এবং control operations perform করে। এর invention-এর পর থেকে এটি পাঁচটি major generation-এর মধ্য দিয়ে evolve করেছে, প্রতিটি speed, power, এবং capability-এ significant improvements নিয়ে এসেছে।
1. First Generation (1971–1978)
First generation শুরু হয় Intel 4004 দিয়ে, যা world-এর প্রথম commercially available microprocessor ছিল। এটি originally calculators-এর জন্য design করা হয়েছিল।
- Intel 4004: 4-bit processor, 2300 transistors, 740 kHz clock speed। একসাথে 4 bits data process করতে পারত।
- Intel 8008: 1972-এ introduced 8-bit processor। এটি early personal computers যেমন Altair 8800-এর foundation তৈরি করেছিল।
Limitation: কম processing power এবং speed, কিন্তু microcomputers-এর path open করেছিল।
2. Second Generation (1978–1980)
এই generation improved 8-bit processors introduce করেছে better performance এবং energy efficiency-সহ।
- Intel 8085: 3 থেকে 5 MHz clock speed, better integration-এর কারণে কম external components প্রয়োজন ছিল।
- Zilog Z80: Early home computers-এ popular, Intel 8080 software-এর সাথে backward compatible ছিল।
Use: Advanced personal computers, gaming consoles, এবং programmable devices।
3. Third Generation (1979–1985)
Third generation 16-bit processors নিয়ে এসেছে যা আরো complex tasks handle করতে পারত এবং multitasking support করত।
- Intel 8086: 16-bit processor 5 থেকে 10 MHz clock speed-সহ। Larger programs support করতে segmented memory addressing ব্যবহার করত।
- Motorola 68000: 4 থেকে 16.67 MHz clock speed, BCD arithmetic-এর জন্য special instructions। Unix workstations এবং Apple MacOS systems-এ ব্যবহৃত হতো।
Use: Sophisticated personal computers, gaming systems, এবং industrial automation control systems।
4. Fourth Generation (1985–2000)
Advanced computing-এর age হিসেবে পরিচিত, এই generation 32-bit processors introduce করেছে এবং personal এবং professional computing-এর মধ্যে gap কমিয়েছে।
- Intel 80386: প্রথম full 32-bit x86 processor। Modern operating systems, virtual memory, এবং multitasking support করত।
- PowerPC Processor: Apple-IBM-Motorola (AIM) দ্বারা developed, high-performance এবং energy-efficient computing-এর জন্য।
Key milestones: On-chip L1 cache memory introduce করা হয় memory access delays কমাতে, এবং transistor density significantly বেড়েছিল।
5. Fifth Generation (2000–Present)
বর্তমান generation 64-bit processors multiple cores এবং AI এবং graphics capabilities-সহ feature করে।
- Intel Pentium 4: 32-bit processor 3 GHz-এর বেশি clock speed-সহ, modern computing-এর path pave করেছিল।
- AMD x86-64 Architecture: 32-bit এবং 64-bit applications উভয় support করে।
Advanced capabilities:
- 64 cores পর্যন্ত multi-core functionality better performance এবং multitasking-এর জন্য।
- Gaming, video editing, এবং robotics-এর জন্য integrated graphics support।
- আগের generations-এর তুলনায় বেশি energy efficiency।

A microprocessor is a compact integrated circuit that serves as the central processing unit of a computer. It performs arithmetic, logic, and control operations based on instructions from software programs. Below are the key features that make microprocessors essential in modern computing.
1. Cost-effective
Microprocessor chips are mass-produced using semiconductor fabrication techniques, making them available at very low prices. A single chip replaces hundreds of discrete components like transistors, resistors, and capacitors. This reduces the overall cost of building computers, smartphones, and embedded systems.
Example: A modern ARM processor costing a few dollars can power an entire smartphone.
2. Small Size
A microprocessor is manufactured on a tiny silicon chip, often just a few square millimeters. This small size makes it highly portable and allows manufacturers to build compact devices like laptops, tablets, and wearable technology.
Example: The Intel Core i7 processor fits in the palm of a hand yet performs billions of calculations per second.
3. Low Power Consumption
Microprocessors are built using Metal-Oxide Semiconductor (MOS) technology, which requires very little electrical power to operate. Low power consumption means less heat generation, longer battery life for mobile devices, and reduced cooling costs for data centers.
Example: Smartphone processors run for a full day on a small battery because they consume only a few watts.
4. Versatility
The same microprocessor hardware can be used in countless applications simply by changing the software program it runs. One chip can power a washing machine, a medical scanner, or a gaming console depending on the loaded software.
Example: The ARM architecture appears in cars, TVs, phones, and servers because software configures it for each task.
5. Reliability
Since a microprocessor is a single integrated circuit, it has very few physical connections that can fail. The failure rate of IC-based microprocessors is extremely low compared to systems built from many separate components. This makes them dependable for critical applications.
Example: Aircraft control systems and medical devices use microprocessors because they rarely malfunction under stress.
Microprocessor হলো একটি compact integrated circuit যা computer-এর central processing unit হিসেবে কাজ করে। এটি software programs থেকে instructions-এর উপর ভিত্তি করে arithmetic, logic, এবং control operations perform করে। নিচে সেই key features দেওয়া হয়েছে যা microprocessors-কে modern computing-এ essential করে তোলে।<
1. Cost-effective
Microprocessor chips semiconductor fabrication techniques ব্যবহার করে mass-produced হয়, যা তাদের খুব কম দামে available করে। একটি single chip transistors, resistors, এবং capacitors এর মতো hundreds of discrete components replace করে। এটি computers, smartphones, এবং embedded systems তৈরির overall cost কমায়।
Example: কয়েক ডলার দামের একটি modern ARM processor পুরো smartphone power করতে পারে।
2. Small Size
Microprocessor কয়েক square millimeters-এর ছোট silicon chip-এ manufacture করা হয়। এই ছোট size এটিকে highly portable করে এবং manufacturers-কে laptops, tablets, এবং wearable technology এর মতো compact devices তৈরি করতে দেয়।
Example: Intel Core i7 processor হাতের তালুতে ফিট করে কিন্তু প্রতি second-এ billions of calculations perform করে।
3. Low Power Consumption
Microprocessors Metal-Oxide Semiconductor (MOS) technology ব্যবহার করে তৈরি করা হয়, যা operate করতে খুব কম electrical power প্রয়োজন। Low power consumption মানে কম heat generation, mobile devices-এর জন্য longer battery life, এবং data centers-এর জন্য reduced cooling costs।
Example: Smartphone processors ছোট battery-এ পুরো দিন চলে কারণ এরা মাত্র কয়েক watts consume করে।
4. Versatility
একই microprocessor hardware countless applications-এ ব্যবহার করা যায় শুধু software program change করেই। একটি chip washing machine, medical scanner, বা gaming console power করতে পারে loaded software-এর উপর নির্ভর করে।
Example: ARM architecture cars, TVs, phones, এবং servers-এ দেখা যায় কারণ software এটিকে প্রতিটি task-এর জন্য configure করে।
5. Reliability
Microprocessor একটি single integrated circuit হওয়ায় এর খুব কম physical connections fail করতে পারে। IC-based microprocessors-এর failure rate many separate components দিয়ে তৈরি systems-এর তুলনায় extremely low। এটি critical applications-এর জন্য dependable করে তোলে।
Example: Aircraft control systems এবং medical devices microprocessors ব্যবহার করে কারণ এরা stress-এর অধীনে rarely malfunction করে।
A microprocessor is the central brain of a computer system that performs multiple essential functions to process data and control operations. Below are the major functions explained with examples.
1. Arithmetic Operations
Arithmetic operations are the most basic function of a microprocessor. It performs calculations like addition, subtraction, multiplication, and division. These operations are critical for tasks such as solving math problems, rendering graphics, and processing financial data.
Examples:
- Calculating the total of a list of numbers in a spreadsheet.
- Measuring distances in a GPS-based navigation system.
- Calculating interest rates in banking software.
2. Logical Operations
Logical operations allow the microprocessor to compare values and make decisions based on conditions. These operations use logic gates to evaluate true or false states.
Examples:
- Verifying if a password matches during user login.
- Sorting a list of items based on price, date, or name.
- Filtering emails as read, unread, spam, or important based on keywords.
3. Data Handling
Data handling involves moving, storing, and retrieving data between different parts of the system. The microprocessor manages how data flows between memory, storage, and external devices.
Examples:
- Fetching a webpage from a remote server to display in a browser.
- Saving a document, PDF, or image file to the hard disk.
- Copying photos or videos from a computer to a USB pen drive.
4. Control Operations
Control operations manage the sequence and flow of instructions. The microprocessor decides the order in which tasks are executed and coordinates other hardware components.
Examples:
- Adjusting the speed of a laptop cooling fan based on internal temperature.
- Regulating cooking time and temperature in a microwave oven.
- Controlling traffic light sequences based on real-time traffic density.
5. Instruction Execution
Instruction execution is the core function where the microprocessor reads, decodes, and carries out program instructions step by step. Every software action is broken down into simple instructions that the processor executes.
Examples:
- Opening Microsoft Word when the user clicks the icon.
- Removing the background from an image in photo editing software.
- Running a full system scan using antivirus software.
6. Interrupt Handling
Interrupt handling allows the microprocessor to pause current tasks and respond to urgent events. It ensures that high-priority actions are addressed immediately without waiting for ongoing processes to finish.
Examples:
- Pausing a video playback when the battery level drops critically low.
- Displaying a pop-up notification when a new message arrives.
- Stopping the printer immediately when the user presses the cancel button.
7. Power Management
Power management helps the microprocessor control energy consumption by putting unused components into low-power states. This extends battery life and reduces heat generation.
Examples:
- Reducing processor and memory power when the computer is idle.
- Turning off screen backlight after a period of inactivity.
- Slowing down the cooling fan when the device temperature is normal.
Microprocessor হলো computer system-এর central brain যা data process এবং operations control করতে multiple essential functions perform করে। নিচে major functions examples সহ ব্যাখ্যা করা হয়েছে।
1. Arithmetic Operations
Arithmetic operations microprocessor-এর সবচেয়ে basic function। এটি addition, subtraction, multiplication, এবং division এর মতো calculations perform করে। এই operations math problems solve করা, graphics render করা, এবং financial data process করার জন্য critical।
Examples:
- Spreadsheet-এ numbers-এর total calculate করা।
- GPS-based navigation system-এ distances measure করা।
- Banking software-এ interest rates calculate করা।
2. Logical Operations
Logical operations microprocessor-কে values compare করতে এবং conditions-এর উপর ভিত্তি করে decisions নিতে দেয়। এই operations logic gates ব্যবহার করে true বা false states evaluate করে।
Examples:
- User login-এর সময় password match verify করা।
- Price, date, বা name-এর উপর ভিত্তি করে items sort করা।
- Keywords-এর উপর ভিত্তি করে emails read, unread, spam, বা important হিসেবে filter করা।
3. Data Handling
Data handling data move, store, এবং retrieve করাকে involve করে system-এর বিভিন্ন অংশের মধ্যে। Microprocessor memory, storage, এবং external devices-এর মধ্যে data flow manage করে।
Examples:
- Browser-এ display করতে remote server থেকে webpage fetch করা।
- Hard disk-এ document, PDF, বা image file save করা।
- Computer থেকে USB pen drive-এ photos বা videos copy করা।
4. Control Operations
Control operations instructions-এর sequence এবং flow manage করে। Microprocessor কোন order-এ tasks execute হবে তা decide করে এবং অন্য hardware components coordinate করে।
Examples:
- Internal temperature-এর উপর ভিত্তি করে laptop cooling fan-এর speed adjust করা।
- Microwave oven-এ cooking time এবং temperature regulate করা।
- Real-time traffic density-এর উপর ভিত্তি করে traffic light sequences control করা।
5. Instruction Execution
Instruction execution core function যেখানে microprocessor program instructions step by step read, decode, এবং carry out করে। প্রতিটি software action simple instructions-এ break down হয় যা processor execute করে।<
Examples:
- User icon click করলে Microsoft Word open করা।
- Photo editing software-এ image-এর background remove করা।
- Antivirus software ব্যবহার করে full system scan run করা।
6. Interrupt Handling
Interrupt handling microprocessor-কে current tasks pause করে urgent events-এ respond করতে দেয়। এটি ensure করে যে high-priority actions immediately address হয় ongoing processes শেষ হওয়ার অপেক্ষা না করে।<
Examples:
- Battery level critically low হলে video playback pause করা।
- New message arrive করলে pop-up notification display করা।
- User cancel button press করলে immediately printer stop করা।
7. Power Management
Power management microprocessor-কে energy consumption control করতে সাহায্য করে unused components-কে low-power states-এ রেখে। এটি battery life extend করে এবং heat generation কমায়।<
Examples:
- Computer idle থাকলে processor এবং memory power reduce করা।
- নির্দিষ্ট সময় inactivity থাকলে screen backlight turn off করা।
- Device temperature normal থাকলে cooling fan speed slow করা।
Processor and Categories of Microproecessor (CISC & RISC)
Processor (CPU – Central Processing Unit)
The Processor is often called the brain of the computer because it is responsible for executing instructions and processing data.
Working Principle of CPU
A processor takes instructions and data as inputs.
- The instructions tell the processor what operation needs to be performed on the data.
- The data is then manipulated or processed according to those instructions.
Each processor has its own Instruction Set – This is nothing but a collection of instructions or operations that the processor understands and can execute.
প্রসেসরকে কম্পিউটারের মস্তিষ্ক বলা হয়, কারণ এটি নির্দেশাবলী (instruction) execute করা এবং ডেটা প্রসেসিং করার জন্য দায়ী।
সিপিইউ-এর কার্যপ্রণালী (Working Principle of CPU)
একটি প্রসেসর ইনপুট হিসেবে নির্দেশাবলী (instructions) এবং ডেটা (data) গ্রহণ করে।
Instruction প্রসেসরকে জানায় যে ডেটার ওপর কী ধরনের অপারেশন সম্পন্ন করতে হবে।
এরপর এই ডেটা নির্দেশাবলী (instruction) অনুযায়ী পরিবর্তিত বা প্রসেস হয়।
প্রতিটি প্রসেসরের নিজস্ব ইনস্ট্রাকশন সেট (Instruction Set) রয়েছে যা হলো একগুচ্ছ নির্দেশাবলী বা অপারেশনের সমষ্টি, যা প্রসেসর বুঝতে এবং execute করতে পারে।
Computer architecture can be classified into two major types based on instruction set This is nothing but a collection of instructions or operations that the processor understands and can execute.
- CISC – Complex Instruction Set Computer
- RISC – Reduced Instruction Set Computer
But before we look at these terms, let’s go back in time to understand why these two architectures were formed in the first place.
Background (Before 1970s)
- Memory (RAM) was slow and expensive.
- Programs were usually written in high-level languages (HLLs) because they were more user-friendly.
- The job of the compiler was to convert these HLL instructions into machine-level instructions so that the processor could execute them.
As high-level languages became more complex, designing compilers became difficult, error-prone, and time-consuming. To make things easier, computer architects wanted to bridge the gap between high-level language code and machine instructions.
Birth of CISC (Complex Instruction Set Computer)
The solution was to have compact, powerful instructions that could do more work with a single command.
CISC Instruction Example
MULT 1:2, 2:3
This single, compact instruction does multiple tasks internally:
- Fetch: Fetches data from memory locations 1:2 and 2:3.
- Load to Registers:
- Register A ← 2
- Register B ← 3
- Multiply: Performs A × B → 2 × 3 = 6
- Store: Stores result back into the appropriate memory location.
Observation
- One single instruction (MULT 1:2, 2:3) performs all four steps.
- Compact code → fewer instructions per program.
- But hardware must be complex to handle all these tasks internally.
This made programming easier and reduced the number of instructions in a program.
But there was a trade-off:
- The hardware became more complex because it had to support all these advanced instructions.
- More transistors were needed → resulting in larger, more expensive processors.
- Higher complexity → increased power consumption and heat dissipation.
Important Note: Computer architects did not intentionally create CISC. It was a natural evolution of processor design based on the needs of that time.
কম্পিউটার আর্কিটেকচারকে ইনস্ট্রাকশন সেট-এর ওপর ভিত্তি করে দুটি প্রধান ভাগে ভাগ করা যায়। ইনস্ট্রাকশন সেট হলো একগুচ্ছ নির্দেশ বা অপারেশনের সমষ্টি যা একটি প্রসেসর বুঝতে ও execute করতে পারে। এই দুটি ভাগ হলো:
- CISC – Complex Instruction Set Computer
- RISC – Reduced Instruction Set Computer
এই দুটি আর্কিটেকচার কেন তৈরি হয়েছিল, তা বুঝতে হলে আমাদের সময়ের পেছনে যেতে হবে।
(Background (Before 1970s))
- মেমরি (RAM) তখন ছিল ধীরগতির এবং ব্যয়বহুল।
- প্রোগ্রামগুলো সাধারণত হাই-লেভেল ল্যাঙ্গুয়েজেস (HLLs) লেখা হতো, কারণ এগুলো ব্যবহারকারীদের জন্য বেশি সহজ ছিল।
- কম্পাইলারের কাজ ছিল এই HLL নির্দেশগুলোকে মেশিন-লেভেল নির্দেশাবলীতে রূপান্তর করা, যাতে প্রসেসর সেগুলো execute করতে পারে।
- হাই-লেভেল ল্যাঙ্গুয়েজগুলো আরও জটিল হয়ে ওঠায়, কম্পাইলার ডিজাইন করা কঠিন, ত্রুটিপূর্ণ এবং সময়সাপেক্ষ হয়ে দাঁড়ায়।
বিষয়টি সহজ করার জন্য, কম্পিউটার স্থপতিরা হাই-লেভেল ল্যাঙ্গুয়েজ কোড এবং মেশিন নির্দেশাবলীর মধ্যেকার গ্যাপ কমাতে চেয়েছিলেন।
CISC-এর জন্ম (Birth of CISC)
এর সমাধান ছিল এমন কিছু কমপ্যাক্ট এবং শক্তিশালী নির্দেশ(instruction) তৈরি করা, যা একটি একক কমান্ড দিয়ে অনেকগুলো কাজ করতে পারে।
CISC ইনস্ট্রাকশনের উদাহরণ
CISC Instruction Example
MULT 1:2, 2:3
এই একটি মাত্র কমপ্যাক্ট ইনস্ট্রাকশন অভ্যন্তরীণভাবে একাধিক কাজ সম্পন্ন করে:
- Fetch: মেমরি লোকেশন 1:2 এবং 2:3 থেকে ডেটা নিয়ে আসে।
- Load to Registers:
- রেজিস্টার A ← 2
- রেজিস্টার B ← 3
- Multiply: A × B → 2 × 3 = 6 সম্পন্ন করে।
- Store: ফলাফলটি উপযুক্ত মেমরি লোকেশনে আবার সংরক্ষণ করে।
পর্যবেক্ষণ (Observation)
- একটি একক ইনস্ট্রাকশন (MULT 1:2, 2:3) সমস্ত চারটি ধাপ সম্পন্ন করে।
- কিন্তু এই সব কাজ অভ্যন্তরীণভাবে সামলানোর জন্য হার্ডওয়্যার আরো জটিল(Complex) হয়ে যায়।
- এই পদ্ধতিটি প্রোগ্রামিংকে সহজ করে তুলেছিল এবং প্রোগ্রামের মধ্যেকার নির্দেশাবলীর সংখ্যা কমিয়ে এনেছিল।
কিন্তু এর একটি বড় সীমাবদ্ধতা ছিল:
- হার্ডওয়্যার আরও জটিল (Complex) হয়ে যায়, কারণ তাকে এই সব উন্নত নির্দেশাবলী(instruction) execute করতে হতো।
- যার ফলে আরও বেশি ট্রানজিস্টর প্রয়োজন হয়, এজন্য প্রসেসরগুলো বড় এবং ব্যয়বহুল হয়ে ওঠে।
- ফলশ্রুতিতে বিদ্যুৎ খরচ এবং তাপ নির্গমনও বেড়ে যায়।
Important Note:
কম্পিউটার স্থপতিরা ইচ্ছাকৃতভাবে CISC তৈরি করেননি। এটি ছিল সেই সময়ের প্রয়োজন অনুযায়ী প্রসেসর ডিজাইনের একটি স্বাভাবিক বিবর্তন।
Birth of RISC (Reduced Instruction Set Computer) – Early 1980s
In the 1980s, researchers discovered something interesting: Only 20% of instructions were used 80% of the time in programs. This meant many of the complex CISC instructions were rarely used.
This led to a new idea:
- Create a smaller, simpler instruction set that contains only the most commonly used operations.
- Let the compiler handle more work by combining these simple instructions when needed.
RISC architecture focuses on a small set of simple instructions that can be executed very quickly, usually in a single clock cycle.
Thus, RISC architecture was born.
RISC Instruction Example
Load A, 1:2
Load B, 2:1
Prod A, B
Store 1:2, A

Step-by-Step Execution:
- Load A, 1:2 → Loads data from memory location 1:2 into Register A.
- Load B, 2:1 → Loads data from memory location 2:1 into Register B.
- Prod A, B → Multiplies A and B, result stored back in A.
- Store 1:2, A → Stores result from A back into memory location 1:2.
Observation:
- Simple step-by-step execution
- Requires multiple instructions (more memory)
- But each instruction is fast and takes one clock cycle
RISC (Reduced Instruction Set Computer)-এর জন্ম – ১৯৮০ এর দশকের শুরুতে
১৯৮০-এর দশকে গবেষকরা একটি গুরুত্বপূর্ণ বিষয় লক্ষ্য করলেন:
প্রোগ্রামে ব্যবহৃত instruction এর মধ্যে মাত্র ২০% instruction ৮০% সময় ব্যবহার হয়। এতে দেখা গেলো, অনেক জটিল CISC instruction খুবই কম ব্যবহৃত হয়।
এরপর একটি নতুন ধারণার তৈরি হলো আর তা হলঃ একটি ছোট, সহজ instruction set তৈরি করা যেখানে শুধুমাত্র সবচেয়ে বেশি ব্যবহৃত অপারেশন বা Instruction গুলো থাকবে।
প্রয়োজন হলে কম্পাইলারকে বেশি কাজ করতে দেওয়া হবে যাতে সে সহজ instruction গুলো মিলিয়ে জটিল কাজ সম্পাদন করতে পারে। RISC architecture মূলত ছোট সেটের সহজ instruction ব্যবহার করে যেগুলো খুব দ্রুত (সাধারণত একটি clock cycle-এর মধ্যে) এক্সিকিউট করা যায়।
এইভাবে RISC architecture-এর জন্ম হয়।
RISC Instruction Example
Load A, 1:2
Load B, 2:1
Prod A, B
Store 1:2, A

(Step-by-Step Execution)
- Load A, 1:2 → মেমরি লোকেশন 1:2 থেকে ডেটা রেজিস্টার A-তে লোড করে।
- Load B, 2:1 → মেমরি লোকেশন 2:1 থেকে ডেটা রেজিস্টার B-তে লোড করে।
- Prod A, B → A ও B-কে গুণ করে; গুনফল আবার রেজিস্টার A-তে সংরক্ষণ করা হয়।
- Store 1:2, A → রেজিস্টার A থেকে ফলাফল মেমরি লোকেশন 1:2-এ স্টোর করে।
RISC পদ্ধতিটি সহজ, ধাপে ধাপে কাজ করে। যদিও এর জন্য একাধিক নির্দেশাবলীর প্রয়োজন হয় (ফলে মেমরি বেশি লাগে), প্রতিটি নির্দেশই দ্রুত কাজ করে এবং সাধারণত একটি সিঙ্গেল ক্লক সাইকেলে সম্পন্ন হয়। এই ডিজাইন হার্ডওয়্যারকে আরও সহজ, দ্রুত এবং বিদ্যুৎ-সাশ্রয়ী করে তোলে।
System Bus : Address Bus, Data Bus, Control Bus
The System Bus is the communication pathway that connects the CPU, memory, and input/output devices. It is like the nerve system of a computer, carrying signals and data between components.
A System Bus is a collection of parallel wires or signal lines that connect the major components of a computer system and allow them to communicate.
Types Of Buses
There are three main types of buses in a computer system
- Address Bus
- Data Bus
- Control Bus
বাসের প্রকারভেদ (Types Of Buses)
একটি কম্পিউটার সিস্টেমে প্রধানত তিন ধরনের বাস থাকে:
- অ্যাড্রেস বাস (Address Bus)
- ডেটা বাস (Data Bus)
- কন্ট্রোল বাস (Control Bus)

The Address Bus is a collection of wires used to identify specific locations in memory. In other words, the information used to describe memory locations travels along the address bus.
Purpose
- The address bus transports memory addresses which the CPU wants to access in order to read or write data.
- It specifies the location in memory or the I/O device where the data is stored or needs to be stored.
Characteristics
1. Unidirectional:
- The address always flows from CPU → Memory/I/O devices.
- Memory or I/O devices cannot send addresses back to the CPU.
2. Determines Maximum Addressable Memory:
The number of lines (width) of the address bus determines how many unique memory locations can be addressed.
Example:
- 4-bit address bus → 2⁴ = 16 memory locations (16 Bytes)
- 16-bit address bus → 2¹⁶ = 65,536 memory locations (64 KB)
- 20-bit address bus → 2²⁰ = 1,048,576 memory locations (1 MB)
3. Generated By CPU: The CPU generates the address signals to tell memory or I/O which location to access.
অ্যাড্রেস বাস হলো তারের একটি সংগ্রহ, যা কম্পিউটারের মেমরি বা অন্য কোনো ডিভাইসের নির্দিষ্ট অবস্থান(location) চিহ্নিত করার জন্য ব্যবহৃত হয়। সহজ কথায়, এটি সেই রাস্তা (communication path) যার মাধ্যমে ডেটা কোথায় আছে বা কোথায় যাবে, সেই (address) সম্পর্কিত তথ্য আদান প্রদান করা হয়।
অ্যাড্রেস বাসের উদ্দেশ্য
অ্যাড্রেস বাসের প্রধান কাজ হলো সেইসব মেমরি অ্যাড্রেস পরিবহন করা, যা CPU কোনো ডেটা read বা write এর জন্য অ্যাক্সেস করতে চায়।
বৈশিষ্ট্য
১. একমুখী (Unidirectional): অ্যাড্রেস বাসের ডেটা শুধুমাত্র একদিকে প্রবাহিত হয়, অর্থাৎ CPU থেকে মেমরি বা I/O ডিভাইসের দিকে। মেমরি বা I/O ডিভাইস থেকে কোনো অ্যাড্রেস CPU-এর কাছে ফেরত পাঠানো যায় না।
২. সর্বোচ্চ অ্যাক্সেসযোগ্য মেমরি নির্ধারণ : অ্যাড্রেস বাসের তারের সংখ্যা (its width) নির্ধারণ করে যে এটি সর্বোচ্চ কতগুলো ইউনিক মেমরি লোকেশনকে অ্যাড্রেস করতে পারবে।
- যেমন: একটি 4-বিট অ্যাড্রেস বাস 2⁴ = 16টি মেমরি লোকেশনকে অ্যাড্রেস করতে পারে (16 বাইট)।
- একটি 16-বিট অ্যাড্রেস বাস 2¹⁶ = 65,536টি মেমরি লোকেশনকে অ্যাড্রেস করতে পারে (64 KB)।
- একটি 20-বিট অ্যাড্রেস বাস 2²⁰ = 1,048,576টি মেমরি লোকেশনকে অ্যাড্রেস করতে পারে (1 MB)।
৩. Generated By CPU: অ্যাড্রেস সিগনালগুলো CPU নিজেই তৈরি করে। এটি মেমরি বা I/O ডিভাইসকে বলে দেয় যে কোন লোকেশনটি অ্যাক্সেস করতে হবে।
The Data Bus is a collection of wires through which data is transmitted from one part of a computer to another. It can be thought of as a highway on which data travels within a computer.
Purpose
The main objective of the data bus is to transfer data between:
- CPU (Microprocessor) ↔ Memory
- CPU ↔ Input/Output (I/O) devices
The data bus also transfers instructions coming from or going to the CPU.
Characteristics
1. Bidirectional: Data can flow both ways:
- CPU → Memory/I/O (Write Operation)
- Memory/I/O → CPU (Read Operation)
Example: CPU reading instruction from memory or writing result to memory.
2. Size / Width: The width of the bus determines how many bits of data can be transmitted at a time.
Examples:
- 16-bit bus → transfers 16 bits at a time
- 32-bit bus → transfers 32 bits at a time
3. Transfers Both Data and Instructions: Data bus carries data values, CPU instructions, and I/O information.
ডেটা বাস হলো তারের একটি সংগ্রহ, যার মাধ্যমে কম্পিউটারের এক অংশ থেকে অন্য অংশে ডেটা আদান-প্রদান করা হয়। এটিকে কম্পিউটারের ভেতরের একটি হাইওয়ে হিসেবে ভাবা যেতে পারে, যার ওপর দিয়ে ডাটা চলাচল করে।
ডেটা বাসের উদ্দেশ্য
ডেটা বাসের মূল লক্ষ্য হলো বিভিন্ন উপাদানের মধ্যে ডেটা স্থানান্তর করা:
- CPU (মাইক্রোপ্রসেসর) ↔ মেমরি
- CPU ↔ ইনপুট/আউটপুট (I/O) ডিভাইস
ডাটা বাস ডেটার পাশাপাশি instruction গুলো ও পরিবহন করে।
বৈশিষ্ট্য
১. দ্বিমুখী (Bidirectional): ডেটা বাসে ডেটা উভয় দিকেই প্রবাহিত হতে পারে:
- CPU → মেমরি/I/O (ডেটা write এর জন্য)
- মেমরি/I/O → CPU (ডেটা read এর জন্য)
যেমন: CPU যখন মেমরি থেকে কোনো instruction read করে বা কোনো result মেমরিতে write করে, তখন ডাটা এই দ্বিমুখী বৈশিষ্ট্য পরিলক্ষিত হয়।
২. Size / Width: বাসের সাইজ নির্ধারণ করে যে এটি একবারে কত বিট ডেটা স্থানান্তর করতে পারবে।
- যেমন: একটি 16-বিট বাস একবারে 16 বিট ডেটা স্থানান্তর করে।
- একটি 32-বিট বাস একবারে 32 বিট ডেটা স্থানান্তর করে।
৩. Transfers Both Data and Instructions: ডেটা বাস শুধু ডেটা মানই বহন করে না, এটি CPU-এর instruction এবং I/O সম্পর্কিত তথ্যও বহন করে।
The Control Bus is a set of connections that carry control information between the CPU and other devices within the computer. It transports orders and synchronization signals from the Control Unit (CU) to all other hardware components.
Purpose
- To control and coordinate the operations of the CPU, memory, and I/O devices.
- Ensures that read/write operations are executed at the correct time.
- Transmits response or acknowledgment signals from memory or I/O devices back to the CPU.
Characteristics
1. Bidirectional: Signals can flow both ways:
- CPU → Memory/I/O (control commands)
- Memory/I/O → CPU (acknowledgment or status signals)
2. Generated by CPU: Control signals are mostly generated by the CPU’s Control Unit to manage other components.
কন্ট্রোল বাস হলো সংযোগ তারের একটি সেট, যা CPU এবং কম্পিউটারের অন্যান্য ডিভাইসের মধ্যে (control signal) বহন করে। এটি কন্ট্রোল ইউনিট (CU) থেকে অন্যান্য হার্ডওয়্যার কম্পোনেন্টে control order এবং synchronization signal পাঠায়।
উদ্দেশ্য
কন্ট্রোল বাসের প্রধান কাজ হলো:
- CPU, মেমরি এবং I/O ডিভাইসকে নিয়ন্ত্রণ (control) ও সমন্বয় (coordinate) করা।
- রিড (Read) এবং রাইট (Write) অপারেশনগুলো সঠিক সময়ে সম্পন্ন হচ্ছে কিনা তা নিশ্চিত করা।
- মেমরি বা I/O ডিভাইস থেকে CPU-এর কাছে acknowledge signal(প্রতিক্রিয়া) পাঠানো।
বৈশিষ্ট্য
১. দ্বিমুখী (Bidirectional): এই বাসে সিগনাল উভয় দিকেই প্রবাহিত হতে পারে:
- CPU → মেমরি/I/O: (Control command)
- মেমরি/I/O → CPU: (অ্যাকনলেজমেন্ট বা স্ট্যাটাস সিগনাল)
২. Generated by CPU: বেশিরভাগ কন্ট্রোল সিগনাল CPU-এর কন্ট্রোল ইউনিট দ্বারা তৈরি হয়, যা অন্যান্য উপাদানগুলোকে পরিচালনা করার জন্য ব্যবহৃত হয়।
Register in Microprocessor
A register is a small, fast storage unit inside the CPU used to hold data and instructions for immediate processing. It plays a vital role in holding the data required by the CPU for immediate processing and is made up of flip-flops. It usually holds a limited amount of data ranging from 8 to 64 bits, depending on the processor architecture. Registers are utilized for a variety of functions in handling and controlling instructions and data, and play an important role in the operation of a computer’s CPU.
- Intermediate storage: Registers act as intermediate storage for data during arithmetic logic and other processing operations.
- Fast memory: A register is a tiny, fast storage memory within the CPU or the ALU of a computer.
- Buffer for I/O: Registers are used to buffer data during input/output operations.
Types of Registers
1. Accumulator Register
The accumulator acts as a central point for arithmetic and logical operations within the CPU. It fetches data from memory and stores intermediate results during calculations. Operations like addition, subtraction, multiplication, and division often take place in the accumulator. The final result may be stored in the accumulator or transferred to other registers or memory locations.
2. Program Counter (PC) Register
The program counter is a special register that keeps track of the memory address of the next instruction to be fetched and executed. As the CPU executes each instruction in sequence, the program counter is updated to indicate the next instruction’s address in memory. This process continues until the program’s execution is complete.
3. General-Purpose Registers
General-purpose registers are versatile because they can hold data and memory addresses. They are used for various calculations and data manipulation tasks during program execution. These registers are essential for performing arithmetic and logical operations on data stored in the CPU.
4. Instruction Register (IR)
The instruction register holds the currently fetched instruction from memory. It allows the CPU to decode and execute the instruction based on its opcode and operands.
5. Memory Address Register (MAR)
The memory address register stores the memory address of data or instructions to be accessed or written in memory. It plays a crucial role in memory operations by indicating the location of the data or instruction the CPU needs to access.
6. Memory Data Register (MDR)
The MDR holds the actual data fetched from or written to memory. When the CPU retrieves data from memory, it is temporarily stored in the MDR before being processed further.
7. Stack Pointer (SP)
The stack pointer is used in stack-based memory operations. It keeps track of the top of the stack, which is a region of memory used for temporary storage of data and return addresses during function calls.
8. Floating-Point Registers
These registers are specialized for handling floating-point numbers and performing floating-point arithmetic operations. They can store and manipulate floating-point numbers with higher precision.
Register হলো CPU-এর ভেতরে একটি ছোট, দ্রুত storage unit যা immediate processing-এর জন্য data এবং instructions hold করে। এটি CPU-এর প্রয়োজনীয় data hold করতে vital role play করে এবং flip-flops দিয়ে তৈরি। এটি সাধারণত 8 থেকে 64 bits পর্যন্ত limited amount of data hold করে, processor architecture-এর উপর নির্ভর করে। Registers instructions এবং data handle এবং control করতে বিভিন্ন functions-এ ব্যবহৃত হয় এবং computer-এর CPU operation-এ important role play করে।<
- Intermediate storage: Registers arithmetic logic এবং অন্যান্য processing operations-এর সময় data-এর intermediate storage হিসেবে কাজ করে।
- Fast memory: Register হলো CPU বা ALU-এর ভেতরে একটি tiny, fast storage memory।
- Buffer for I/O: Registers input/output operations-এর সময় data buffer করতে ব্যবহৃত হয়।
Types of Registers
1. Accumulator Register
Accumulator CPU-এর ভেতরে arithmetic এবং logical operations-এর জন্য একটি central point হিসেবে কাজ করে। এটি memory থেকে data fetch করে এবং calculations-এর সময় intermediate results store করে। Addition, subtraction, multiplication, এবং division এর মতো operations সাধারণত accumulator-এ হয়। Final result accumulator-এ store হতে পারে বা অন্য registers বা memory locations-এ transfer হতে পারে।
2. Program Counter (PC) Register
Program counter একটি special register যা fetch এবং execute করার জন্য next instruction-এর memory address track রাখে। CPU প্রতিটি instruction sequence-এ execute করার সময় program counter update হয়ে next instruction-এর memory address indicate করে। এই process program-এর execution complete না হওয়া পর্যন্ত চলতে থাকে।
3. General-Purpose Registers
General-purpose registers versatile কারণ এরা data এবং memory addresses উভয় hold করতে পারে। Program execution-এর সময় বিভিন্ন calculations এবং data manipulation tasks-এর জন্য ব্যবহৃত হয়। CPU-এ store করা data-এর উপর arithmetic এবং logical operations perform করতে এই registers essential।
4. Instruction Register (IR)
Instruction register memory থেকে currently fetched instruction hold করে। এটি CPU-কে instruction-এর opcode এবং operands-এর উপর ভিত্তি করে decode এবং execute করতে দেয়।
5. Memory Address Register (MAR)
Memory address register memory-তে access বা write করার জন্য data বা instructions-এর memory address store করে। Memory operations-এ এটি crucial role play করে কারণ এটি CPU-এর প্রয়োজনীয় data বা instruction-এর location indicate করে।
6. Memory Data Register (MDR)
MDR memory থেকে fetch করা বা memory-তে write করার actual data hold করে। CPU memory থেকে data retrieve করলে এটি temporarily MDR-এ store হয় further process করার আগে।<
7. Stack Pointer (SP)
Stack pointer stack-based memory operations-এ ব্যবহৃত হয়। এটি stack-এর top track রাখে, যা function calls-এর সময় temporary data এবং return addresses store করার জন্য memory-এর একটি region।
8. Floating-Point Registers
এই registers floating-point numbers handle করার এবং floating-point arithmetic operations perform করার জন্য specialized। এরা higher precision-সহ floating-point numbers store এবং manipulate করতে পারে।
In 8086 microprocessor, the registers are categorized under following four types:
- General Purpose Registers
- Segment Registers
- Special Purpose Registers
- Flag Registers
The general purpose registers are present in the execution unit of the 8086 microprocessor. These are versatile registers that can be used for various tasks, such as storing numbers for calculations or holding memory addresses for data access. Each register serves a specific purpose, aiding the microprocessor in different types of tasks.
A general purpose register contains eight registers namely AH, AL, BH, BL, CH, CL, DH, DL in which each register carries 8-bit data. It is used for temporary storage. When there is a requirement to store data which is greater than 8-bit, then these registers are used in pairs as AX, BX, CX, DX thus it effectively doubles their storage capacity. These register pairs can hold a maximum of 16-bit data.
Functions of Each General Purpose Register
- Accumulator Register (AX): When ALU performs arithmetic and logical operations, the accumulator register stores the operands of such operations.
- Base Register (BX): The base register is used to hold the base address of a memory location for reading and writing data into the memory.
- Counter Register (CX): The counter register is used to hold 8-bit data during the rotate and shift instructions. It is also used to store the loop counter during loop instructions.
- Data Register (DX): During multiplication and division operations, if the result is 32-bits, then 16 bits from MSB are stored in the DX register and bits from LSB are stored in the AX register. This register is also used to hold the address and instruction for I/O.
General purpose registers 8086 microprocessor-এর execution unit-এ present। এরা versatile registers যা বিভিন্ন tasks-এর জন্য ব্যবহার করা যেতে পারে, যেমন calculations-এর জন্য numbers store করা বা data access-এর জন্য memory addresses hold করা। প্রতিটি register একটি specific purpose serve করে, microprocessor-কে বিভিন্ন types-এর tasks-এ সাহায্য করে।
একটি general purpose register আটটি registers ধারণ করে যার নাম AH, AL, BH, BL, CH, CL, DH, DL যেখানে প্রতিটি register 8-bit data carry করে। এটি temporary storage-এর জন্য ব্যবহৃত হয়। যখন 8-bit-এর বেশি data store করার প্রয়োজন হয়, তখন এই registers AX, BX, CX, DX হিসেবে pairs-এ ব্যবহার করা হয়, যা effectively তাদের storage capacity double করে। এই register pairs সর্বোচ্চ 16-bit data hold করতে পারে।
প্রতিটি General Purpose Register-এর Functions
- Accumulator Register (AX): ALU arithmetic এবং logical operations perform করলে accumulator register এসব operations-এর operands store করে।
- Base Register (BX): Base register memory location-এর base address hold করতে ব্যবহৃত হয়, memory-তে data read এবং write করার জন্য।
- Counter Register (CX): Counter register rotate এবং shift instructions-এর সময় 8-bit data hold করতে ব্যবহৃত হয়। Loop instructions-এর সময় loop counter store করতেও এটি ব্যবহৃত হয়।
- Data Register (DX): Multiplication এবং division operations-এর সময়, result 32-bits হলে MSB থেকে 16 bits DX register-এ store হয় এবং LSB থেকে bits AX register-এ store হয়। এই register I/O-এর জন্য address এবং instruction hold করতেও ব্যবহৃত হয়।
The segment registers are present in the Bus Interface Unit (BIU) of the 8086 microprocessor. The segment registers are responsible for managing memory access. As the computer memory is segmented, the segment registers track the memory location of each and every segment. The segment registers contain four 16-bit registers namely Code Segment (CS), Data Segment (DS), Stack Segment (SS) and Extra Segment (ES). These registers are used to hold the 16 bits of starting address. Each segment register holds the starting address of its respective memory segment, allowing the microprocessor to quickly locate and access the data it needs during program execution.
Functions of Each Segment Register
- Code Segment (CS): This register is used to store the address of the memory in which the program which is to be executed is stored.
- Data Segment (DS): It is used to store data which is used by the program frequently. It also stores the offset address or the data of the register that holds the offset address.
- Stack Segment (SS): It is used to store the address as well as data in the memory while the subprogram is executing.
- Extra Segment (ES): This register is used to hold the extra data by providing additional data segment in the memory.
Segment registers 8086 microprocessor-এর Bus Interface Unit (BIU)-এ present। Segment registers memory access manage করার দায়িত্বে। Computer memory segmented হওয়ায় segment registers প্রতিটি segment-এর memory location track করে। Segment registers চারটি 16-bit registers ধারণ করে যার নাম Code Segment (CS), Data Segment (DS), Stack Segment (SS) এবং Extra Segment (ES)। এই registers 16 bits starting address hold করতে ব্যবহৃত হয়। প্রতিটি segment register তার respective memory segment-এর starting address hold করে, microprocessor-কে program execution-এর সময় প্রয়োজনীয় data quickly locate এবং access করতে দেয়।
প্রতিটি Segment Register-এর Functions
- Code Segment (CS): এই register execute করার জন্য program যে memory-তে stored আছে তার address store করতে ব্যবহৃত হয়।
- Data Segment (DS): এটি program দ্বারা frequently ব্যবহৃত data store করতে ব্যবহৃত হয়। এটি offset address বা register-এর data যা offset address hold করে তা store করে।
- Stack Segment (SS): এটি subprogram execute হওয়ার সময় memory-তে address এবং data store করতে ব্যবহৃত হয়।
- Extra Segment (ES): এই register memory-তে additional data segment provide করে extra data hold করতে ব্যবহৃত হয়।
The index and pointer registers are collectively called special purpose registers. These are 16-bit registers used as memory pointers and these registers generate 20-bit physical addresses. There are five 16-bit special purpose registers namely Stack Pointer (SP), Base Pointer (BP), Source Index (SI), Destination Index (DI) and Instruction Pointer (IP).
Functions of Each Special Purpose Register
- Stack Pointer (SP): Stack Pointer register is used to hold the topmost address of the stack memory. It stores the address of the memory location in which data was recently stored.
- Base Pointer (BP): It is used to store the base address of the memory.
- Source Index (SI): It is a memory pointer which is used to store the offset address of the source.
- Destination Index (DI): It is a memory pointer which is used to store the offset address of the destination.
- Instruction Pointer (IP): This register is used to hold the address of the next instruction which is to be executed.
Index এবং pointer registers-কে collectively special purpose registers বলা হয়। এরা 16-bit registers যা memory pointers হিসেবে ব্যবহৃত হয় এবং এই registers 20-bit physical addresses generate করে। পাঁচটি 16-bit special purpose registers আছে যার নাম Stack Pointer (SP), Base Pointer (BP), Source Index (SI), Destination Index (DI) এবং Instruction Pointer (IP)।
প্রতিটি Special Purpose Register-এর Functions
- Stack Pointer (SP): Stack Pointer register stack memory-এর topmost address hold করতে ব্যবহৃত হয়। এটি সেই memory location-এর address store করে যেখানে সবশেষ data store করা হয়েছিল।
- Base Pointer (BP): এটি memory-এর base address store করতে ব্যবহৃত হয়।
- Source Index (SI): এটি একটি memory pointer যা source-এর offset address store করতে ব্যবহৃত হয়।
- Destination Index (DI): এটি একটি memory pointer যা destination-এর offset address store করতে ব্যবহৃত হয়।
- Instruction Pointer (IP): এই register execute করার জন্য next instruction-এর address hold করতে ব্যবহৃত হয়।
The flag register is classified into two categories:
1. Conditional Flags
These flags are used to hold the result obtained by ALU, that is, by arithmetical and logical operations. There are six conditional flags:
- Carry Flag (CF): If any arithmetic operation results in the production of a carry in the MSB position, then this extra bit is stored in the carry flag. The carry flag is set to 1 when the carry is generated, otherwise it is reset to 0.
- Auxiliary Carry Flag (AF): If a carry is generated in the 4th bit from the LSB, then that carry is called an auxiliary carry. The auxiliary carry flag is set to 1 when the auxiliary carry is generated, otherwise it is reset to 0.
- Parity Flag (PF): This flag is used to store the parity of the result of any arithmetic and logical operation. The value of the parity flag is 1 when the result is of even parity (the number of 1’s in the result is even), whereas the value is 0 when the result is of odd parity (the number of 1’s in the result is odd).
- Zero Flag (ZF): If the result of any arithmetic and logical operation is zero, then this flag is set, otherwise it is reset.
- Sign Flag (SF): The value of the sign flag is 1 when the result of any operation performed by the ALU is a negative number, whereas its value is 0 when the result is a positive number.
- Overflow Flag (OF): If the result is within the capacity of the register, then the overflow flag is reset, whereas if the result exceeds the value of the register, then the flag is set.
2. Control Flags
These flags are used to control some specific operations of the processor with the help of some specific instructions. The 8086 microprocessor provides three control flags:
- Trap Flag (TF): When the trap flag is set, the processor will execute the whole program at once, whereas when the trap flag is reset, the program will be executed in a step-by-step sequence.
- Interrupt Flag (IF): This flag is set when the maskable interrupt is enabled, whereas it is reset when the maskable interrupt is disabled.
- Direction Flag (DF): This flag is set when the bits are accessed from higher memory address to lower memory address, whereas the direction flag is reset when the bits are accessed from lower memory address to higher memory address.
Flag register-কে status register ও বলা হয়। এটি একটি 16-bit register যা flip-flops-এর set। এই register-এ নয়টি flag আছে।
Flag register দুটি categories-এ classify করা হয়:
1. Conditional Flags
এই flags ALU দ্বারা obtained result hold করতে ব্যবহৃত হয়, অর্থাৎ arithmetical এবং logical operations-এর দ্বারা। ছয়টি conditional flags আছে:
- Carry Flag (CF): কোনো arithmetic operation MSB position-এ carry production করলে, এই extra bit carry flag-এ store হয়। Carry generate হলে carry flag 1-এ set হয়, নাহলে 0-এ reset হয়।
- Auxiliary Carry Flag (AF): LSB থেকে 4th bit-এ carry generate হলে সেই carry-কে auxiliary carry বলা হয়। Auxiliary carry generate হলে auxiliary carry flag 1-এ set হয়, নাহলে 0-এ reset হয়।
- Parity Flag (PF): এই flag যেকোনো arithmetic এবং logical operation-এর result-এর parity store করতে ব্যবহৃত হয়। Result even parity হলে (result-এ 1-এর সংখ্যা even) parity flag-এর value 1 হয়, আর odd parity হলে (result-এ 1-এর সংখ্যা odd) value 0 হয়।
- Zero Flag (ZF): যেকোনো arithmetic এবং logical operation-এর result zero হলে এই flag set হয়, নাহলে reset হয়।
- Sign Flag (SF): ALU দ্বারা performed যেকোনো operation-এর result negative number হলে sign flag-এর value 1 হয়, আর positive number হলে value 0 হয়।
- Overflow Flag (OF): Result register-এর capacity-এর মধ্যে থাকলে overflow flag reset হয়, আর register-এর value exceed করলে flag set হয়।
2. Control Flags
এই flags processor-এর কিছু specific operations control করতে ব্যবহৃত হয় কিছু specific instructions-এর সাহায্যে। 8086 microprocessor তিনটি control flags provide করে:
- Trap Flag (TF): Trap flag set থাকলে processor পুরো program একবারে execute করবে, আর trap flag reset থাকলে program step-by-step sequence-এ execute হবে।
- Interrupt Flag (IF): Maskable interrupt enabled থাকলে এই flag set হয়, আর maskable interrupt disabled থাকলে reset হয়।
- Direction Flag (DF): Bits higher memory address থেকে lower memory address-এ access হলে এই flag set হয়, আর lower memory address থেকে higher memory address-এ access হলে reset হয়।
(a) General Purpose Registers
The 8085 has six general-purpose registers to store 8-bit data. These are identified as B, C, D, E, H, and L. These can be combined as register pairs — BC, DE, and HL — to perform some 16-bit operations. These registers are used to store or copy temporary data, by using instructions, during the execution of the program.
(b) Specific Purpose Registers
- Accumulator: The accumulator is an 8-bit register that is part of the arithmetic and logical unit (ALU). After performing arithmetical or logical operations, the result is stored in the accumulator. The accumulator is also defined as register A.
The flag register is a special purpose register and it is completely different from other registers in the microprocessor. It consists of 8 bits and only 5 of them are useful. The other three are left vacant and are used in future Intel versions. These 5 flags are set or reset after an operation according to the data condition of the result in the accumulator and other registers. When the value of a flag is 1, it is said to be set. When the value is 0, it is said to be reset.
- Sign Flag: It occupies the seventh bit of the flag register, which is also known as the most significant bit. It helps the programmer know whether the number stored in the accumulator is positive or negative. If the sign flag is set, the number is negative. If reset, the number is positive.
- Zero Flag: It occupies the sixth bit of the flag register. It is set when the operation performed in the ALU results in zero (all 8 bits are zero), otherwise it is reset. It helps in determining if two numbers are equal or not.
- Auxiliary Carry Flag: It occupies the fourth bit of the flag register. In an arithmetic operation, when a carry is generated by the third bit and passed on to the fourth bit, the Auxiliary Carry flag is set. If not, the flag is reset. This flag is used internally for BCD (Binary-Coded Decimal) operations. This is the only flag register in 8085 which is not accessible by the user.
- Parity Flag: It occupies the second bit of the flag register. This flag tests for the number of 1’s in the accumulator. If the accumulator holds an even number of 1’s, then this flag is set and it is said to be even parity. If the number of 1’s is odd, then it is reset and it is said to be odd parity.
- Carry Flag: It occupies the
Addressing modes of Microprocessor
Addressing Modes are techniques used by the CPU to identify the location of the operand(s) needed for executing an instruction. They provide rules for interpreting the address field in an instruction, helping the CPU fetch operands correctly.
- Opcode – Tells the CPU what operation to perform (e.g., ADD, MOV).
- Operands – The data or addresses on which the operation is performed.
Types of Addressing Modes
1. Implicit (Implied) Addressing
2. Immediate Addressing
3. Direct Addressing
4. Indirect Addressing
5. Register Addressing
6. Register Indirect Addressing
7. Displacement Addressing (Indexed, Base-Register, Relative)
8. Stack Addressing
1. Implicit (Implied) Addressing
The instruction does not mention the operand directly. The CPU knows what to use from the instruction itself, usually a special register like the accumulator or the stack.
Used for special instructions or control commands like CLA, PUSH, and RET, where the operand is automatically known from the instruction itself.
2. Immediate Addressing
The operand is part of the instruction itself. Used when the value is known while writing the program.
Example: MOV R1, #5 moves the value 5 into register R1, where #5 is the immediate value.

3. Direct Addressing
The instruction contains the memory address of the operand. The CPU accesses the data directly from that address.
Example: LOAD R1, 1000 loads data from memory address 1000 into register R1.

4. Indirect Addressing
The instruction contains the address of a memory location, which itself stores the actual address of the operand. The CPU first accesses this memory location to get the effective address, and then fetches the operand.
Example: LOAD R1, (A) loads data from the memory location whose address is stored at memory location A.
5. Register Addressing
The operand is located in a CPU register specified by the instruction.
Step: The instruction specifies a register (R). The CPU takes operand directly from register R.
Example: MOV A, B copies data from register B to register A.

6. Register Indirect Addressing
The register specified in the instruction contains the memory address of the operand.
Steps: The instruction specifies a register → The register holds the memory address → The CPU accesses that memory location to fetch the operand.
Example: LOAD R1, (R2) loads data from the memory location whose address is stored in register R2.

7. Displacement Addressing (Indexed, Base-Register, Relative)
The operand’s effective address is calculated by adding a constant value (displacement) to the contents of one or more registers.
Step: The instruction provides a base register (R) and an address part (A) → CPU adds the value of R and A to get the effective operand address → Operand is fetched from the calculated address in memory.
Example: Used for arrays, accessing an element at a position relative to a base.
8. Stack Addressing
The operand is implicitly taken from the top of the stack, without being mentioned in the instruction.
Step: Operation is performed using the value at the stack’s top (implied by instruction). No need for explicit operand field; CPU refers to stack pointer register by default.
Example: POP and PUSH operations.

The different ways in which a source operand is denoted in an instruction is known as addressing modes. There are 8 different addressing modes in 8086 programming:
1 . Immediate Addressing Mode
The addressing mode in which the data operand is a part of the instruction itself is known as immediate addressing mode.
Example: MOV CX, 4929H — The hexadecimal value 4929H is moved directly into register CX.
Example: ADD AX, 2387H — The value 2387H is added to the contents of register AX.
Example: MOV AL, FFH — The value FFH is moved into register AL.
Explanation: The data is embedded within the instruction itself. No memory or register lookup is needed. The CPU directly uses the constant value provided.
2. Register Addressing Mode
It means that the register is the source of an operand for an instruction.
Example: MOV CX, AX — Copies the contents of the 16-bit AX register into the 16-bit CX register.
Example: ADD BX, AX — Adds the contents of register AX to register BX and stores the result in BX.
Explanation: Both source and destination are CPU registers. The operation is fast because no memory access is required. If AX = 1234H, after MOV CX, AX, CX = 1234H.
3. Direct Addressing Mode
The addressing mode in which the effective address of the memory location is written directly in the instruction.
Example: MOV AX, [1592H] — Moves the data from memory address 1592H into register AX.
Example: MOV AL, [0300H] — Moves the data from memory address 0300H into register AL.
Explanation: The instruction contains the full 16-bit memory address inside square brackets. The CPU accesses that exact memory location to fetch the operand. DS (Data Segment) register is used as the default segment.
4. Register Indirect Addressing Mode
This addressing mode allows data to be addressed at any memory location through an offset address held in any of the following registers: BP, BX, DI, and SI.
Example: MOV AX, [BX] — Suppose register BX contains 4895H, then the contents at memory address 4895H are moved to AX.
Example: ADD CX, [BX] — Adds the data at memory address pointed by BX to register CX.
Explanation: The register holds a memory address, not the actual data. The CPU first reads the register to get the address, then goes to that memory location to fetch the operand. If BX = 4895H and memory 4895H contains 7A3BH, then AX = 7A3BH.
5. Based Addressing Mode
In this addressing mode, the offset address of the operand is given by the sum of contents of the BX/BP registers and 8-bit/16-bit displacement.
Example: MOV DX, [BX+04] — The effective address is BX + 04H. Data from that memory address is moved to DX.
Example: ADD CL, [BX+08] — Adds data from memory address (BX + 08H) to register CL.
Explanation: The base register (BX or BP) provides a starting address, and a fixed displacement is added to calculate the final memory address. If BX = 2000H, then effective address for [BX+04] is 2004H. Useful for accessing structure fields or array elements with fixed offsets.
6. Indexed Addressing Mode
In this addressing mode, the operand’s offset address is found by adding the contents of SI or DI register and 8-bit/16-bit displacements.
Example: MOV BX, [SI+16] — The effective address is SI + 16. Data from that memory address is moved to BX.
Example: ADD AL, [DI+16] — Adds data from memory address (DI + 16) to register AL.
Explanation: The index register (SI or DI) holds a variable offset, and a constant displacement is added. If SI = 1000H, then effective address for [SI+16] is 1010H. Commonly used for array processing where SI/DI acts as the array index.
7. Based-Index Addressing Mode
In this addressing mode, the offset address of the operand is computed by summing the base register to the contents of an index register.
Example: ADD CX, [BX+SI] — The effective address is BX + SI. Data from that memory address is added to CX.
Example: MOV AX, [BX+DI] — The effective address is BX + DI. Data from that memory address is moved to AX.
Explanation: Combines a base register (BX/BP) and an index register (SI/DI). Both are variable values. If BX = 2000H and SI = 0100H, then effective address is 2100H. Ideal for two-dimensional arrays or tables where base points to the start and index points to the element.
8. Based Indexed with Displacement Mode
In this addressing mode, the operand’s offset is computed by adding the base register contents, an index register’s contents, and 8-bit or 16-bit displacement.
Example: MOV AX, [BX+DI+08] — The effective address is BX + DI + 08H. Data from that memory address is moved to AX.
Example: ADD CX, [BX+SI+16] — The effective address is BX + SI + 16. Data from that memory address is added to CX.
Explanation: This is the most flexible mode combining base register, index register, and a fixed displacement. If BX = 2000H, SI = 0100H, and displacement is 08H, then effective address is 2108H. Used for accessing complex data structures like records within arrays or structures with multiple fields.
Addressing modes in 8085 are instructions used to transfer data from one register to another register, from memory to register, and from register to memory without any alteration in the content. Addressing modes in 8085 are classified into 5 groups:
1. Immediate Addressing Mode
In this mode, the 8-bit or 16-bit data is specified in the instruction itself as one of its operands.
Example: MVI K, 20H — The hexadecimal value 20H is copied directly into register K.
Explanation: The data 20H is part of the instruction. No memory access is needed. The CPU directly puts 20H into register K.
2. Register Addressing Mode
In this mode, the data is copied from one register to another register.
Example: MOV K, B — The data stored in register B is copied to register K.
Explanation: Both source and destination are CPU registers. No memory is involved. If B = 35H, then after execution, K = 35H also.
3. Direct Addressing Mode
In this mode, the data is directly copied from the given memory address to the register.
Example: LDA 5000H — The data stored at memory address 5000H is loaded into accumulator A.
Explanation: The instruction contains the full 16-bit memory address (5000H). The CPU goes to that exact memory location and fetches the data into accumulator A.
4. Indirect Addressing Mode
In this mode, the data is transferred from memory to register by using the address pointed by a register pair.
Example: MOV K, M — Data is transferred from the memory address pointed by register pair HL to register K.
Explanation: The HL register pair holds a memory address. The CPU first reads HL to find the address, then goes to that memory location to fetch the data into register K. If HL = 2050H and memory location 2050H contains 7AH, then K = 7AH.
5. Implied (Implicit) Addressing Mode
This mode does not require any operand; the data is specified by the opcode itself.
Example: CMA — Complement the contents of accumulator A.
Explanation: The instruction CMA does not mention any register or memory address. The CPU automatically knows it must work on the accumulator A. If A = 1010 1100, after CMA, A = 0101 0011 (all bits are inverted).
Another Example: STC — Set Carry flag to 1. No operand needed. The CPU directly sets the carry flag in the flag register.




