SlideShare a Scribd company logo
WACHEMO UNIVERSITY
DURAME CAMPUS
Compiled by Selamu S.
COLLEGE OF ENGINEERING AND TECHNOLOGY
SCHOOL OF COMPUTING AND INFORMATICS
DEPARTMENT OF COMPUTER SCIENCE
INTRODUCTION TO MICROPROCESSOR
10/26/2024 Introduction to Microprocessor 2
LECTURE_1
INTRODUCTION TO MICROPROCESSOR
Microprocessor
 Microprocessor is a multipurpose programmable device that reads binary (instruction/data) as input
and processes data according to these instructions and produces results as output.
 Microprocessor is a digital device on a chip which can fetch instructions from a memory, decode and
execute them i.e. performs certain arithmetic and logical operations, accept data from input device,
and send results to output devices.
 Therefore, a microprocessor interfaced with memory and Input/Output devices forms a
Microcomputer.
 Microcomputer is a computer having microprocessor as CPU.
 Microprocessor is a single chip containing all units of CPU.
10/26/2024 Introduction to Microprocessor 3
Basically, there are five building blocks of a digital computer
 Through this unit data and instructions are fed to the memory of the computer.
 The basic purpose of this unit is to read the data into the machine.
 The program from the memory is read into the machine along with the input data which are
required to solve or compute the problem by the machine.
 The typical devices which are used for this purpose are keyboards, paper tape reader and
toggle switches etc.
10/26/2024 Introduction to Microprocessor 4
Input Unit
Memory Unit
 The memory unit of a digital computer consists of devices which are capable of storing
information.
 The memory of a computer is used for storing two distinct type of information such as data to
be processed by the computer and program through which the result of the desired problem is
obtained.
 Computer program and data are stored in the Memory Unit.
 This usually consists of chips of both ROMs (Read Only Memories) and RAMs (Random
Access Memories).
10/26/2024 Introduction to Microprocessor 5
Arithmetic and Logical Unit (ALU)
 This unit is used for performing arithmetic operations such as Addition, Subtraction, Multiplications,
division and other logical operations on the data.
 The control unit guides ALU which of the operations are to be performed.
 The sequence of the instructions is controlled by the control unit.
10/26/2024 Introduction to Microprocessor 6
 The control unit performs the most important function in a computer.
 It controls all other units and also controls the flow of data from one unit to another for performing
computations.
 It also sequences the operations.
 It instructs all the units to perform the task in a particular sequence with the help of clock pulses.
Control Unit
Output Unit
 After processing of the data in the Arithmetic and Logical Unit, the results are displayed to the output
world through this unit.
 The CRTs (Cathode Ray Tubes), LEDs (Light Emitting Diodes) and Printer etc. form the output unit.
10/26/2024 Introduction to Microprocessor 7
 The CPU is analogous to the human brain as all the decisions as per the instructions are made by
CPU.
 All other parts are also controlled by this unit.
 A microprocessor is an integrated circuit designed for use as Central Processing Unit of a computer.
 The CPU is the primary and central player in communicating with devices such as memory, input and
output.
 However, the timing of communication process is controlled by the group of circuits called CU.
Central Processing Unit (CPU)
General Architecture of Microcomputer System
 The term microcomputer is used to describe a system that includes a microprocessor,
program memory, data memory, and an input/output (I/O).
 A microcomputer system can be anything from a large computer system having hard disks,
floppy disks and printers, to single chip computer systems.
 We are going to consider only the type of microcomputers that consist of a single silicon
chip.
 Such microcomputer systems are also called microcontrollers.
 Microcontroller is a single chip consisting of MPU, memory, I/O and interfacing circuits.
10/26/2024 Introduction to Microprocessor 8
Cont…;
 A microcomputer is a device which must be capable of:-
1) Receiving input (data and instructions)
2) Performing computations (arithmetic and logical)
3) Storing data and instructions
4) Displaying the results of any computations, and
5) Controlling all the devices that perform the above mentioned four tasks (directly or
indirectly)
10/26/2024 Introduction to Microprocessor 9
Cont…;
10/26/2024 Introduction to Microprocessor 10
 It is clock driven semiconductor device consisting of electronic logic circuits manufactured by using
either a large scale integration (LSI) or very large scale integration (VLSI) technique.
 It is capable of performing various computing functions and making decisions to change the sequence
of program execution.
Microprocessor:-
Cont…;
 Arithmetic/Logic Unit:-
It performs arithmetic operations as addition and subtraction and logic operations as AND,
OR & XOR.
 Register Array:-
The registers are primarily used to store data temporarily during the execution of a
program and are accessible to the user through instruction.
The registers can be identified by letters such as B, C, D, E, H and L.
 Control Unit:-
It provides the necessary timing and control signals to all the operations in the
microcomputer.
It controls the flow of data between the microprocessor and memory & peripherals.
10/26/2024 Introduction to Microprocessor 11
Memory:-
 Memory stores binary information such as instructions and data, and provides that
