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

COA Chapter 1

Uploaded by

Dipika Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

COA Chapter 1

Uploaded by

Dipika Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

#Topic CPU

The full form of CPU is Central Processing Unit . It is a brain of the


computer. All types of data processing operations and all the
important functions of a computer are performed by the CPU. It
helps input and output devices to communicate with each other and
perform their respective operations. It also stores data which is input,
intermediate results in between processing, and instructions.A
Central Processing Unit is the most important component of a
computer system. A CPU is a hardware that performs data
input/output, processing and storage functions for a computer
system. A CPU can be installed into a CPU socket. These sockets are
generally located on the motherboard. CPU can perform various data
processing operations. CPU can store data, instructions, programs,
and intermediate results.
Different Parts of CPU
Now, the CPU consists of 3 major units, which are:
1. Memory or Storage Unit
2. Control Unit
3. ALU(Arithmetic Logic Unit)
Let us now look at the block diagram of the computer:

Here, in this diagram, the three major components are also shown.
So, let us discuss these major components:
Memory or Storage Unit
As the name suggests this unit can store instructions, data, and
intermediate results. The memory unit is responsible for transferring
information to other units of the computer when needed. It is also
known as an internal storage unit or the main memory or the
primary storage or Random Access Memory (RAM) as all these are
storage devices.Its size affects speed, power, and performance. There
are two types of memory in the computer, which are primary
memory and secondary memory. Some main functions of memory
units are listed below:
Data and instructions are stored in memory units which are required
for processing.
It also stores the intermediate results of any calculation or task when
they are in process.
The final results of processing are stored in the memory units before
these results are released to an output device for giving the output to
the user.
All sorts of inputs and outputs are transmitted through the memory
unit.
Control Unit
As the name suggests, a control unit controls the operations of all
parts of the computer but it does not carry out any data processing
operations. For executing already stored instructions, It instructs the
computer by using the electrical signals to instruct the computer
system. It takes instructions from the memory unit and then decodes
the instructions after that it executes those instructions. So, it
controls the functioning of the computer. It’s main task is to maintain
the flow of information across the processor. Some main functions of
the control unit are listed below:
Controlling of data and transfer of data and instructions is done by
the control unit among other parts of the computer.
The control unit is responsible for managing all the units of the
computer.The main task of the control unit is to obtain the
instructions or data which is input from the memory unit, interprets
them, and then directs the operation of the computer according to
that.The control unit is responsible for communication with Input and
output devices for the transfer of data or results from memory.
The control unit is not responsible for the processing of data or
storing data.
ALU (Arithmetic Logic Unit)
ALU (Arithmetic Logic Unit) is responsible for performing arithmetic
and logical functions or operations. It consists of two subsections,
which are:
Arithmetic Section
Logic Section
Now, let us know about these subsections:
Arithmetic Section: By arithmetic operations, we mean operations
like addition, subtraction, multiplication, and division, and all these
operation and functions are performed by ALU. Also, all the complex
operations are done by making repetitive use of the mentioned
operations by ALU.Logic Section: By Logical operations, we mean
operations or functions like selecting, comparing, matching, and
merging the data, and all these are performed by ALU.
Note: CPU may contain more than one ALU and it can be used for
maintaining timers that help run the computer system
Types of CPU
We have three different types of CPU:
Single Core CPU: The oldest type of computer CPUs is single core
CPU. These CPUs were used in the 1970s. these CPUs only have a
single core that preform different operations. This means that the
single core CPU can only process one operation at a single time.
single core CPU CPU is not suitable for multitasking.
Dual-Core CPU: Dual-Core CPUs contain a single Integrated Circuit
with two cores. Each core has its cache and controller. These
controllers and cache are work as a single unit. dual core CPUs can
work faster than the single-core processors.
Quad-Core CPU: Quad-Core CPUs contain two dual-core processors
present within a single integrated circuit (IC) or chip. A quad-core
processor contains a chip with four independent cores. These cores
read and execute various instructions provided by the CPU. Quad
Core CPU increases the overall speed for programs. Without even
boosting the overall clock speed it results in higher performance.

