0% found this document useful (0 votes)
24 views6 pages

ch1 Coa

The document provides an overview of the Central Processing Unit (CPU), detailing its main components such as the Control Unit, Arithmetic Logic Unit (ALU), and Memory Unit, along with their functions. It also explains primary and secondary memory types, including RAM and ROM, and describes the architecture and pin diagram of the 8085 microprocessor. Additionally, it covers the operation of various registers, interrupt signals, and the significance of the flag register in the 8085 microprocessor.

Uploaded by

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

ch1 Coa

The document provides an overview of the Central Processing Unit (CPU), detailing its main components such as the Control Unit, Arithmetic Logic Unit (ALU), and Memory Unit, along with their functions. It also explains primary and secondary memory types, including RAM and ROM, and describes the architecture and pin diagram of the 8085 microprocessor. Additionally, it covers the operation of various registers, interrupt signals, and the significance of the flag register in the 8085 microprocessor.

Uploaded by

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

Central Processing Unit (CPU) :- ✓ Control Unit: The control unit manages the CPU by sending signals like

l unit manages the CPU by sending signals like clock,


hold, and reset to its parts. It ensures all components work together to
✓ The Central Processing Unit (CPU) is like the brain of a computer.
complete tasks. For example, it synchronizes data movement from cache
✓ It’s the part that does most of the thinking, calculating, and
decision-making to make your computer work. memory to the ALU.
✓ Whether you’re playing a game, typing a school assignment, or
✓ Arithmetic and Logic Unit (ALU): The ALU handles arithmetic tasks (like
watching a video, the CPU is busy handling all the instructions to
addition, subtraction, multiplication, division) and logical tasks (like AND, OR,
get the job done.
✓ The CPU is usually placed in a special slot called a socket on the comparisons). It uses addition for all calculations, e.g., solving 2×3 as
computer’s motherboard, which is like the main circuit board that 2+2+2=6.
connects all the parts of a computer.
• Doing math calculations (like adding or multiplying ✓ Memory Unit: The memory unit stores data and instructions. Older CPUs
numbers). used registers, but modern ones also have fast cache memory. The CPU
• Running apps or games. fetches data from RAM, ROM, or hard disks and stores it in registers or
• Helping the keyboard, mouse, and screen work together. cache during tasks.
• Storing and retrieving information during tasks.
✓ Primary Memory :-
✓ Main Components of CPU ✓ It is also known as the main memory of the computer system. It is used
The components of a CPU include the ALU (Arithmetic Logic Unit), to store data and programs, or instructions during computer operations. It
CU (Control Unit), registers, cache, and clock. uses semiconductor technology and hence is commonly called
semiconductor memory.
✓ Types of Primary Memory :-