information to the up whenever necessary.
 To execute programs, the microprocessor reads instructions and data from memory and
performs the computing operations in its ALU.
 Results are either transferred to the output section for display/ stored in memory for later use.
 Memory has two sections.
 Read only Memory (ROM):- Used to store programs that do not need alterations and can
only read.
 Read/Write Memory (RAM):- Also known as user memory which is used to store user
programs and data. The information stored in this memory can be easily read and altered.
10/26/2024 Introduction to Microprocessor 12
Input/Output:-
 It communicates with the outside world using two devices input and output which are also
Known as peripherals.
 The input device such as keyboard, switches, and analog to digital converter transfer binary
information from outside world to the microprocessor.
 The output devices transfer data from the microprocessor to the outside world. They include
the devices such as LED, CRT, digital to analog converter, printer etc.
10/26/2024 Introduction to Microprocessor 13
System Bus:-
 It is a communication path between the microprocessor and peripherals; it is nothing but a
group of wires to carry bits.
 Bus is a common channel through which bits from any sources can be transferred to the
destination.
 The microprocessor transmits the address of the device (or a memory location) that needs to be
accessed on the address bus.
 The data bus is used by the processor to send and receive data to and from different devices.
 Notice that the data bus is bidirectional whereas the address basis unidirectional.
 The control bus is used for transmitting and receiving control signals between the μP and
various devices.
10/26/2024 Introduction to Microprocessor 14
Basic Microprocessor System
 The Microprocessor alone does not serve any useful purpose unless it is supported by memory and I/O
ports.
 The combination of memory and I/O ports with microprocessor is known as microprocessor based
system.
 As discussed above the microprocessor which is the central processing unit executes the program stored
in the memory and transfer data to and from the outside world through I/O ports.
 The microprocessor is interconnected with memory and I/O ports by the data bus, the Address bus and
the control bus.
 A bus is basically a communication link between the processing unit and the peripheral devices as
shown in figure below.
10/26/2024 Introduction to Microprocessor 15
10/26/2024 Introduction to Microprocessor 16
Address Bus
10/26/2024 Introduction to Microprocessor 17
 The address bus is unidirectional and is to be used by the CPU to send out address of the memory
location to be accessed.
 It is also used by the CPU to select a particular input or output port.
 It may consist of 8, 12, 16, 20 or even more number of parallel lines.
 Number of bits in the address bus determines the minimum number of bytes of data in the memory
that can be accessed.
 A 16-bit address bus for instance can access 216 bytes of data.
 It is labeled as A0…………An-1, where n is the width of bits of the address bus.
Data Bus
 Data bus is bidirectional, that is, data flow occurs both to and from CPU and peripherals.
 There is an internal data bus which may not be of the same width as the external data bus by
that connects the I/O and memory.
 A microprocessor is characterized by the width of its data bus.
 All those microprocessors having internal and external data buses of different widths are
characterized either by their internal or external data buses.
 The size of the internal data bus determines the largest number that can be processed by a
microprocessor, for instance, having a 16-bit internal data bus is 65536 (64K).
10/26/2024 Introduction to Microprocessor 18
Control bus
 Control bus contains a number of individual lines carrying synchronizing signals.
 The control bus sends out control signal to memory, I/O ports and other peripheral devices to
ensure proper operation.
 It carries control signals like MEMORY READ, MEMORY WRITE, READ INPUT PORT,
WRITE OUTPUT PORT, HOLD, INTERRUPT etc.
 For instance, if it is desired to read the contents of a particular memory location, the CPU first
sends out address of that very location on the address bus and a ‘Memory Read’ control signal
on the control bus.
 The memory responds by outputting data stored in the addressed memory location on the data
bus.
10/26/2024 Introduction to Microprocessor 19
Working of Microprocessor
 Microcomputer acts as a CPU in a microcomputer.
 Microprocessor is the brain of the machine.
 A microprocessor is a device, which is capable of
1) Fetching the data
2) Decoding the data
3) Executing the data
10/26/2024 Introduction to Microprocessor 20
Review of the basic number systems and conversion between different number systems
Basic Number System
Data and instructions are stored in a microcomputer using the binary digits 0 and 1.
Data could be various types, numbers and characters.
We know that in hexadecimal number system, the decimal digits 0 to 9 are used for forming
unsigned numbers.
However, a microprocessor uses the binary digits 0 and 1, and stores and manipulates the
numbers using the binary number system.
10/26/2024 Introduction to Microprocessor 21
Binary Number System
 A number system that uses only two digits, 0 and 1 to represent any number is called binary number
system.
 The two symbols 0 and 1 are known as bits (binary digits).
 Binary number system has a base of two.
 The weight or place value of each position can be expressed in terms of 2, and as 20