#Topic 2 Memory
A computer is an electronic device and that accepts data, processes
on that data, and gives the desired output. It performs programmed
computation with accuracy and speed. Or in other words, the
computer takes data as input and stores the data/instructions in the
memory (use them when required). After processes the data, it
converts into information. Finally, gives the output.Here, input refers
to the raw data that we want the machine to process and return to
us as a result, output refers to the response that the machine
provides in response to the raw data entered and the processing of
data may involve analyzing, searching, distributing, storing data, etc.
Thus, we can also call a computer data processing system.
What is Computer Memory?
Computer memory is just like the human brain. It is used to store
data/information and instructions. It is a data storage unit or a data
storage device where data is to be processed and instructions
required for processing are stored. It can store both the input and
output can be stored here.
Characteristics of Computer Memory
It is faster computer memory as compared to secondary memory.
It is semiconductor memories.
It is usually a volatile memory, and main memory of the computer.
A computer system cannot run without primary memory.
How Does Computer Memory Work?
When you open a program, it is loaded from secondary memory into
primary memory. Because there are various types of memory and
storage, an example would be moving a program from a solid-state
drive (SSD) to RAM. Because primary storage is accessed more
quickly, the opened software can connect with the computer’s
processor more quickly. The primary memory is readily accessible
from temporary memory slots or other storage sites.
Memory is volatile, which means that data is only kept temporarily in
memory. Data saved in volatile memory is automatically destroyed
when a computing device is turned off. When you save a file, it is sent
to secondary memory for storage.There are various kinds of memory
accessible. It’s operation will depend upon the type of primary
memory used. but normally, semiconductor-based memory is more
related with memory. Semiconductor memory made up of IC
(integrated circuits) with silicon-based metal-oxide-semiconductor
(MOS) transistors.
Types of Computer Memory
In general, computer memory is of three types:
1. Primary memory
2. Secondary memory
3. Cache memory
Now we discuss each type of memory one by one in detail:
1. Primary Memory
It is also known as the main memory of the computer system. It is
used to store data and programs or instructions during computer
operations. It uses semiconductor technology and hence is
commonly called semiconductor memory. Primary memory is of two
types:
RAM (Random Access Memory): It is a volatile memory. Volatile
memory stores information based on the power supply. If the power
supply fails/ interrupted/stopped, all the data and information on
this memory will be lost. RAM is used for booting up or start the
computer. It temporarily stores programs/data which has to be
executed by the processor. RAM is of two types:
S RAM (Static RAM): S RAM uses transistors and the circuits of this
memory are capable of retaining their state as long as the power is
applied. This memory consists of the number of flip flops with each
flip flop storing 1 bit. It has less access time and hence, it is faster.
D RAM (Dynamic RAM): D RAM uses capacitors and transistors and
stores the data as a charge on the capacitors. They contain thousands
of memory cells. It needs refreshing of charge on capacitor after a
few milliseconds. This memory is slower than S RAM.
ROM (Read Only Memory): It is a non-volatile memory. Non-volatile
memory stores information even when there is a power supply
failed/ interrupted/stopped. ROM is used to store information that is
used to operate the system. As its name refers to read-only memory,
we can only read the programs and data that is stored on it. It
contains some electronic fuses that can be programmed for a piece
of specific information. The information stored in the ROM in binary
format. It is also known as permanent memory. ROM is of four types:
MROM(Masked ROM): Hard-wired devices with a pre-programmed
collection of data or instructions were the first ROMs. Masked ROMs
are a type of low-cost ROM that works in this way.
PROM (Programmable Read Only Memory): This read-only memory is
modifiable once by the user. The user purchases a blank PROM and
uses a PROM program to put the required contents into the PROM.
Its content can’t be erased once written.
EPROM (Erasable Programmable Read Only Memory): EPROM is an
extension to PROM where you can erase the content of ROM by
exposing it to Ultraviolet rays for nearly 40 minutes.
EEPROM (Electrically Erasable Programmable Read Only Memory):
Here the written contents can be erased electrically. You can delete
and reprogramme EEPROM up to 10,000 times. Erasing and
programming take very little time, i.e., nearly 4 -10 ms(milliseconds).
Any area in an EEPROM can be wiped and programmed selectively.
2. Secondary Memory
It is also known as auxiliary memory and backup memory. It is a non-
volatile memory and used to store a large amount of data or
information. The data or information stored in secondary memory is
permanent, and it is slower than primary memory. A CPU cannot
access secondary memory directly. The data/information from the
auxiliary memory is first transferred to the main memory, and then
the CPU can access it.
Characteristics of Secondary Memory
It is a slow memory but reusable.
It is a reliable and non-volatile memory.
It is cheaper than primary memory.
The storage capacity of secondary memory is large.
A computer system can run without secondary memory.
In secondary memory, data is stored permanently even when the
power is off.
Types of Secondary Memory
1. Magnetic Tapes: Magnetic tape is a long, narrow strip of plastic
film with a thin, magnetic coating on it that is used for magnetic
recording. Bits are recorded on tape as magnetic patches called
RECORDS that run along many tracks. Typically, 7 or 9 bits are
recorded concurrently. Each track has one read/write head, which
allows data to be recorded and read as a sequence of characters. It
can be stopped, started moving forward or backward, or rewound.
2. Magnetic Disks: A magnetic disk is a circular metal or a plastic
plate and these plates are coated with magnetic material. The disc is
used on both sides. Bits are stored in magnetized surfaces in
locations called tracks that run in concentric rings. Sectors are
typically used to break tracks into pieces.
Magnetic Disks
Hard discs are discs that are permanently attached and cannot be
removed by a single user.
3. Optical Disks: It’s a laser-based storage medium that can be
written to and read. It is reasonably priced and has a long lifespan.
The optical disc can be taken out of the computer by occasional
users.
Types of Optical Disks
CD – ROM
It’s called compact disk. Only read from memory.
Information is written to the disc by using a controlled laser beam to
burn pits on the disc surface.
It has a highly reflecting surface, which is usually aluminium.The
diameter of the disc is 5.25 inches.16000 tracks per inch is the track
density.The capacity of a CD-ROM is 600 MB, with each sector storing
2048 bytes of data.The data transfer rate is about 4800KB/sec. & the
new access time is around 80 milliseconds.
WORM-(WRITE ONCE READ MANY)
A user can only write data once.
The information is written on the disc using a laser beam.
It is possible to read the written data as many times as desired.
They keep lasting records of information but access time is high.
It is possible to rewrite updated or new data to another part of the
disc.
Data that has already been written cannot be changed.
Usual size – 5.25 inch or 3.5 inch diameter.
The usual capacity of 5.25 inch disk is 650 MB,5.2GB etc.
DVDs
The term “DVD” stands for “Digital Versatile/Video Disc,” and there
are two sorts of DVDs:
DVDR (writable)
DVDRW (Re-Writable)
DVD-ROMS (Digital Versatile Discs): These are read-only memory
(ROM) discs that can be used in a variety of ways. When compared to
CD-ROMs, they can store a lot more data. It has a thick polycarbonate
plastic layer that serves as a foundation for the other layers. It’s an
optical memory that can read and write data.
DVD-R: DVD-R is a writable optical disc that can be used just once. It’s
a DVD that can be recorded. It’s a lot like WORM. DVD-ROMs have
capacities ranging from 4.7 to 17 GB. The capacity of 3.5 inch disk is
1.3 GB.
3. Cache Memory It is a type of high-speed semiconductor memory
that can help the CPU run faster. Between the CPU and the main
memory, it serves as a buffer. It is used to store the data and
programs that the CPU uses the most frequently.
Advantages of Cache Memory
It is faster than the main memory.
When compared to the main memory, it takes less time to access it.
It keeps the programs that can be run in a short amount of time.
It stores data in temporary use.
Disadvantages of Cache Memory
Because of the semiconductors used, it is very expensive.
The size of the cache (amount of data it can store) is usually smalli
#Tpoic I/O SubSystem
input/Output Subsystem The I/O subsystem of a computer provides
an efficient mode of communication between the central system and
the outside environment. It handles all the inputoutput operations of
the computer system. Peripheral Devices Input or output devices that
are connected to computer are called peripheral devices. These
devices are designed to read information into or out of the memory
unit upon command from the CPU and are considered to be the part
of computer system. These devices are also called peripherals. For
example: Keyboards, display units and printers are common
peripheral devices. There are three types of peripherals:
1. Input peripherals : Allows user input, from the outside world to
the computer. Example: Keyboard, Mouse etc.
2. Output peripherals: Allows information output, from the
computer to the outside world. Example: Printer, Monitor etc
3. Input-Output peripherals: Allows both input(from outised world
to computer) as well as, output(from computer to the outside world).
Example: Touch screen etc. Interfaces Interface is a shared boundary
btween two separate components of the computer system which can
be used to attach two or more components to the system for
communication purposes.
There are two types of interface:
1. CPU Interface
2. I/O Interface: Input-Output Interface Peripherals connected to a
computer need special communication links for interfacing with CPU.
In computer system, there are special hardware components
between the CPU and peripherals to control or manage the input-
output transfers. These components are called input-output interface
units because they provide communication links between processor
bus and peripherals. They provide a method for transferring
information between internal system and input-output devices. The
Input/output Interface is required because there are exists many
differences between the central computer and each peripheral while
transferring information. Some major differences are:
1. Peripherals are electromechanical and electromagnetic devices and
their manner of operation is different from the operation of CPU and
memory, which are electronic device.Therefore, a conversion of
signal values may be required.

