0% found this document useful (0 votes)
47 views12 pages

L-3 8 Bits Microprocessor

The document discusses the architecture of an 8-bit microprocessor. It describes the main components including the ALU, registers, buses, and flags. It explains how the microprocessor uses an accumulator, flags, and temporary registers to perform arithmetic and logical operations on 8-bit data.
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)
47 views12 pages

L-3 8 Bits Microprocessor

The document discusses the architecture of an 8-bit microprocessor. It describes the main components including the ALU, registers, buses, and flags. It explains how the microprocessor uses an accumulator, flags, and temporary registers to perform arithmetic and logical operations on 8-bit data.
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/ 12

L-3

The 8 bits Microprocessor

3.1 Introduction

An 8-bit microprocessor can have at most 28 = 256 different

combinations or instructions.

However, in most microprocessors, not all of these

combinations are used. The complete set of patterns makes up

the microprocessor’s machine language.

• The 8085 uses a total of 246-bit patterns to form its instruction

set.

• These 246 patterns represent only 74 instructions.

• The reason for the difference is that some (actually most)

instructions have multiple different formats.

2- 8-bits Microprocessor Architecture

Fig.1 represents another 8 bits Von Neumann Microprocessor. It

is similar to that in Fig.1 in Chapter two. It consists of the

following modules:
• The ALU, The ALU to perform data processing function

• The General registers

• The special purpose registers

• The Control unit

• The Address Bus

• The Data Bus

• The Interrupt Vectors

• The Internal and External Data Bus

• The External Address Bus


Fig.1 The Architecture of a The 8085 (from Intel)

3 - The ALU function

Fig.1 explains the internal structure of the 8 bits Microprocessor

modules. The basic module is the ALU unit.

The ALU performs the actual numerical and logic operation

such as

‘add’, ‘subtract’, ‘AND’, ‘OR’, etc. Uses data from memory and

from the Accumulator to perform arithmetic. Always stores

result of operation in Accumulator.

Also, the ALU includes a temporary register used for holding

data temporarily during the execution of the operation. This

temporary register is not accessible by the programmer

The accumulator is an 8-bit register that is a part of

arithmetic/logic unit (ALU).

• This register is used to store 8-bit data and to perform

arithmetic and logical operations.

• The result of an operation is stored in the accumulator.

• The accumulator is also identified as register A.


4- The ALU Hardware

The ALU includes an 8 bits full adder and accumulator register.

The accumulator is known as programmable register using

dedicated instruction set to perform the basic arithmetic

operation (ADD/Sub) and logical operation. The ALU module

of the 8-bit Microprocessor performs the basic arithmetic and

logic operations using the allocated 8 bits instruction sets

(operation codes)

• The basic arithmetic and logical operations are:

• Addition/subtraction

• Logical functions

• Rotation

5- Registers

The 8085/8080A-programming model includes six registers,

one accumulator, and one flag register, as shown in Figure 1.

• In addition, it has two 16-bit registers:


• The stack pointer and the program counter. They are described

briefly as follows.

• six general-purpose registers

• to store 8-bit data; these are identified as B,C,D,E,H, and L as

shown in the figure. They can be combined as register pairs.

- BC, DE, and HL

to perform some 16-bit operations. The programmer can use

these registers to store or copy data into the registers by using

data copy instructions.

6- General Purpose Registers

• 8 bits registers

• B, C,D,E,H and L registers

• The above registers can be used as 8 bit single registers or 16

bits pair of two registers as BC,DE and HL pairs.

• H & L can be used as a data pointer (holds memory address)

• Special Purpose Registers

- Accumulator (8 bits register)


1) Store 8 bit data

2) Store the result of an operation

3) Store 8-bit data during I/O transfer

- The Program Counter (PC)

1) This is a register that is used to control the sequencing of

the execution of instructions.

2) This register always holds the address of the next instruction.

3) Since it holds an address, it must be 16 bits wide.

- The Stack pointer

1) The stack pointer is also a 16-bit register that is used to point

into memory

2) The memory this register points to is a special area called

the stack.

3) The stack is an area of memory used to hold data that will

be retrieved soon.

4) The stack is usually accessed in a Last In First Out (LIFO)

fashion.
- Instruction Register & Decoder

Instruction is stored in IR after fetched by processor

- Decoder decodes instruction in IR

Internal Clock generator 3.125 MHz internally and 6.25MHz

externally.

-Flags

The ALU includes five flip-flops, which are set or reset after an

operation according to data conditions of the result in the

accumulator and other registers. The flags are stored in the 8-bit

register so that the programmer can examine these flags (data

conditions) by accessing the register through an instruction. The

first Figure shows an 8-bit register, called the flag register,

adjacent to the accumulator. However, it is not used as a register;

five bit positions out of eight are used to store the outputs of the

five flip-flops. Fig.2 explains the five bits flags in the 8085

Microprocessor.
Fig.2 Status Flag register of 8085 Microprocessor

They are called Zero(Z), Carry (CY), Sign (S), Parity (P), and

Auxiliary Carry (AC) flags;

They are listed in the Table and their bit positions in the flag

register are shown in the Figure below. The most commonly

used flags are Zero, Carry, and Sign. The microprocessor uses

these flags to test data conditions. For example, after an addition

of two numbers, if the sum in the accumulator id larger than

eight bits, the flip-flop uses to indicate a carry called the Carry

flag (CY) is set to one.

When an arithmetic operation results in zero, the flip-flop called

the Zero(Z) flag is set to one.

These flags have critical importance in the decision-making

process of the micro- processor. The conditions (set or reset) of

the flags are tested through the software instructions. For


example, the instruction JC (Jump on Carry) is implemented to

change the sequence of a program when CY flag is set. The

thorough understanding of flag is essential in writing assembly

language programs.

The Flag Register is 8-bit register –shows the status of the

microprocessor before/after an operation.

• S (sign flag), Z (zero flag), AC (auxiliary carry flag), P

(parity flag) &CY (carry flag). Sign Flag is used for indicating

the sign of the data in the accumulator. The sign flag is set “1”

if negative (1 –negative) and is reset “0” if positive (0 –positive)

Zero Flag

• It is set if result obtained after an operation is 0 .

Carry Flag

• It is set if there is a carry or borrow from arithmetic operation

Axillary Carry Flag

• It is set if there is a carry out of bit 3

Parity Flag

• It is set if parity is even, and it is cleared if parity is odd


7- System Bus

1- Address Bus.

- Unidirectional

-Identifying peripheral or memory location

2- Data Bus, Bidirectional for Transferring data

3- Control Bus for Synchronization signals,

Timing signals, and Control signal.

- Instruction Register/Decoder

Temporary store for the current instruction of a program.

Latest instruction sent here from memory prior to execution.

Decoder then takes instruction and ‘decodes’ or interprets the

instruction. Decoded instruction then passed to next stage.

- Memory Address Register (MAR)

It holds address, received from PC, of next program instruction.

It feeds the address bus with addresses of location of the


program under execution. The size of the MAR is equivalent to

the address word.

8 - Control (Clock) Generator

Generates signals within uP to carry out the instruction which

has been decoded. In reality causes certain connections between

blocks of the uP to be opened or closed, so that data goes where

it is required, and so that ALU operations occur.


Exercise-3

1- Refer to the 8085 Microprocessor scheme explain

the functions of the followings:

- Accumulator, Temporary registers.

- ALU unit

- Flag registers

- Data bus word size.

- Instruction register

- Decoder register

- The address/Data Buffer registers

2- Explain the Hardware components of the ALU unit of 8085

Microprocessor.

3- Demonstrate the purpose of the 8 bits of the Flag register

You might also like