, 21
, 22
etc. The
least significant digit has a weight of 20
(=1).
 The second position to the left of the least significant digit is multiplied by 21
(=2).
 The third position has weight equal to 22
(=4).
 Thus, the weights are in the ascending power of 2 or 1, 2, 4, 8, 16, 32, 64, etc.
 The numeral 10two (one, zero, base two) stands for two, the base of system.
 In binary counting, single digits are used for none and one. Two-digit numbers are used for 10two and
11two (2 and 3 in decimal numerals).
10/26/2024 Introduction to Microprocessor 22
Decimal Number System
 In decimal number system, there are ten distinct symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
 These symbols are used to form numbers.
 These symbols are known as digits.
 The decimal number system has a base or radix of 10.
 Each of the ten decimal digits 0 through 9 has a place value or weight depending on its
position.
 The weights are units, tens, hundreds and so on.
 Any combination of these ten digits together with a plus or minus sign appended at the left is a
valid integer in this number system.
10/26/2024 Introduction to Microprocessor 23
Octal Number System
 The octal number system was used extensively by early minicomputers.
 However, for both large and small systems, it has largely been supplanted by the hexadecimal system.
 Sets of 3 bit binary numbers can be represented by octal numbers and this can conveniently be used
for entire data in the computer.
 A number system that uses eight digits: 0, 1, 2, 3, 4, 5, 6 and 7 is called an octal number system.
 It has a base of eight.
 The digits, 0 through 7 have exactly the same physical meaning as decimal symbols.
10/26/2024 Introduction to Microprocessor 24
Hexadecimal Number System
 The hexadecimal number system has a base of 16.
 It has 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 plus the letters A, B, C, D, E and F.
Counting in Hexadecimal
 When counting in hex, each digit can be incremented from 0 to F. Once it reaches F, the next count
causes it to recycle to 0 and the next-higher digit is incremented.
 This is illustrated in the following counting sequences: 0038, 0039, 003A, 003B, 003C, 003D, 003E,
003F, 0040; 06B8, 06B9, 06BA, 06BB, 06BC, 06BD, 06BE, 06BF, 06C0, 06C1.
10/26/2024 Introduction to Microprocessor 25
Conversion of Number
10/26/2024 Introduction to Microprocessor 26
Octal to Decimal Conversion
 An octal number can be easily converted to its decimal equivalent by multiplying each octal digit by its
positional weight.
10/26/2024 Introduction to Microprocessor 27
 The fractional part can be converted into decimal by multiplying it by the negative powers of 8 as
shown in the next example.
10/26/2024 Introduction to Microprocessor 28
Class Activity
Convert (1505)8 to its decimal
Decimal to Octal Conversion
 The methods used for converting a decimal number to its octal equivalent are the same as those
used to convert from decimal to binary.
 To convert a decimal number to octal, we progressively divide the decimal number by 8,
writing down the remainders after each division.
 This process is continued until zero is obtained as the quotient, the first remainder being the
LSD.
 The fractional part is multiplied by 8 to get a carry and a fraction.
 The new fraction obtained is again multiplied by 8 to get a new carry and a new fraction.
10/26/2024 Introduction to Microprocessor 29
10/26/2024 Introduction to Microprocessor 30
Example 1 Convert [416.12]10 to octal
Octal to Binary Conversion
10/26/2024 Introduction to Microprocessor 31
 Since 8 is the third power of 2, we can convert each octal digit into its three-bit binary form and from
binary to octal form.
 All three-bit binary numbers are required to represent the eight octal digits of the octal form.
 The octal number system is often used in digital systems, especially for input/output applications.
 Each octal digit that is represented by three-bits as shown in Table below.
Example 1 Convert [675]8 to binary Example 2 Convert [246.71]8 to binary
Binary to Octal Conversion
The simplest procedure is to use binary-triplet method.
The binary digits are grouped into groups of three on each side of the
binary point with zeros added on either side if needed to complete a
group of three.
Then, each group of three bits is converted to its octal equivalent.
Note that the highest digit in the octal system is 7.
10/26/2024 Introduction to Microprocessor 32
10/26/2024 Introduction to Microprocessor 33
Example 1 Convert [11001.101011]2 to octal
Example 2 Convert [11101.101101]2 to octal
10/26/2024 Introduction to Microprocessor 34
 Hexadecimal numbers can be converted into binary numbers by converting each hexadecimal
digit to 4-bit binary equivalent.
 If the hexadecimal digit is 3, it should not be represented by two bits [11]2, but it should be
represented by four bits as [0011]2.
Hexadecimal to Binary Conversion
Example 1 Convert [2AB.81]16 to binary
10/26/2024 Introduction to Microprocessor 35
 Conversion from binary to hexadecimal is easily accomplished by partitioning the binary number into
groups of four binary digits, starting from the binary point to the left and to the right.
 It may be necessary to add zero to the last group, if it does not end in exactly four bits.
 Each group of 4-bits binary must be represented by its hexadecimal equivalent.