2. The data transfer rate of peripherals is usually slower than the


transfer rate of CPU, and consequently a synchronisation mechanism
is needed.
3. Data codes and formats in peripherals differ from the word format
in the CPU and Memory.
4. The operating modes of peripherals are differ from each other and
each must be controlled so as not to disturb the operation of other
peripherals connected to CPU. These differences are resolved
through input-output interface. As input-output interface(Interface
Unit) contain various components, each of which performs one or
more vital function for smooth transforming of information between
CPU and Peripherals. Email ThisBlog This!Share to TwitterShare to
FacebookShare to Pinterest Input/Output Channels A channel is an
independent hardware component that co-ordinate all I/O to a set of
controllers. Computer systems that use I/O channel have special
hardware components that handle all I/O operations. Channels use
separate, independent and low cost processors for its functioning
which are called Channel Processors. Channel processors are simple,
but contains sufficient memory to handle all I/O tasks. When I/O
transfer is complete or an error is detected, the channel controller
communicates with the CPU using an interrupt, and informs CPU
about the error or the task completion. Each channel supports one or
more controllers or devices. Channel programs contain list of
commands to the channel itself and for various connected controllers
or devices. Once the operating system has prepared a list of I/O
commands, it executes a single I/O machine instruction to initiate the
channel program, the channel then assumes control of the I/O
operations until they are completed. IBM 370 I/O Channel The I/O
processor in the IBM 370 computer is called a Channel. A computer
system configuration includes a number of channels which are
connected to one or more I/O devices. Categories of I/O Channels
Following are the different categories of I/O channels: Multiplexer
The Multiplexer channel can be connected to a number of slow and
medium speed devices. It is capable of operating number of I/O
devices simultaneously. Selector This channel can handle only one
I/O operation at a time and is used to control one high speed device
at a time. Block-Multiplexer It combines the features of both
multiplexer and selector channels. The CPU directly can communicate
with the channels through control lines.

#Topic Control Unit