i. 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 starting
the computer. It temporarily stores programs/data which
has to be executed by the processor.
ii. 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.
read-only memory only read the programs and data that are
stored on it. It contains some electronic fuses that can be ✓ Input unit :- Computer Input unit means the device of the input
programmed for a piece of specific information. The and a part of the computer hardware which is used for the
transport of the data processing system involves the information
information is stored in the ROM in binary format. It is
devices of the computer with the control and data signals of the
also known as permanent memory.
computer. Example – Mouse, Camera, and Keyboard.
✓ Secondary Memory :- ✓ Output unit :- Computer Output is the device which deals with
✓ It is also known as auxiliary memory and backup memory. It is transmitting the data of the computer among the device and the
a non-volatile memory and used to store a large amount of data or clients. The computer is designed for humans in the form of audio
information. The data or information stored in secondary memory and video format. Example – Monitors, printers, microphones, and
is permanent, and it is slower than primary memory. A CPU cannot headphones.
access secondary memory directly. The data/information from the
auxiliary memory is first transferred to the main memory, and Pin diagram of 8085 microprocessor :-
then the CPU can access it. ✓ The 8085 microprocessor is a popular 8-bit microprocessor
✓ Types of Secondary Memory :-
developed by Intel. It has 40 pins, each with a specific function
i. Magnetic Tapes :- Magnetic tape is a long, narrow strip
for interfacing with memory, input/output devices, and other
of plastic film with a thin, magnetic coating on it that is
components.
used for magnetic recording. Bits are recorded on tape as
✓ Key Pin Descriptions :-
magnetic patches called RECORDS that run along many 1. Address Bus and Data Bus :-
tracks. Typically, 7 or 9 bits are recorded concurrently. ✓ Address Bus (A8 to A15):- The address bus is unidirectional,
Each track has one read/write head, which allows data to i.e., bits flow in one direction from the microprocessor unit to the
be recorded and read as a sequence of characters. peripheral devices and uses the higher order address bus.
✓ Address Data Bus (AD0 to AD7):- These are bi-directional data
ii. Magnetic Disks :- A magnetic disk is a circular metal or a
pins used to transfer data between the microprocessor and
plastic plate and these plates are coated with magnetic
memory or I/O devices. The microprocessor is an 8-bit processor,
material. The disc is used on both sides. Bits are stored in so it uses 8 data lines. These pins serve the dual purpose of
magnetized surfaces in locations called tracks that run in transmitting lower order address and data byte. During 1st clock
concentric rings. Sectors are typically used to break tracks cycle, these pins act as lower half of address. In remaining clock
into pieces. cycles, these pins act as data bus.
2. Control and Status Signals
iii. Cache Memory:- Cache Memory is a type of high-speed
✓ ALE - It is an Address Latch Enable signal. It goes high during
semiconductor memory that can help the CPU run faster.
first T state of a machine cycle and enables the lower 8-bits of
Between the CPU and the main memory, it serves as a
the address, if its value is 1 otherwise data bus is activated.
buffer. It is used to store the data and programs that
✓ IO/M' - It is a status signal which determines whether the
the CPU uses the most frequently.
address is for input-output or memory. When it is high(1) the
address on the address bus is for input-output devices. When it is ✓ INTR (Interrupt Request): This pin is used to request an
low(0) the address on the address bus is for the memory. interrupt from an external device.
✓ SO, S1 - These are status signals. They distinguish the various ✓ RST7.5, RST6.5, RST5.5: These are vectored interrupts
types of operations such as halt, reading, instruction fetching or
with different priority levels.
IO/M' S1 S0 Data Bus Status ✓ TRAP: This is a non-maskable interrupt and has the highest
0 1 1 Opcode fetch priority.
0 1 0 Memory read ✓ INTA (Interrupt Acknowledge): This pin is used to
0 0 1 Memory write acknowledge interrupts from external devices.
1 1 0 I/O read
5. Reset signal :-
1 0 1 I/O write ✓ RESET IN - When the signal on this pin is low(0),
1 1 1 Interrupt acknowledge the program-counter is set to zero, the
0 0 0 Halt microprocessor unit is reset.
writing. ✓ RESET OUT - This signal indicates that the MPU is being
✓ RD' - It is a signal to control READ operation. When it is low the reset. The signal can be used to reset other devices.
selected memory or input-output device is read. 6. DMA Signal :-
✓ WR' - It is a signal to control WRITE operation. When it goes ✓ HOLD - It indicates that another device is requesting the
low the data on the data bus is written into the selected memory use of the address and data bus.
or I/O location. ✓ HLDA – It is a signal which indicates that the hold request
✓ READY - It senses whether a peripheral is ready to transfer has been received after the removal of a HOLD request, the
data or not. If READY is high(1) the peripheral is ready. If it is HLDA goes low.
low(0) the microprocessor waits till it goes high. It is useful for
interfacing low speed devices.

7. Serial Input/ Output signals :-