Binary to Hexadecimal Conversion
Example 1 Convert [111101110111.111011]2 to hexadecimal number
 The conversion between hexadecimal and binary is done in exactly the same manner as octal and
binary, except that groups of 4 bits are used.
10/26/2024 Introduction to Microprocessor 36
Example 2 Convert [2AB.8]H to decimal number
Decimal to Hexadecimal Conversion
10/26/2024 Introduction to Microprocessor 37
 One way to convert from decimal to hexadecimal is the hex dabble.
 The conversion is done in a similar fashion as in the case of binary and octal, taking the factor for
division and multiplication as 16.
 Any decimal integer number can be converted to hex successively dividing by 16 until zero is obtained
in the quotient.
 The remainders can then be written from bottom to top to obtain the hexadecimal results.
 The fractional part of the decimal number is converted to hexadecimal number by multiplying it by 16
and writing down the carry and the fraction separately.
 This process is continued until the fraction is reduced to zero or the required number of significant bits
is obtained.
ASSIGNMENT(10%)
1. Write a short note for the Evolution of Intel microprocessors.
2. Write a brief explanation for CISC and RISC in case of Microprocessors.
3. Briefly discuss about the Architectural Compatibility Microprocessors
4. Hardware and Software Microprocessors
10/26/2024 Introduction to Microprocessor 38
10/26/2024 Introduction to Microprocessor 39

More Related Content

Similar to LECTURE_1 Introduction to MLP.pptx of ml (20)

PPT
Microprocessor Based Systems.ppt
TALHARIAZ46
 
PPTX
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
sruti009988
 
PPT
Microprocessor
Embeddedbvp
 
PPT
Introduction to-microprocessor
ankitnav1
 
PPT
Introduction to-microprocessor
ankitnav1
 
PDF
Unit 1. introduction
Kiran Bagale
 
PPT
Lec MC.ppt
nodov66591
 
PPT
Lec 1 Intro to mp.ppt
USMANMALIK57656
 
PDF
U proc ovw
Brit4
 
PPT
Lec 1 Intro to mp.ppt
aditya938236
 
PPT
Lec 1 Intro to mp.ppt
VikasMahor3
 
PPT
Lec 1 Intro to mp.ppt
SwamyNallabelli1
 
PPT
Lec 1 intro to mp
ssuser7590da
 
PPT
Deep Dive with Microprocessors for Embedded.ppt
ManishTomar79
 
PDF
Microcontroller part 1
Keroles karam khalil
 
PDF
Microprocessor note
alokbhatta
 
PPTX
Lec 1 Intro to mp.pptx MICROPROCESSOR & MICROCONTROLLER
varshasrivastava38
 
PPTX
What is microprocessor
Dnyaneshwar Beedkar
 
PPTX
4CS3-MPI-Unit-1.pptx
Lofi19
 
PPTX
introduction of microprocessor
Reetika Singh
 
Microprocessor Based Systems.ppt
TALHARIAZ46
 
8085 Microprocessor - Ramesh Gaonkar.pdf-27 (1).pptx
sruti009988
 
Microprocessor
Embeddedbvp
 
Introduction to-microprocessor
ankitnav1
 
Introduction to-microprocessor
ankitnav1
 
Unit 1. introduction
Kiran Bagale
 
Lec MC.ppt
nodov66591
 
Lec 1 Intro to mp.ppt
USMANMALIK57656
 
U proc ovw
Brit4
 
Lec 1 Intro to mp.ppt
aditya938236
 
Lec 1 Intro to mp.ppt
VikasMahor3
 
Lec 1 Intro to mp.ppt
SwamyNallabelli1
 
Lec 1 intro to mp
ssuser7590da
 
Deep Dive with Microprocessors for Embedded.ppt
ManishTomar79
 
Microcontroller part 1
Keroles karam khalil
 
Microprocessor note
alokbhatta
 
Lec 1 Intro to mp.pptx MICROPROCESSOR & MICROCONTROLLER
varshasrivastava38
 
What is microprocessor
Dnyaneshwar Beedkar
 
4CS3-MPI-Unit-1.pptx
Lofi19
 
introduction of microprocessor
Reetika Singh
 

More from BifaHirpo1 (11)

PPTX
Chapter 1.pptx okokkokokokokkkkhvgvgcvghgcvghg
BifaHirpo1
 
PPTX
LECTURE_5 Program Control Instructions.pptx
BifaHirpo1
 
PPTX
LECTURE_7 Interface.pptx of what you wants
BifaHirpo1
 
PPTX
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
BifaHirpo1
 
PPTX
CHAPTER 5.pptx of the following of our discussion
BifaHirpo1
 
PPT
boolean_algebra.ppt of all of us and the family will not even have to worry
BifaHirpo1
 