A Central Processing Unit is the most important component of a
computer system. A control unit is a part of the CPU. A control unit
controls the operations of all parts of the computer but it does not
carry out any data processing operations.
What is a Control Unit?
The Control Unit is the part of the computer’s central processing unit
(CPU), which directs the operation of the processor. It was included
as part of the Von Neumann Architecture by John von Neumann. It is
the responsibility of the control unit to tell the computer’s memory,
arithmetic/logic unit, and input and output devices how to respond
to the instructions that have been sent to the processor. It fetches
internal instructions of the programs from the main memory to the
processor instruction register, and based on this register contents,
the control unit generates a control signal that supervises the
execution of these instructions. A control unit works by receiving
input information which it converts into control signals, which are
then sent to the central processor. The computer’s processor then
tells the attached hardware what operations to perform. The
functions that a control unit performs are dependent on the type of
CPU because the architecture of the CPU varies from manufacturer
to manufacturer.
Examples of devices that require a CU are:
1. Control Processing Units(CPUs)
2. Graphics Processing Units(GPUs)

what is control unit?


Functions of the Control Unit.It coordinates the sequence of data
movements into, out of, and between a processor’s many sub-units.
It interprets instructions.It controls data flow inside the processor.
It receives external instructions or commands to which it converts to
sequence of control signals.It controls many execution units(i.e. ALU,
data buffers and registers) contained within a CPU.It also handles
multiple tasks, such as fetching, decoding, execution handling and
storing results.
Types of Control Unit
There are two types of control units:
1. Hardwired
2. Micro programmable control unit.
Hardwired Control Unit
In the Hardwired control unit, the control signals that are important
for instruction execution control are generated by specially designed
hardware logical circuits, in which we can not modify the signal
generation method without physical change of the circuit structure.
The operation code of an instruction contains the basic data for
control signal generation. In the instruction decoder, the operation
code is decoded. The instruction decoder constitutes a set of many
decoders that decode different fields of the instruction opcode.As a
result, few output lines going out from the instruction decoder
obtains active signal values. These output lines are connected to the
inputs of the matrix that generates control signals for execution units
of the computer. This matrix implements logical combinations of the
decoded signals from the instruction opcode with the outputs from
the matrix that generates signals representing consecutive control
unit states and with signals coming from the outside of the processor,
e.g. interrupt signals. The matrices are built in a similar way as a
programmable logic arrays.
hardwired control unit
Control signals for an instruction execution have to be generated not
in a single time point but during the entire time interval that
corresponds to the instruction execution cycle. Following the
structure of this cycle, the suitable sequence of internal states is
organized in the control unit. A number of signals generated by the
control signal generator matrix are sent back to inputs of the next
control state generator matrix.This matrix combines these signals
with the timing signals, which are generated by the timing unit based
on the rectangular patterns usually supplied by the quartz generator.
When a new instruction arrives at the control unit, the control units
is in the initial state of new instruction fetching. Instruction decoding
allows the control unit enters the first state relating execution of the
new instruction, which lasts as long as the timing signals and other
input signals as flags and state information of the computer remain
unaltered. A change of any of the earlier mentioned signals
stimulates the change of the control unit state. This causes that a
new respective input is generated for the control signal generator
matrix. When an external signal appears, (e.g. an interrupt) the
control unit takes entry into a next control state that is the state
concerned with the reaction to this external signal (e.g. interrupt
processing).The values of flags and state variables of the computer
are used to select suitable states for the instruction execution cycle.
The last states in the cycle are control states that commence fetching
the next instruction of the program: sending the program counter
content to the main memory address buffer register and next,
reading the instruction word to the instruction register of computer.
When the ongoing instruction is the stop instruction that ends
program execution, the control unit enters an operating system state,
in which it waits for a next user directive.
Micro Programmable control unit
The fundamental difference between these unit structures and the
structure of the hardwired control unit is the existence of the control
store that is used for storing words containing encoded control
signals mandatory for instruction execution. In microprogrammed
control units, subsequent instruction words are fetched into the
instruction register in a normal way. However, the operation code of
each instruction is not directly decoded to enable immediate control
signal generation but it comprises the initial address of a
microprogram contained in the control store.With a single-level
control store: In this, the instruction opcode from the instruction
register is sent to the control store address register. Based on this
address, the first microinstruction of a microprogram that interprets
execution of this instruction is read to the microinstruction register.
This microinstruction contains in its operation part encoded control
signals, normally as few bit fields. In a set microinstruction field
decoders, the fields are decoded. The microinstruction also contains
the address of the next microinstruction of the given instruction
microprogram and a control field used to control activities of the
microinstruction address generator.
With single level control store. The last mentioned field decides the
addressing mode (addressing operation) to be applied to the address
embedded in the ongoing microinstruction. In microinstructions
along with conditional addressing mode, this address is refined by
using the processor condition flags that represent the status of
computations in the current program. The last microinstruction in the
instruction of the given microprogram is the microinstruction that
fetches the next instruction from the main memory to the instruction
register.
With a two-level control store: In this, in a control unit with a two-
level control store, besides the control memory for microinstructions,
a nano-instruction memory is included. In such a control unit,
microinstructions do not contain encoded control signals. The
operation part of microinstructions contains the address of the word
in the nano-instruction memory, which contains encoded control
signals. The nano-instruction memory contains all combinations of
control signals that appear in microprograms that interpret the
complete instruction set of a given computer, written once in the
form of nano-instructions.WIth two level control storeIn this way,
unnecessary storing of the same operation parts of microinstructions
is avoided. In this case, microinstruction word can be much shorter
than with the single level control store. It gives a much smaller size in
bits of the microinstruction memory and, as a result, a much smaller
size of the entire control memory. The microinstruction memory
contains the control for selection of consecutive microinstructions,
while those control signals are generated at the basis of nano-
instructions. In nano-instructions, control signals are frequently
encoded using 1 bit/ 1 signal method that eliminates decoding.
Advantages of a Well-Designed Control Unit
Efficient instruction execution: A well-designed control unit can
execute instructions more efficiently by optimizing the instruction
pipeline and minimizing the number of clock cycles required for each
instruction.
Improved performance: A well-designed control unit can improve
the performance of the CPU by increasing the clock speed, reducing
the latency, and improving the throughput.
Support for complex instructions: A well-designed control unit can
support complex instructions that require multiple operations,
reducing the number of instructions required to execute a program.
Improved reliability: A well-designed control unit can improve the
reliability of the CPU by detecting and correcting errors, such as
memory errors and pipeline stalls.
Lower power consumption: A well-designed control unit can reduce
power consumption by optimizing the use of resources, such as
registers and memory, and reducing the number of clock cycles
required for each instruction.
Better branch prediction: A well-designed control unit can improve
branch prediction accuracy, reducing the number of branch
mispredictions and improving performance.
Improved scalability: A well-designed control unit can improve the
scalability of the CPU, allowing it to handle larger and more complex
workloads.
Better support for parallelism: A well-designed control unit can
better support parallelism, allowing the CPU to execute multiple
instructions simultaneously and improve overall performance.
Improved security: A well-designed control unit can improve the
security of the CPU by implementing security features such as
address space layout randomization and data execution prevention.
Lower cost: A well-designed control unit can reduce the cost of the
CPU by minimizing the number of components required and
improving manufacturing efficiency.
Disadvantages of a Poorly-Designed Control Unit
Reduced performance: A poorly-designed control unit can reduce
the performance of the CPU by introducing pipeline stalls, increasing
the latency, and reducing the throughput.
Increased complexity: A poorly-designed control unit can increase
the complexity of the CPU, making it harder to design, test, and
maintain.
Higher power consumption: A poorly-designed control unit can
increase power consumption by inefficiently using resources, such as
registers and memory, and requiring more clock cycles for each
instruction.
Reduced reliability: A poorly-designed control unit can reduce the
reliability of the CPU by introducing errors, such as memory errors
and pipeline stalls.
Limitations on instruction set: A poorly-designed control unit may
limit the instruction set of the CPU, making it harder to execute
complex instructions and limiting the functionality of the CPU.
Inefficient use of resources: A poorly-designed control unit may
inefficiently use resources such as registers and memory, leading to
wasted resources and reduced performance.
Limited scalability: A poorly-designed control unit may limit the
scalability of the CPU, making it harder to handle larger and more
complex workloads.
Poor support for parallelism: A poorly-designed control unit may
limit the ability of the CPU to support parallelism, reducing the
overall performance of the system.
Security vulnerabilities: A poorly-designed control unit may
introduce security vulnerabilities, such as buffer overflows or code
injection attacks.
Higher cost: A poorly-designed control unit may increase the cost of
the CPU by requiring additional components or increasing the
manufacturing complexity
#Topic Microprocessor Based System
A Microprocessor is an important part of a computer architecture
without which you will not be able to perform anything on your
computer. It is a programmable device that takes in input performs
some arithmetic and logical operations over it and produces the
desired output. In simple words, a Microprocessor is a digital device
on a chip that can fetch instructions from memory, decode and
execute them and give results.
Basics of Microprocessor –
A Microprocessor takes a bunch of instructions in machine language
and executes them, telling the processor what it has to do.
Microprocessor performs three basic things while executing the
instruction:
It performs some basic operations like addition, subtraction,
multiplication, division, and some logical operations using its
Arithmetic and Logical Unit (ALU). New Microprocessors also perform
operations on floating-point numbers also.Data in microprocessors
can move from one location to another. It has a Program Counter
(PC) register that stores the address of the next instruction based on
the value of the PC, Microprocessor jumps from one location to
another and takes decisions.
A typical Microprocessor structure looks like this
We do not have any 128-bit Microprocessor at work at present one
of the reasons for this is that we are a long way from exhausting the
64-bit address space itself, we use it at a constant rate of roughly 2
bits every 3 years. At present we have only used 48 bits of 64 bits so
why require 128-bit address space. Also, 128-bit Microprocessor
would be much slower than the 64 bit Microprocessor.
Types of Processor:
Complex Instruction Set Computer (CISC) –
CISC or Complex Instruction Set Computer is a computer architecture
where instructions are such that a single instruction can execute
multiple low-level operations like loading from memory, storing into
memory, or an arithmetic operation, etc. It has multiple addressing
nodes within a single instruction.CISC makes use of very few registers
Reduced Instruction Set Computer (RISC) –
RISC or Reduced Instruction Set Computer is a computer architecture
where instruction is simple and designed to get executed quickly.
Instructions get completed in one clock cycle this is because of the
optimization of instructions and pipelining (a technique that allows
for simultaneous execution of parts, or stages, of instructions more
efficiently process instructions). RISC makes use of multiple registers
to avoid large interactions with memory. It has few addressing nodes.
#Topic Introduction of 8085 Architecture
The 8085 microprocessor is an 8-bit microprocessor that was
developed by Intel in the mid-1970s. It was widely used in the early
days of personal computing and was a popular choice for hobbyists
and enthusiasts due to its simplicity and ease of use. The architecture
of the 8085 microprocessor consists of several key components,
including the accumulator, registers, program counter, stack pointer,
instruction register, flags register, data bus, address bus, and control
bus.The accumulator is an 8-bit register that is used to store
arithmetic and logical results. It is the most commonly used register
in the 8085 microprocessor and is used to perform arithmetic and
logical operations such as addition, subtraction, and bitwise
operations.
The 8085 microprocessor has six general-purpose registers, including
B, C, D, E, H, and L, which can be combined to form 16-bit register
pairs. The B and C registers can be combined to form the BC register
pair, the D and E registers can be combined to form the DE register
pair, and the H and L registers can be combined to form the HL
register pair. These register pairs are commonly used to store
memory addresses and other data.

