0% found this document useful (0 votes)
54 views

Microprocessor

The document provides information about microprocessors: - A microprocessor is an integrated circuit that contains the functions of a central processing unit on a single chip. It contains an ALU, control unit, registers, and clock. - It fetches, decodes and executes instructions to control all components like memory and I/O. Microprocessors are used in devices like computers, TV remotes, and traffic lights where programming is involved. - Generations of microprocessors increased processing power from 4-bit to 64-bit. This allowed for faster speeds and larger number representations for arithmetic calculations. Modern multi-core processors provide high performance computing.

Uploaded by

Bishal Tiwari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Microprocessor

The document provides information about microprocessors: - A microprocessor is an integrated circuit that contains the functions of a central processing unit on a single chip. It contains an ALU, control unit, registers, and clock. - It fetches, decodes and executes instructions to control all components like memory and I/O. Microprocessors are used in devices like computers, TV remotes, and traffic lights where programming is involved. - Generations of microprocessors increased processing power from 4-bit to 64-bit. This allowed for faster speeds and larger number representations for arithmetic calculations. Modern multi-core processors provide high performance computing.

Uploaded by

Bishal Tiwari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

Microprocessor

By Shuvra Baral
Introduction to Microprocessors
• Microprocessor is brain of microcomputer
• It is a single chip which is capable of processing data
• It controls all components (memory, i/o)
• It executes sequence of instruction
• It fetch, decode and execute the instruction
• A microprocessor is a computer processor that incorporates the
functions of a central processing unit on a single integrated circuit
(IC), or small number of integrated circuits
• It has ALU, a control unit, registers, bus systems and clock to perform
computational tasks
• It is a programmable, multipurpose registered-based device that
reads binary instructions
• Used in – tv remote, traffic light, computer- where programming is
involved
Block Diagram of a Computer with the Microprocessor as CPU

Microprocessor as
CPU

ALU
Array
Input Register Output

Control Unit

Memory
• Arithmetical Logical Unit (ALU)
• Performs computing functions on data
• Performs arithmetic operations such as addition and
subtraction and logical operations such as AND, OR and
exclusive OR

• Register Unit
• It consists of various registers
• Registers are used primarily to store data temporarily during
the execution of a program
• Memory
• Can store instructions, data and intermediate results
• Supplies information to other units of the computer when
needed
• Also known as Main memory or primary storage
• Its size affects speed, power and capability
• All inputs and outputs are transmitted through the main
memory
• Control Unit
• Controls the operations of all parts of the computer but does not
carry out any actual data processing operations
• It is responsible for controlling the transfer of data and instructions
among other units of a computer
• It manages and coordinates all the units of the computer
• It obtains the instructions from the memory, interprets them and
directs the operation of the computer
• It communicates with I/O devices for transfer of data or results from
storage
• It does not or process or store data
• Features of Microprocessor
• Low Cost – Due to integrated circuit technology microprocessors are
available at very low cost. It will reduce the cost of a computer system.

•High Speed – Due to the technology involved in it, the microprocessor can
work at very high speed. It can execute millions of instructions per second.

•Small Size – A microprocessor is fabricated in a very less footprint due to


very large scale and ultra large scale integration technology. Because of
this, the size of the computer system is reduced.
•Versatile – The same chip can be used for several applications, therefore,
microprocessors are versatile.
• Low Power Consumption – Microprocessors are using metal oxide
semiconductor technology, which consumes less power.
• Less Heat Generation – Microprocessors uses semiconductor
technology which will not emit much heat as compared to
vacuum tube devices.

• Reliable – Since microprocessors use semiconductor


technology, therefore, the failure rate is very less. Hence it is
very reliable.

• Portable – Due to the small size and low power consumption