PPTX
LECTURE_2 Architecture of 8086 Microprocokessor.pptx
BifaHirpo1
 
PDF
Abel ASSEMBLY LANGUGE. Of which used for educational purposes
BifaHirpo1
 
PPTX
Chapter 1 Data structure _Algorithms.pptx
BifaHirpo1
 
PPTX
CHAPTER THREE of Knowledge management framework for the project management sy...
BifaHirpo1
 
PPTX
ARTIFICIAL INTELLIGENCE TO GENERATE BEST COMPILER DESIGN
BifaHirpo1
 
Chapter 1.pptx okokkokokokokkkkhvgvgcvghgcvghg
BifaHirpo1
 
LECTURE_5 Program Control Instructions.pptx
BifaHirpo1
 
LECTURE_7 Interface.pptx of what you wants
BifaHirpo1
 
CHAPTER 1 AI.pptx of articles will be ofhcvxzz
BifaHirpo1
 
CHAPTER 5.pptx of the following of our discussion
BifaHirpo1
 
boolean_algebra.ppt of all of us and the family will not even have to worry
BifaHirpo1
 
LECTURE_2 Architecture of 8086 Microprocokessor.pptx
BifaHirpo1
 
Abel ASSEMBLY LANGUGE. Of which used for educational purposes
BifaHirpo1
 
Chapter 1 Data structure _Algorithms.pptx
BifaHirpo1
 
CHAPTER THREE of Knowledge management framework for the project management sy...
BifaHirpo1
 
ARTIFICIAL INTELLIGENCE TO GENERATE BEST COMPILER DESIGN
BifaHirpo1
 
Ad

Recently uploaded (20)

PPTX
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
 
PDF
Cooperative wireless communications 1st Edition Yan Zhang
jsphyftmkb123
 
PPTX
Practice Gardens and Polytechnic Education: Utilizing Nature in 1950s’ Hu...
Lajos Somogyvári
 
PPTX
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
PDF
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
PDF
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
PPTX
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
PPTX
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
PPTX
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
PDF
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.06.25.pdf
TechSoup
 
PDF
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
PPTX
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
PPTX
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
PPTX
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
ESP 10 Edukasyon sa Pagpapakatao PowerPoint Lessons Quarter 1.pptx
Sir J.
 
Cooperative wireless communications 1st Edition Yan Zhang
jsphyftmkb123
 
Practice Gardens and Polytechnic Education: Utilizing Nature in 1950s’ Hu...
Lajos Somogyvári
 
PLANNING A HOSPITAL AND NURSING UNIT.pptx
PRADEEP ABOTHU
 
Free eBook ~100 Common English Proverbs (ebook) pdf.pdf
OH TEIK BIN
 
Nanotechnology and Functional Foods Effective Delivery of Bioactive Ingredien...
rmswlwcxai8321
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
TLE 8 QUARTER 1 MODULE WEEK 1 MATATAG CURRICULUM
denniseraya1997
 
The Gift of the Magi by O Henry-A Story of True Love, Sacrifice, and Selfless...
Beena E S
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
How to Setup Automatic Reordering Rule in Odoo 18 Inventory
Celine George
 
TechSoup Microsoft Copilot Nonprofit Use Cases and Live Demo - 2025.06.25.pdf
TechSoup
 
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
Natural Language processing using nltk.pptx
Ramakrishna Reddy Bijjam
 
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
How to Manage Wins & Losses in Odoo 18 CRM
Celine George
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
Ad