The program counter is a 16-bit register that contains the memory


address of the next instruction to be executed. The program counter
is incremented after each instruction is executed, which allows the
microprocessor to execute instructions in sequence.

The stack pointer is a 16-bit register that is used to manage the stack.
The stack is a section of memory that is used to store data
temporarily, such as subroutine addresses and other data. The stack
pointer is used to keep track of the top of the stack.
1 The instruction register is an 8-bit register that contains the current
instruction being executed. The instruction register is used by the
microprocessor to decode and execute instructions.
2.The flags register is an 8-bit register that contains status flags that
indicate the result of an arithmetic or logical operation. These flags
include the carry flag, zero flag, sign flag, and parity flag. The carry
flag is set when an arithmetic operation generates a carry, the zero
flag is set when the result of an arithmetic or logical operation is
zero, the sign flag is set when the result of an arithmetic or logical
operation is negative, and the parity flag is set when the result of an
arithmetic or logical operation has an even number of 1 bits.
3.The data bus is an 8-bit bus that is used to transfer data between
the microprocessor and memory or other devices. The data bus is
bidirectional, which means that it can be used to read data from
memory or write data to memory. The address bus is a 16-bit bus
that is used to address memory and other devices. The address bus is
used to select the memory location or device that the
microprocessor wants to access.
4.The control bus is a set of signals that controls the operations of the
microprocessor, including the read and write operations. The control
bus includes signals such as the read signal, write signal, interrupt
signal, and reset signal. The read signal is used to read data from
memory or other devices, the write signal is used to write data to
memory or other devices, the interrupt signal is used to signal the
microprocessor that an interrupt has occurred, and the reset signal is
used to reset the microprocessor to its initial state.8085 is an 8-bit,
general-purpose microprocessor. It consists of the following
functional units
Arithmetic and Logic Unit (ALU) :
It is used to perform mathematical operations like addition,
multiplication, subtraction, division, decrement, increment, etc.
Different operations are carried out in ALU: Logical operations, Bit-
Shifting Operations, and Arithmetic Operations.
Flag Register:It is an 8-bit register that stores either 0 or 1 depending
upon which value is stored in the accumulator. Flag Register contains
8-bit out of which 5-bits are important and the rest of 3-bits are
“don’t Care conditions”. The flag register is a dynamic register
because after each operation to check whether the result is zero,
positive or negative, whether there is any overflow occurred or not,
or for comparison of two 8-bit numbers carry flag is checked. So for
numerous operations to check the contents of the accumulator and
from that contents if we want to check the behavior of given result
then we can use Flag register to verify and check. So we can say that
the flag register is a status register and it is used to check the status
of the current operation which is being carried out by ALU.
Different Fields of Flag Register:
 Carry Flag
 Parity Flag
 Auxiliary Carry Flag
 Zero Flag
 Sign Flag