microprocessors are portable.
Generation of Microprocessor
• 1971, INTEL created the first microprocessor 4004
• With only 4 bits as the word size, the 4004 could only represent
signed numbers in the range of –8 to +7 (very small)
• Performs simple logical operations such as addition, subtraction,
Boolean OR and Boolean AND
• Not of practical use of arithmetic calculations.
• Had a control unit capable of performing control functions like
fetching an instruction from storage memory, decoding it, and then
generating control pulses to execute it.
• 2nd Generation (1972)
• 1972, INTEL 8008 was the next evolution – first 8-bit microprocessor
• Followed by Intel 8080 – 8 bit microprocessor (first commercially
popular 8 bit microprocessor)
• 8 bit as word size, represents signed numbers in the range of –128 to
+127.
• Not enough range for performing arithmetic calculations.
• 8080 was used only for control applications
• 6800 Motorola and Z-80 Zilong were also popular at that time
• 3rd Generation (1978)
• First 16-bit microprocessor Intel 8086
• Represent signed numbers in the range on –32,768 to +32,767
• Decent range for performing arithmetic calculations
• Popular for not only control applications, but also for arithmetic
calculation
• Speed of the processors was 4 times faster than 2nd generation
• Motorola came out with 68000 with 16 bit processor
• Zilong released Z-8000 16 bit processor
• 4th Generation (Early 80's)
• Intel 80386, -32 bit processor by using HCMOS (high-density CMOS)
fabrication.
• Represents signed numbers in the range –2 * 9th power of 10 to +2 *
9th power of 10, which is quite large range for performing arithmetic
calculations
• If floating point notation is used, it represent much larger numbers
• Became very popular the CPU in computers for number crunching
operation
• Motorola came out with 68020 32 bit processor
• Intel released 80386 processor and 80387 numeric co-processor on a
single chip
•Motorola released 68030
• In early 90's, Intel released 80586 by the name of Pentium processor
• Extremely fast in performing arithmetic calculations and executing
instructions
• Pentium 4 released on 2000 has 42 million transistors worked with a
clock frequency of 1.5 GHZ.
• 5th Generation (1995 – until now)
• High performance and high speed processors that make is of 64 bit
processors
• After 80856, Intel came out with a new processor namely Pentium
processor followed by Pentium Pro CPU, which allows multiple CPUs
in a single system to achieve multiprocessing. Other improved 64-bit
processors are Celeron, Dual, Quad, Octa Core processors.
• Very cheap compared to main frame computers
Basis Block diagram of a Computer

CPU

Arithmetic Logic
Unit (ALU)

Input Control Unit Output

Memory

Block diagram of a Computer


• The block diagram shows four components: memory, input , output
and the Central Processing Unit (CPU)
• CPU consists of ALU and Control unit.
• CPU consists of various registers to store data
• ALU to perform arithmetic and logical operations,
• CPU reads instructions from the memory and performs the tasks
specified
• It communicates with the input/output devices (peripherals) either
to accept or to send data
• CPU communicates with memory, input and output which is
controlled by the group of circuits called the control unit
Bus organization

CPU Memory Input and Output

Control Bus

Address Bus

Data Bus
• Main parts of microcomputer (CPU, memory and I/O unit) are connected
through three sets of parallel lines called buses.
• Address Bus , Data Bus and Control Bus

• Address Bus: collection of wired used to identify particular in main


memory
• The address bus holds the address of the data present in the memory
• It is used to identify the source or destination of data
• e.g: If CPU wants to read a data from a memory, first it has to identify the
location of that data. This is unidirectional, this means the CPU can send
data to a memory location or I/O Device
• When the CPU reads data from or writes data to a port in the address is
also sent out on the address bus
•Data Bus: It consists of 8 , 16, 32 …. or more parallel signal lines.
• Each lines carry only one bit
• It is bidirectional
• This means that the CPU can read data from memory or I/O port as
well as send data to a memory location or to a I/O port
• In a system, many output devices are connected to the data bus, but
only tone device at a time will be enabled t the output.
• Control Bus:
• It consists of 4-10 parallel signal lines
• It regulates the activity on the bus. (when the send data on the data
bus and when to read the address on the address bus)
• To read a data from a memory location, the CPU sends out the
address of the desired data on the address bus and then sends out
a memory read signal on the control bus
• The memory read signal enables the addressed memory device to
onto the data bus where it is read by the CPU
• Typically control bus signals are memory read, memory write, I/O
read and I/O write
Design of Control Unit
• To execute an instruction, the control unit of the CPU must generate
the required control signal in the proper sequence.
• Two approaches are used for generating control signals
1. Hardwire control unit
2. Micro-programmed control unit
Hardwired control unit
• Gates : A logic gate is a device that acts as a building block for digital
circuits. They perform basic logical functions that are fundamental to
digital circuits. (AND, OR, EXOR, NAND..)
• Flip-flops: a flip-flop is a memory element which is capable of storing
one bit of information and it is used in clock sequential circuit. (0,1)
• A flipflop can maintain a stated until directed by an input to switch
the state
• Decoders: Decoder is a combinational circuit that has ‘n’ input lines
and maximum of 2n output lines. One of these outputs will be active
High based on the combination of inputs present, when the decoder
is enabled. hat means decoder detects a particular code. The outputs
of the decoder are nothing but the min terms of ‘n’ input variables,
when it is enabled.
• Sequence counter: A counter is a device which stores (and sometimes
displays) the number of times a particular event or process has
occurred, often in relationship to a clock signal. Counters are used in
digital electronics for counting purpose, they can count specific event
happening in the circuit.
• An instruction register: It holds a machine instruction that is
currently being executed. In general, a register sits at the top of the
memory hierarchy.
• Instruction register:
• I bit (15th ) last bit I = 0 for direct address, I= 1 for indirect address
• Operation code ( 12-14) next 3 bits
• Address part (0-11) first 12 bits
• Upcode: The opcode is the instruction that is executed by the CPU
Instruction Register

15 14 13 12 11 10 9 …................. 0
Other inputs

3*8
I Decoder Combinational
Control Logic
76543210
D0
D7 Control
Signal
T15
T0
15 14 13 210
4 *16 decoder

Increment (INR)
4 bit
Sequence Counter Clear (CLR)
(SC) Clock
• First 12 bits (0-11) are applied to control logic gates
• The operation code bits (12-14) are decoded with 3*8 decoder
• The 8 output (D0-D7) from a decoder goes to the control logic gates
to perform specific operation
• Last bit 15 is transferred to a I flipflop
• The 4 bit sequence counter (SC) can count in binary from 0-15
• The counter output is decoded into 16 timing pulses T0-T15
• The sequence counter can be incremented by INR Input or clear by
CLR synchronously
•Hardwired Control Unit consists of
• Instruction registers
• Number of control gates
• 2 decoders
• 4-bit sequence counter
• In the hardwired control, the control units use fixed logic circuit to
interpret instructions and generate control signals from them.
• Hardwired control is faster than microprogrammed control
• A controller that uses this approach can operated at high speed.
• This organization is very complicated if we have a large control unit.
• In this organization, if design has to be modified or changed, requires
changes in the wiring among the various components.
• Thus the modification of all the combinational circuits may be very
difficult.
• Advantages
• Hardwired control unit is fast because control signals are generated
by combinational circuits
• The delay in generation of control signals depends upon the number
of gates
• Disadvantages
• More the control signals required by CPU, more complex will be
design on control unit
• A modification in control signal is very difficult. That means it
requires rearranging of wired in the hardware circuit
• It is difficult to correct mistake in original design or adding new
features in existing design of control unit.
Microprogrammed Control Unit
• It is implemented using programming approach
• A sequence of micro-operation re carried out by executing a program
consisting of micro-instructions. Micro-instruction consist of 9micro-
operation
• Micro-program consisting of micro-instruction stored in the control
memory of the control unit
• Execution of a micro-instruction is responsible for generation of a set
of control signals
• Architecture of Micro-programmed control unit

External Control
input word
Next address Control address Control Data
Control Memory
generator register register

Next address information


• The address of micro-instruction that is to be executed is stored in h
control address register.
• Micro-instruction corresponding to the address stored in control
address register is fetched from control memory and stored in the
control data register.
• These micro-instruction contains control word to execute one or
more micro-operations
• After the execution of all micro-operation of micro-instruction, the
address of next micro-instruction is located.
• Advantages:
1. Less complex to design because micro-program are implemented
using software routines.
2. It is more flexible because design, modification, correction and
enhancement is easily possible.
3. It can be changed to accommodate new system specification or to
correct the design errors quickly and cheaply.
4. Less error prone to implement
• Disadvantages:
• It is slower than the hardwired control unit, because time required to
access the microinstruction from control memory.
• The design duration of micro-program control unit is more than
hardwired control unit for smaller CPU.
Von Neuman Machine
• Historically there have been 2 types of Computers:
1.Fixed Program Computers – Their function is very specific and they
couldn’t be re-programmed, e.g. Calculators.
2.Stored Program Computers – These can be programmed to carry out
many different tasks, applications are stored on them, hence the
name.
• The modern computers are based on a stored-program concept
introduced by John Von Neumann. In this stored-program concept,
programs and data are stored in a separate storage unit called
memories and are treated the same.
• Basic structure

Memory

Input

Output
Control Unit ALU
accumulator

Processor

Von Neuman Basic Structure


• It is also known as ISA (Instruction set architecture) computer and is
having three basic units:
1.The Central Processing Unit (CPU)
2.The Main Memory Unit
3.The Input/Output Device

1. Control Unit
A control unit (CU) handles all processor control signals. It directs all
input and output flow, fetches code for instructions, and controls how
data moves around the system.
• Arithmetic and Logic Unit (ALU) –
The arithmetic logic unit is that part of the CPU that handles all the
calculations the CPU may need, e.g. Addition, Subtraction,
Comparisons. It performs Logical Operations, Bit Shifting Operations,
and Arithmetic operations.
• CPU:
1. Main Memory Unit (Registers) – Accumulator: Stores the results of
calculations made by ALU.
2.Program Counter (PC): Keeps track of the memory location of the
next instructions to be dealt with. The PC then passes this next
address to Memory Address Register (MAR).
3.Memory Address Register (MAR): It stores the memory locations of
instructions that need to be fetched from memory or stored into
memory.
1.Memory Data Register (MDR): It stores instructions fetched from
memory or any data that is to be transferred to, and stored in,
memory.
2.Current Instruction Register (CIR): It stores the most recently fetched
instructions while it is waiting to be coded and executed.
3.Instruction Buffer Register (IBR): The instruction that is not to be
executed immediately is placed in the instruction buffer register IBR.
• Input/Output Devices – Program or data is read into main memory
from the input device or secondary storage under the control of CPU
input instruction. Output devices are used to output the information
from a computer. If some results are evaluated by computer and it is
stored in the computer, then with the help of output devices, we can
present them to the user.
• Buses – Data is transmitted from one part of a computer to another,
connecting all major internal components to the CPU and memory, by
the means of Buses. Types:
• Data Bus: It carries data among the memory unit, the I/O devices,
and the processor.
• Address Bus: It carries the address of data (not the actual data)
between memory and processor.
• Control Bus: It carries control commands from the CPU (and
status signals from other devices) in order to control and
coordinate all the activities within the computer.
Bottleneck of Von Neuman Architecture
• In the von Neumann architecture, a computer's main components
include the central processing unit (CPU), the memory unit, and the
input and output devices.
• The CPU contains the control unit, arithmetic and logic unit and
registers.
• The processor and memory are separate components, with data
moving between them via the system bus.
• The memory unit, often referred to as main memory or primary
memory, stores both the program instructions and data.
• The system bus is used to transfer all data between the components
that make up the von Neumann architecture, creating what has
become an increasing bottleneck as workloads have changed and
data sets have grown larger.
• Over the years, computer components have evolved to try to meet
the needs of these changing workloads. For example, processor
speeds are significantly faster, and memory supports greater
densities, making it possible to store more data in less space.
Introduction to register transfer language
• Register: it is a very fast computer memory used to store
data/instruction in execution.
• A register temporarily holds frequently used data, instructions, and
memory address that are to be used by CPU

• Some of the commonly used registers are:


1. Accumulator: this is the most common register, used to store data
taken out of the memory
2. General purpose register: this is used to store data intermediate
results during program execution. It can be accessed via assembly
programming
• Special purpose registers: users do not access these registers. These
registers are for computer systems
1. MAR (Memory address register): those registers that holds the
address for memory unit
2. MDR( Memory buffer register): stores instructions and data
received from the memory and sent to memory
3. PC (Program Counter): it points to the next instruction to be
executed
4. IR (instruction Register): instruction register holds the instruction to
be executed
• Register Transfer language: it is a symbolic notation used to describe
the micro-operation transfers amongst registers.
• Micro-operation: the operation executed on the data stored in the
registers.
• Register transfer: is the information transferred from one register to
another register is represented in symbolic form be replacement
operator
• Replacement operator: in the statement, R2<-R1, (<-) acts as a
replacement operator. This statement defines the transfer of content
of register R1 into register R2.
• There are various methods of RTL:
1. General way of representing a register is by the name of the register
enclosed in a rectangular box.
R1

2. Register is numbered in a sequence of 0 to (n-1)


3. The numbering of bits in a register can be marked on the top of the
box 15 0
PC

4. A 16-bit register PC is divided int 2 parts. Bits (0-7) are assigned


with lower byte of 16-bit address and bits (8-15) are assigned with
higher bytes of 16 bit address
PC (H) PC (L)
• Basic symbols of RTL

Symbol Description Examples


Letters and Numbers Denotes a register MAR, R1, R2
() A part of register R1 (8-bit), R1(0-7)
<- A transfer of information R2<-R1 / R1<-R2
: Denotes conditional P: R2<- R1
operation If P=1
(:=) Denotes another name for Ra:=R1
an already existing register
Register transfer operations:
• The operation performed in the data stored in the register are
referred as register transfer operation.
1. Simple transfer: R2<-R1
The content of R1 are copied into R2 without affecting the content of R1. it is an
unconditional type of transfer operation.
2. Conditional transfer: P: R2<-R1

P
Control function R2

P=1 n

R1
n= number of bits
• It indicates that if P=1, then the content of R1 is transferred to R2. it
is a unidirectional operation.

3. Simultaneous Operation:
If 2 or more operations are to occur simultaneously then they are separated
with (,).
clock
P:R2<-R1, R1<-R2 P
Control function R2

P=1 n

R1
n= number of bits n
• If the control function P=1, then load the content of R1 into R2 and at
the same clock load the content of R2 into R1.

You might also like