LECTURE_1 Introduction to MLP.pptx of ml

  • 1. WACHEMO UNIVERSITY DURAME CAMPUS Compiled by Selamu S. COLLEGE OF ENGINEERING AND TECHNOLOGY SCHOOL OF COMPUTING AND INFORMATICS DEPARTMENT OF COMPUTER SCIENCE INTRODUCTION TO MICROPROCESSOR
  • 2. 10/26/2024 Introduction to Microprocessor 2 LECTURE_1 INTRODUCTION TO MICROPROCESSOR
  • 3. Microprocessor  Microprocessor is a multipurpose programmable device that reads binary (instruction/data) as input and processes data according to these instructions and produces results as output.  Microprocessor is a digital device on a chip which can fetch instructions from a memory, decode and execute them i.e. performs certain arithmetic and logical operations, accept data from input device, and send results to output devices.  Therefore, a microprocessor interfaced with memory and Input/Output devices forms a Microcomputer.  Microcomputer is a computer having microprocessor as CPU.  Microprocessor is a single chip containing all units of CPU. 10/26/2024 Introduction to Microprocessor 3
  • 4. Basically, there are five building blocks of a digital computer  Through this unit data and instructions are fed to the memory of the computer.  The basic purpose of this unit is to read the data into the machine.  The program from the memory is read into the machine along with the input data which are required to solve or compute the problem by the machine.  The typical devices which are used for this purpose are keyboards, paper tape reader and toggle switches etc. 10/26/2024 Introduction to Microprocessor 4 Input Unit
  • 5. Memory Unit  The memory unit of a digital computer consists of devices which are capable of storing information.  The memory of a computer is used for storing two distinct type of information such as data to be processed by the computer and program through which the result of the desired problem is obtained.  Computer program and data are stored in the Memory Unit.  This usually consists of chips of both ROMs (Read Only Memories) and RAMs (Random Access Memories). 10/26/2024 Introduction to Microprocessor 5
  • 6. Arithmetic and Logical Unit (ALU)  This unit is used for performing arithmetic operations such as Addition, Subtraction, Multiplications, division and other logical operations on the data.  The control unit guides ALU which of the operations are to be performed.  The sequence of the instructions is controlled by the control unit. 10/26/2024 Introduction to Microprocessor 6  The control unit performs the most important function in a computer.  It controls all other units and also controls the flow of data from one unit to another for performing computations.  It also sequences the operations.  It instructs all the units to perform the task in a particular sequence with the help of clock pulses. Control Unit
  • 7. Output Unit  After processing of the data in the Arithmetic and Logical Unit, the results are displayed to the output world through this unit.  The CRTs (Cathode Ray Tubes), LEDs (Light Emitting Diodes) and Printer etc. form the output unit. 10/26/2024 Introduction to Microprocessor 7  The CPU is analogous to the human brain as all the decisions as per the instructions are made by CPU.  All other parts are also controlled by this unit.  A microprocessor is an integrated circuit designed for use as Central Processing Unit of a computer.  The CPU is the primary and central player in communicating with devices such as memory, input and output.  However, the timing of communication process is controlled by the group of circuits called CU. Central Processing Unit (CPU)
  • 8. General Architecture of Microcomputer System  The term microcomputer is used to describe a system that includes a microprocessor, program memory, data memory, and an input/output (I/O).  A microcomputer system can be anything from a large computer system having hard disks, floppy disks and printers, to single chip computer systems.  We are going to consider only the type of microcomputers that consist of a single silicon chip.  Such microcomputer systems are also called microcontrollers.  Microcontroller is a single chip consisting of MPU, memory, I/O and interfacing circuits. 10/26/2024 Introduction to Microprocessor 8
  • 9. Cont…;  A microcomputer is a device which must be capable of:- 1) Receiving input (data and instructions) 2) Performing computations (arithmetic and logical) 3) Storing data and instructions 4) Displaying the results of any computations, and 5) Controlling all the devices that perform the above mentioned four tasks (directly or indirectly) 10/26/2024 Introduction to Microprocessor 9
  • 10. Cont…; 10/26/2024 Introduction to Microprocessor 10  It is clock driven semiconductor device consisting of electronic logic circuits manufactured by using either a large scale integration (LSI) or very large scale integration (VLSI) technique.  It is capable of performing various computing functions and making decisions to change the sequence of program execution. Microprocessor:-
  • 11. Cont…;  Arithmetic/Logic Unit:- It performs arithmetic operations as addition and subtraction and logic operations as AND, OR & XOR.  Register Array:- The registers are primarily used to store data temporarily during the execution of a program and are accessible to the user through instruction. The registers can be identified by letters such as B, C, D, E, H and L.  Control Unit:- It provides the necessary timing and control signals to all the operations in the microcomputer. It controls the flow of data between the microprocessor and memory & peripherals. 10/26/2024 Introduction to Microprocessor 11
  • 12. Memory:-  Memory stores binary information such as instructions and data, and provides that information to the up whenever necessary.  To execute programs, the microprocessor reads instructions and data from memory and performs the computing operations in its ALU.  Results are either transferred to the output section for display/ stored in memory for later use.  Memory has two sections.  Read only Memory (ROM):- Used to store programs that do not need alterations and can only read.  Read/Write Memory (RAM):- Also known as user memory which is used to store user programs and data. The information stored in this memory can be easily read and altered. 10/26/2024 Introduction to Microprocessor 12
  • 13. Input/Output:-  It communicates with the outside world using two devices input and output which are also Known as peripherals.  The input device such as keyboard, switches, and analog to digital converter transfer binary information from outside world to the microprocessor.  The output devices transfer data from the microprocessor to the outside world. They include the devices such as LED, CRT, digital to analog converter, printer etc. 10/26/2024 Introduction to Microprocessor 13
  • 14. System Bus:-  It is a communication path between the microprocessor and peripherals; it is nothing but a group of wires to carry bits.  Bus is a common channel through which bits from any sources can be transferred to the destination.  The microprocessor transmits the address of the device (or a memory location) that needs to be accessed on the address bus.  The data bus is used by the processor to send and receive data to and from different devices.  Notice that the data bus is bidirectional whereas the address basis unidirectional.  The control bus is used for transmitting and receiving control signals between the μP and various devices. 10/26/2024 Introduction to Microprocessor 14
  • 15. Basic Microprocessor System  The Microprocessor alone does not serve any useful purpose unless it is supported by memory and I/O ports.  The combination of memory and I/O ports with microprocessor is known as microprocessor based system.  As discussed above the microprocessor which is the central processing unit executes the program stored in the memory and transfer data to and from the outside world through I/O ports.  The microprocessor is interconnected with memory and I/O ports by the data bus, the Address bus and the control bus.  A bus is basically a communication link between the processing unit and the peripheral devices as shown in figure below. 10/26/2024 Introduction to Microprocessor 15
  • 16. 10/26/2024 Introduction to Microprocessor 16
  • 17. Address Bus 10/26/2024 Introduction to Microprocessor 17  The address bus is unidirectional and is to be used by the CPU to send out address of the memory location to be accessed.  It is also used by the CPU to select a particular input or output port.  It may consist of 8, 12, 16, 20 or even more number of parallel lines.  Number of bits in the address bus determines the minimum number of bytes of data in the memory that can be accessed.  A 16-bit address bus for instance can access 216 bytes of data.  It is labeled as A0…………An-1, where n is the width of bits of the address bus.
  • 18. Data Bus  Data bus is bidirectional, that is, data flow occurs both to and from CPU and peripherals.  There is an internal data bus which may not be of the same width as the external data bus by that connects the I/O and memory.  A microprocessor is characterized by the width of its data bus.  All those microprocessors having internal and external data buses of different widths are characterized either by their internal or external data buses.  The size of the internal data bus determines the largest number that can be processed by a microprocessor, for instance, having a 16-bit internal data bus is 65536 (64K). 10/26/2024 Introduction to Microprocessor 18
  • 19. Control bus  Control bus contains a number of individual lines carrying synchronizing signals.  The control bus sends out control signal to memory, I/O ports and other peripheral devices to ensure proper operation.  It carries control signals like MEMORY READ, MEMORY WRITE, READ INPUT PORT, WRITE OUTPUT PORT, HOLD, INTERRUPT etc.  For instance, if it is desired to read the contents of a particular memory location, the CPU first sends out address of that very location on the address bus and a ‘Memory Read’ control signal on the control bus.  The memory responds by outputting data stored in the addressed memory location on the data bus. 10/26/2024 Introduction to Microprocessor 19
  • 20. Working of Microprocessor  Microcomputer acts as a CPU in a microcomputer.  Microprocessor is the brain of the machine.  A microprocessor is a device, which is capable of 1) Fetching the data 2) Decoding the data 3) Executing the data 10/26/2024 Introduction to Microprocessor 20
  • 21. Review of the basic number systems and conversion between different number systems Basic Number System Data and instructions are stored in a microcomputer using the binary digits 0 and 1. Data could be various types, numbers and characters. We know that in hexadecimal number system, the decimal digits 0 to 9 are used for forming unsigned numbers. However, a microprocessor uses the binary digits 0 and 1, and stores and manipulates the numbers using the binary number system. 10/26/2024 Introduction to Microprocessor 21
  • 22. Binary Number System  A number system that uses only two digits, 0 and 1 to represent any number is called binary number system.  The two symbols 0 and 1 are known as bits (binary digits).  Binary number system has a base of two.  The weight or place value of each position can be expressed in terms of 2, and as 20 , 21 , 22 etc. The least significant digit has a weight of 20 (=1).  The second position to the left of the least significant digit is multiplied by 21 (=2).  The third position has weight equal to 22 (=4).  Thus, the weights are in the ascending power of 2 or 1, 2, 4, 8, 16, 32, 64, etc.  The numeral 10two (one, zero, base two) stands for two, the base of system.  In binary counting, single digits are used for none and one. Two-digit numbers are used for 10two and 11two (2 and 3 in decimal numerals). 10/26/2024 Introduction to Microprocessor 22
  • 23. Decimal Number System  In decimal number system, there are ten distinct symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.  These symbols are used to form numbers.  These symbols are known as digits.  The decimal number system has a base or radix of 10.  Each of the ten decimal digits 0 through 9 has a place value or weight depending on its position.  The weights are units, tens, hundreds and so on.  Any combination of these ten digits together with a plus or minus sign appended at the left is a valid integer in this number system. 10/26/2024 Introduction to Microprocessor 23
  • 24. Octal Number System  The octal number system was used extensively by early minicomputers.  However, for both large and small systems, it has largely been supplanted by the hexadecimal system.  Sets of 3 bit binary numbers can be represented by octal numbers and this can conveniently be used for entire data in the computer.  A number system that uses eight digits: 0, 1, 2, 3, 4, 5, 6 and 7 is called an octal number system.  It has a base of eight.  The digits, 0 through 7 have exactly the same physical meaning as decimal symbols. 10/26/2024 Introduction to Microprocessor 24
  • 25. Hexadecimal Number System  The hexadecimal number system has a base of 16.  It has 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 plus the letters A, B, C, D, E and F. Counting in Hexadecimal  When counting in hex, each digit can be incremented from 0 to F. Once it reaches F, the next count causes it to recycle to 0 and the next-higher digit is incremented.  This is illustrated in the following counting sequences: 0038, 0039, 003A, 003B, 003C, 003D, 003E, 003F, 0040; 06B8, 06B9, 06BA, 06BB, 06BC, 06BD, 06BE, 06BF, 06C0, 06C1. 10/26/2024 Introduction to Microprocessor 25
  • 26. Conversion of Number 10/26/2024 Introduction to Microprocessor 26
  • 27. Octal to Decimal Conversion  An octal number can be easily converted to its decimal equivalent by multiplying each octal digit by its positional weight. 10/26/2024 Introduction to Microprocessor 27  The fractional part can be converted into decimal by multiplying it by the negative powers of 8 as shown in the next example.
  • 28. 10/26/2024 Introduction to Microprocessor 28 Class Activity Convert (1505)8 to its decimal
  • 29. Decimal to Octal Conversion  The methods used for converting a decimal number to its octal equivalent are the same as those used to convert from decimal to binary.  To convert a decimal number to octal, we progressively divide the decimal number by 8, writing down the remainders after each division.  This process is continued until zero is obtained as the quotient, the first remainder being the LSD.  The fractional part is multiplied by 8 to get a carry and a fraction.  The new fraction obtained is again multiplied by 8 to get a new carry and a new fraction. 10/26/2024 Introduction to Microprocessor 29
  • 30. 10/26/2024 Introduction to Microprocessor 30 Example 1 Convert [416.12]10 to octal
  • 31. Octal to Binary Conversion 10/26/2024 Introduction to Microprocessor 31  Since 8 is the third power of 2, we can convert each octal digit into its three-bit binary form and from binary to octal form.  All three-bit binary numbers are required to represent the eight octal digits of the octal form.  The octal number system is often used in digital systems, especially for input/output applications.  Each octal digit that is represented by three-bits as shown in Table below. Example 1 Convert [675]8 to binary Example 2 Convert [246.71]8 to binary
  • 32. Binary to Octal Conversion The simplest procedure is to use binary-triplet method. The binary digits are grouped into groups of three on each side of the binary point with zeros added on either side if needed to complete a group of three. Then, each group of three bits is converted to its octal equivalent. Note that the highest digit in the octal system is 7. 10/26/2024 Introduction to Microprocessor 32
  • 33. 10/26/2024 Introduction to Microprocessor 33 Example 1 Convert [11001.101011]2 to octal Example 2 Convert [11101.101101]2 to octal
  • 34. 10/26/2024 Introduction to Microprocessor 34  Hexadecimal numbers can be converted into binary numbers by converting each hexadecimal digit to 4-bit binary equivalent.  If the hexadecimal digit is 3, it should not be represented by two bits [11]2, but it should be represented by four bits as [0011]2. Hexadecimal to Binary Conversion Example 1 Convert [2AB.81]16 to binary
  • 35. 10/26/2024 Introduction to Microprocessor 35  Conversion from binary to hexadecimal is easily accomplished by partitioning the binary number into groups of four binary digits, starting from the binary point to the left and to the right.  It may be necessary to add zero to the last group, if it does not end in exactly four bits.  Each group of 4-bits binary must be represented by its hexadecimal equivalent. Binary to Hexadecimal Conversion Example 1 Convert [111101110111.111011]2 to hexadecimal number  The conversion between hexadecimal and binary is done in exactly the same manner as octal and binary, except that groups of 4 bits are used.
  • 36. 10/26/2024 Introduction to Microprocessor 36 Example 2 Convert [2AB.8]H to decimal number
  • 37. Decimal to Hexadecimal Conversion 10/26/2024 Introduction to Microprocessor 37  One way to convert from decimal to hexadecimal is the hex dabble.  The conversion is done in a similar fashion as in the case of binary and octal, taking the factor for division and multiplication as 16.  Any decimal integer number can be converted to hex successively dividing by 16 until zero is obtained in the quotient.  The remainders can then be written from bottom to top to obtain the hexadecimal results.  The fractional part of the decimal number is converted to hexadecimal number by multiplying it by 16 and writing down the carry and the fraction separately.  This process is continued until the fraction is reduced to zero or the required number of significant bits is obtained.
  • 38. ASSIGNMENT(10%) 1. Write a short note for the Evolution of Intel microprocessors. 2. Write a brief explanation for CISC and RISC in case of Microprocessors. 3. Briefly discuss about the Architectural Compatibility Microprocessors 4. Hardware and Software Microprocessors 10/26/2024 Introduction to Microprocessor 38
  • 39. 10/26/2024 Introduction to Microprocessor 39