Accumulator:Accumulator is used to perform I/O, arithmetic, and
logical operations. It is connected to ALU and the internal data bus.
The accumulator is the heart of the microprocessor because for all
arithmetic operations Accumulator’s 8-bit pin will always there
connected with ALU and in most-off times all the operations carried
by different instructions will be stored in the accumulator after
operation performance.
General Purpose Registers:There are six general-purpose registers.
These registers can hold 8-bit values. These 8-bit registers are
B,C,D,E,H,L. These registers work as 16-bit registers when they work
in pairs like B-C, D-E, and H-L. Here registers W and Z are reserved
registers. We can’t use these registers in arithmetic operations. It is
reserved for microprocessors for internal operations like swapping
two 16-bit numbers. We know that to swap two numbers we need a
third variable hence here W-Z register pair works as temporary
registers and we can swap two 16-bit numbers using this pair.
Program Counter : Program Counter holds the address value of the
memory to the next instruction that is to be executed. It is a 16-bit
register.
For Example: Suppose current value of Program Counter : [PC] =
4000H(It means that next executing instruction is at location
4000H.After fetching,program Counter(PC) always increments
by +1 for fetching of next instruction.)
Stack Pointer :It works like a stack. In stack, the content of the
register is stored that is later used in the program. It is a 16-bit
special register. The stack pointer is part of memory but it is part of
Stack operations, unlike random memory access. Stack pointer works
in a continuous and contiguous part of the memory. whereas
Program Counter(PC) works in random memory locations. This
pointer is very useful in stack-related operations like PUSH, POP, and
nested CALL requests initiated by Microprocessor. It reserves the
address of the most recent stack entry.
Temporary Register:It is an 8-bit register that holds data values
during arithmetic and logical operations.
Instruction register and decoder:It is an 8-bit register that holds the
instruction code that is being decoded. The instruction is fetched
from the memory.
Timing and control unit:The timing and control unit comes under the
CPU section, and it controls the flow of data from the CPU to other
devices. It is also used to control the operations performed by the
microprocessor and the devices connected to it. There are certain
timing and control signals like Control signals, DMA Signals, RESET
signals and Status signals.
Interrupt control:Whenever a microprocessor is executing the main
program and if suddenly an interrupt occurs, the microprocessor
shifts the control from the main program to process the incoming
request. After the request is completed, the control goes back to the
main program. There are 5 interrupt signals in 8085 microprocessors:
INTR, TRAP, RST 7.5, RST 6.5, and RST 5.5.
Priorities of Interrupts: TRAP > RST 7.5 > RST 6.5 > RST 5.5 > INTR
Address bus and data bus:The data bus is bidirectional and carries
the data which is to be stored. The address bus is unidirectional and
carries the location where data is to be stored.
In the 8085 microprocessor, the address bus and data bus are two
separate buses that are used for communication between the
microprocessor and external devices.The Address bus is used to
transfer the memory address of the data that needs to be read or
written. The address bus is a 16-bit bus, allowing the 8085 to access
up to 65,536 memory locations.The Data bus is used to transfer data
between the microprocessor and external devices such as memory
and I/O devices. The data bus is an 8-bit bus, allowing the 8085 to
transfer 8-bit data at a time. The data bus can also be used for
instruction fetch operations, where the microprocessor fetches the
instruction code from memory and decodes it.The combination of
the address bus and data bus allows the 8085 to communicate with
and control external devices, allowing it to execute its program and
perform various operations.
Serial Input/output control:It controls the serial data communication
by using Serial input data and Serial output data.Serial Input/Output
control in the 8085 microprocessor refers to the communication of
data between the microprocessor and external devices in a serial
manner, i.e., one bit at a time. The 8085 has a serial I/O port
(SID/SOD) for serial communication. The SID pin is used for serial
input and the SOD pin is used for serial output. The timing and
control of serial communication is managed by the 8085’s internal
circuitry. The 8085 also has two special purpose registers, the Serial
Control Register (SC) and the Serial Shift Register (SS), which are used
to control and monitor the serial communication.
The flow of an Instruction Cycle in 8085 Architecture :
Execution starts with Program Counter. It starts program execution
with the next address field. it fetches an instruction from the
memory location pointed by Program Counter.
For address fetching from the memory, multiplexed address/data bus
acts as an address bus and after fetching instruction this address bus
will now acts as a data bus and extract data from the specified
memory location and send this data on an 8-bit internal bus. For
multiplexed address/data bus Address Latch Enable(ALE) Pin is used.
If ALE = 1 (Multiplexed bus is Address Bus otherwise it acts as Data
Bus).
After data fetching data will go into the Instruction Register it will
store data fetched from memory and now data is ready for decoding
so for this Instruction decoder register is used.
After that timing and control signal circuit comes into the picture. It
sends control signals all over the microprocessor to tell the
microprocessor whether the given instruction is for READ/WRITE and
whether it is for MEMORY/I-O Device activity.
Hence according to timing and control signal pins, logical and
arithmetic operations are performed and according to that data
fetching from the different registers is done by a microprocessor, and
mathematical operation is carried out by ALU. And according to
operations Flag register changes dynamically.With the help of Serial
I/O data pin(SID or SOD Pins) we can send or receive input/output to
external devices .in this way execution cycle is carried out.While
execution is going on if there is any interrupt detected then it will
stop execution of the current process and Invoke Interrupt Service
Routine (ISR) Function. Which will stop the current execution and do
execution of the current occurred interrupt after that normal
execution will be performed.
Uses of 8085 microprocessor :
The 8085 microprocessor is a versatile 8-bit microprocessor that has
been used in a wide variety of applications, including:
Embedded Systems: The 8085 microprocessor is commonly used in
embedded systems, such as industrial control systems, automotive
electronics, and medical equipment.
Computer Peripherals: The 8085 microprocessor has been used in a
variety of computer peripherals, such as printers, scanners, and disk
drives.
Communication Systems: The 8085 microprocessor has been used in
communication systems, such as modems and network interface
cards.
Instrumentation and Control Systems: The 8085 microprocessor is
commonly used in instrumentation and control systems, such as
temperature and pressure controllers.
Home Appliances: The 8085 microprocessor is used in various home
appliances, such as washing machines, refrigerators, and microwave
ovens.
Educational Purposes: The 8085 microprocessor is also used for
educational purposes, as it is an inexpensive and easily accessible
microprocessor that is widely used in universities and technical
schools.
Issues in 8085 microprocessor :
Here are some common issues with the 8085 microprocessor:
Overheating: The 8085 microprocessor can overheat if it is used for
extended periods or if it is not cooled properly. Overheating can
cause the microprocessor to malfunction or fail.
Power Supply Issues: The 8085 microprocessor requires a stable
power supply for proper operation. Power supply issues such as
voltage fluctuations, spikes, or drops can cause the microprocessor to
malfunction.
Timing Issues: The 8085 microprocessor relies on accurate timing
signals for proper operation. Timing issues such as clock signal
instability, noise, or interference can cause the microprocessor to
malfunction.
Memory Interface Issues: The 8085 microprocessor communicates
with memory through its address and data buses. Memory interface
issues such as faulty memory chips, loose connections, or address
decoding errors can cause the microprocessor to malfunction.
Hardware Interface Issues: The 8085 microprocessor communicates
with other devices through its input/output ports. Hardware
interface issues such as faulty devices, incorrect wiring, or improper
device selection can cause the microprocessor to malfunction.
Programming Issues: The 8085 microprocessor is programmed with
machine language or assembly language instructions. Programming
issues such as syntax errors, logic errors, or incorrect instruction
sequences can cause the microprocessor to malfunction or produce
incorrect results.
Research and development: The 8085 microprocessor is often used
in research and development projects, where it can be used to
develop and test new digital electronics and computer systems.
Researchers and developers can use the microprocessor to prototype
new systems and test their performance.
Retro computing: The 8085 microprocessor is still used by
enthusiasts today for retro computing projects. Retro computing
involves using older computer systems and technologies to explore
the history of computing and gain a deeper understanding of how
modern computing systems have evolved