✓ SID :- SID is a data line for serial input.
3. Power Supply and Clock Frequency :- ✓ SOD:- SOD is a data line for serial output.
✓ Vcc - +5v power supply
✓ Vss - Ground Reference Architecture of 8085 microprocessor :-
✓ XI, X2 - A crystal is connected at these two pins. The ✓ The data bus is an 8-bit bidirectional bus that transfers data
frequency is internally divided by two, therefore, to operate a between the microprocessor and memory or other devices.
system at 3MHZ the crystal should have frequency of 6MHZ. ✓ The address bus is a 16-bit unidirectional bus that specifies
✓ CLK (OUT) - This signal can be used as the system clock for memory locations and devices the microprocessor accesses.
other devices. ✓ Arithmetic and Logic Unit (ALU) :- It is used to perform
4. Interrupts and Peripheral Initiated Signals:- mathematical operations like addition, multiplication, subtraction,
division, decrement, increment, etc. Different operations are unlike random memory access. Stack pointer works in a continuous
carried out in ALU: Logical operations, Bit-Shifting Operations, and and contiguous part of the memory.
Arithmetic Operations. ✓ Temporary Register :- It is an 8-bit register that holds data
✓ Flag Register :- It is an 8-bit register that stores either 0 or 1 values during arithmetic and logical operations.
depending upon which value is stored in the accumulator. Flag ✓ Instruction register and decoder :- It is an 8-bit register that
Register contains 8-bit out of which 5-bits are important and the holds the instruction code that is being decoded. The instruction
rest of 3-bits are "don't Care conditions". is fetched from the memory.
✓ Different Fields of Flag Register ✓ Timing and Control Unit :-The timing and control unit comes
• Carry Flag under the CPU section, and it controls the flow of data from the
• Parity Flag CPU to other devices. It is also used to control the operations
• Auxiliary Carry Flag performed by the microprocessor and the devices connected to
• Zero Flag it.
• Sign Flag ✓ Interrupt Control :- Whenever a microprocessor is executing
✓ Accumulator :- Accumulator is used to perform I/O, arithmetic, the main program and if suddenly an interrupt occurs, the
and logical operations. It is connected to ALU and the internal microprocessor shifts the control from the main program to
data bus. The accumulator is the heart of the microprocessor process the incoming request. After the request is completed,
because for all arithmetic operations Accumulators' 8-bit pin will the control goes back to the main program.
always there connected with ALU and in most-off times all the ✓ There are 5 interrupt signals in 8085 microprocessors: INTR,
operations carried by different instructions will be stored in the TRAP, RST 7.5, RST 6.5, and RST 5.5.
accumulator after operation performance. ✓ Priorities of Interrupts: TRAP > RST 7.5 > RST 6.5 > RST 5.5 >
✓ General Purpose Registers :- There are six general-purpose INTR
registers. These registers can hold 8-bit values. These 8-bit ✓ Address Bus and Data Bus :- The data bus is bidirectional and
registers are B,C,D,E,H,L. These registers work as 16-bit carries the data which is to be stored. The address bus is
registers when they work in pairs like B-C, D-E, and H-L. Here unidirectional and carries the location where data is to be stored.
registers W and Z are reserved registers • The address bus and data bus are two separate buses that
✓ Program Counter :- Program Counter holds the address value of are used for communication between the microprocessor and
the memory to the next instruction that is to be executed. It is external devices.
a 16-bit register. • The Address bus is used to transfer the memory address of
✓ Stack Pointer :- The content of the register is stored that is the data that needs to be read or written. The address bus
later used in the program. It is a 16-bit special register. The is a 16-bit bus, allowing the 8085 to access up to 65,536
stack pointer is part of memory but it is part of Stack operations, memory locations.
• The Data bus is used to transfer data between the A - B) These set of instructions will reset the sign flag to 0
microprocessor and external devices such as memory and as 40 - 30 is a positive number.
I/O devices. The data bus is an 8-bit bus, allowing the 8085 ✓ Zero Flag (Z) - After any arithmetical or logical operation if
to transfer 8-bit data at a time. The data bus can also be the result is 0 (00)H, the zero flag becomes set i.e. 1,
used for instruction fetch operations, where the otherwise it becomes reset i.e. 0. 00H zero flags is 1. from
microprocessor fetches the instruction code from memory 01H to FFH zero flag is 0 1- zero-result 0- non-zero
and decodes it. result Example: MVI A 10 (load 10H in register A). SUB A (A
= A - A). These set of instructions will set the zero flag to 1
Flag register in 8085 microprocessor :- as 10H - 10H is 00H
✓ In the 8085 microprocessor, the Flag Register is a kind of 8- ✓ Auxiliary Carry Flag (AC) - This flag is used in the BCD
bit register comprising five flags that indicate the results number system(0-9). If after any arithmetic or logical
from arithmetic and logical operations.
operation D(3) generates any carry and passes it on to D(4)
✓ The Flag register is a Special Purpose Register. Depending
this flag becomes set i.e. 1, otherwise, it becomes reset i.e. 0.
upon the value of the result after any arithmetic and logical
operation, the flag bits become set (1) or reset (0). In This is the only flag register that is not accessible by the
8085 microprocessor, the flag register consists of 8 bits and programmer 1-carry out from bit 3 on addition or borrows into
only 5 of them are useful. The 5 flags are: bit 3 on subtraction 0-otherwise . Example: MVI A 2BH (load
2BH in register A) MVI 39H (load 39H in register B) ADD B
(A = A + B) These set of instructions will set the auxiliary
carry flag to 1, as on adding 2B and 39, the addition of lower-
order nibbles B and 9 will generate a carry.
✓ Parity Flag (P) - If after any arithmetic or logical operation
✓ Sign Flag (S) - After any operation if the MSB (D(7)) of the
the result has even parity, an even number of 1 bit, the parity
result is 1, it indicates the number is negative and the sign
register becomes set i.e. 1, otherwise it becomes reset i.e. 0.
flag becomes set, i.e. 1. If the MSB is 0, it indicates the
1-accumulator has an even number of 1 bits 0-accumulator has
number is positive and the sign flag becomes reset i.e. 0. from
odd parity Example: MVI A 05 (load 05H in register A) This
00H to 7F, sign flag is 0 from 80H to FF, sign flag is 1 1- MSB
instruction will set the parity flag to 1 as the BCD code of 05H
is 1 (negative) 0- MSB is 0 (positive). Example: MVI A 30 (load
is 00000101, which contains an even number of ones i.e. 2.
30H in register A). MVI B 40 (load 40H in register B). SUB B
✓ Carry Flag (CY) - Carry is generated when performing n bit
(A = A - B) . These set of instructions will set the sign flag to
operations and the result is more than n bits, then this flag
1 as 30 - 40 is a negative number. MVI A 40 (load 40H in
becomes set i.e. 1, otherwise, it becomes reset i.e. 0. During
register A) . MVI B 30 (load 30H in register B) . SUB B (A =
subtraction (A-B), if A>B it becomes reset, and if (A<B) it
becomes set. Carry flag is also called the borrow flag. 1-carry • Saves memory: The flag register can help reduce the
out from MSB bit on addition or borrow into MSB bit on amount of memory required for storing status
subtraction 0-no carry out or borrow into MSB bit. information.
• Faster execution: By using flags instead of
Example: MVI A 30 (load 30H in register A) MVI B 40 (load
performing additional operations to check conditions,
40H in register B) SUB B (A = A - B) These set of instructions
the 8085 microprocessor can execute programs more
will set the carry flag to 1 as 30 - 40 generates a quickly.
carry/borrow. MVI A 40 (load 40H in register A) MVI B 30 ✓ Disadvantages :-
(load 30H in register B) SUB B (A = A - B) These set of • Limited information: The flag register provides a
instructions will reset the carry flag to 0 as 40 - 30 does not limited set of status information that may not be
generate any carry/borrow. sufficient for all applications.
✓ Uses of Flag Register :- • Limited control: The flags in the flag register are
• Conditional branching:- The flags in the Flag register set or cleared automatically by the processor and
are used to make decisions about whether to branch to cannot be directly manipulated by the programmer.
a different instruction or not. • Complexity: The use of flags can add complexity to
• Arithmetic operations:- The Flag register is used programming and debugging, particularly when
extensively during arithmetic operations such as multiple flags are used in conjunction with one
addition, subtraction, multiplication, and division. another.
• Logical operations:- The Flag register is also used • Overwriting: Since the flag register is also used for
during logical operations such as AND, OR, and XOR. other purposes, such as storing the stack pointer,
• System calls:- The Flag register is used by the the status flags can be accidentally overwritten
operating system to determine the status of the CPU during program execution.
before and after a system call.
✓ Advantages :-
• Efficient error detection: The flag register can be
used to efficiently detect errors and other conditions
during program execution.
• Simplifies branching: The flags can be used to make
decisions about branching and other control flow
operations.

You might also like