#Topic Addressing Mode


addressing Modes– The term addressing modes refers to the way in
which the operand of an instruction is specified. The addressing
mode specifies a rule for interpreting or modifying the address field
of the instruction before the operand is actually executed.
Addressing modes for 8086 instructions are divided into two
categories:
1) Addressing modes for data
2) Addressing modes for branch
The 8086 memory addressing modes provide flexible access to
memory, allowing you to easily access variables, arrays, records,
pointers, and other complex data types. The key to good assembly
language programming is the proper use of memory addressing
modes.
An assembly language program instruction consists of two part

The memory address of an operand consists of two components:


IMPORTANT TERMS
Starting address of memory segment.
Effective address or Offset: An offset is determined by adding any
combination of three address elements: displacement, base and
index.
Displacement: It is an 8 bit or 16 bit immediate value given in the
instruction.
Base: Contents of base register, BX or BP.
Index: Content of index register SI or DI.
According to different ways of specifying an operand by 8086
microprocessor, different addressing modes are used by 8086.
Addressing modes used by 8086 microprocessor are discussed below:
Implied mode:: In implied addressing the operand is specified in the
instruction itself. In this mode the data is 8 bits or 16 bits long and
data is the part of instruction. Zero address instruction are designed
with implied addressing mode.
Immediate addressing mode (symbol #):In this mode data is present
in address field of instruction .Designed like one address instruction
format.
Note: Limitation in the immediate mode is that the range of
constants are restricted by size of address field
Register mode: In register addressing the operand is placed in one of
8 bit or 16 bit general purpose registers. The data is in the register
that is specified by the instruction.Here one register reference is
required to access the data.

Register Indirect mode: In this addressing the operand’s offset is


placed in any one of the registers BX,BP,SI,DI as specified in the
instruction. The effective address of the data is in the base register or
an index register that is specified by the instruction.
Here two register reference is required to access the data.

The 8086 CPUs let you access memory indirectly through a register
using the register indirect addressing modes.
Auto Indexed (increment mode): Effective address of the operand is
the contents of a register specified in the instruction. After accessing
the operand, the contents of this register are automatically
incremented to point to the next consecutive memory location.(R1)+.
Here one register reference,one memory reference and one ALU
operation is required to access the data.
Direct addressing/ Absolute addressing Mode (symbol [ ]): The
operand’s offset is given in the instruction as an 8 bit or 16 bit
displacement element. In this addressing mode the 16 bit effective
address of the data is the part of the instruction.
Here only one memory reference operation is required to access the
data.
#Topic Instruction set and Instruction Execution Cycle
In order for a single instruction to be executed by the CPU, it must go
through the instruction cycle (also sometimes referred to as the
fetch-execute cycle). While this cycle can vary from CPU to CPU, they
typically consist of the following stages:
Fetch
Decode
Execute
Memory Access
Registry Write-Back
In this article, we’ll go through the different stages of the instruction
cycle to gain a better understanding of how the CPU handles
instructions.
Fetching
From the moment we turn our computers on, the CPU is ready to
process instructions. As instructions come in, a register in the CPU
referred to as the Program Counter (PC) stores the memory address
of the instruction that should be processed next. When it’s time to
start processing the instruction, the CPU copies the instruction’s
memory address and stores the copied data to another register on
the CPU called the Instruction Register (IR). Once the memory of the
instruction is available, the instruction gets decoded.Think of being at
a deli. As you come in and give your order, a ticket containing your
data (name, number in line, and food order) is created and placed
somewhere that the deli staff can easily access and refer to. Once our
number comes up, then someone will start working on your order!

Decoding
The next stage in the cycle involves decoding the instruction. During
this stage, the Control Unit deciphers what the instruction stored in
the IR means. For example, the instruction could have been sent to
do an arithmetic operation or to send information to another piece
of hardware. As the instruction is decoded, they are turned into a
series of control signals that are used to execute the instruction.
Back at the deli, a staff member picks up your order ticket. Before
they start making your order, they first need to figure out what you’re
asking them to make!

Execution
In this stage, the instruction is performed! We noted that during the
decoding stage, the instruction is decoded into control signals and
sent to the correct part of the ALU to be processed and completed.So
to recap, in order to process an instruction, we need to fetch it from
memory, decode the instruction, and execute it. That’s all, right? Not
quite! Sometimes a few extra stages need to occur before or after
execution.
Memory Access
The memory access stage is used to retrieve any required data
necessary to execute an instruction. This stage only occurs if the
instruction requires data from memory.

You might also like