DEPARTMENT OF COMPUTER ENGINEERING
Subject: Microprocessor Programming Subject Code:313302
Semester:4th Semester Course: COMPUTER ENGINEERING
Laboratory No: L003 Name of Subject Teacher: ANJALI
GHARAT
Name of Student: Yuvraj yadav Roll Id:23203A0036
Experiment No: 1
Title of Identification of various blocks in 8086 microprocessor
Experiment
Practical Related
1. State the functions of ALU.
Functions of the ALU (Arithmetic Logic Unit):
The Arithmetic Logic Unit (ALU) is a critical component of a computer's CPU
responsible for performing arithmetic and logical operations.
1. Arithmetic Operations:
Performs basic mathematical calculations such as:
o Addition (ADD)
o Subtraction (SUB)
o Multiplication (MUL)
o Division (DIV)
Supports increment (INC) and decrement (DEC) operations.
2. Logical Operations:
Performs bitwise operations, including:
o AND (AND)
o OR (OR)
o XOR (Exclusive OR) (XOR)
o NOT (Complement) (NOT)
Used for decision-making processes in a program.
3. Comparison Operations:
Compares two values and sets flags based on conditions:
o Equal to (CMP)
o Greater than
o Less than
o Zero flag (ZF), Carry flag (CF), Overflow flag (OF) help in decision making.
4. Bitwise Shift and Rotate Operations:
Shift Left (SHL) and Shift Right (SHR): Move bits left or right.
Rotate Left (ROL) and Rotate Right (ROR): Circular bit rotation.
5. Boolean Logic Operations:
Used in control systems and decision-making.
Involves combinations of logical gates for condition evaluation.
6. Address Calculation:
Helps in memory addressing for instruction execution.
Used in array indexing, pointer arithmetic, and memory allocation.
7. Flag Register Updates:
ALU updates flags (Zero Flag, Carry Flag, Parity Flag, etc.), which affect
conditional operations and branching.
2. Draw flag register format of 8086.
Flag format of 8086 is :
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
x x x x OF DF IF TF SF ZF x AF x PF x CF
Bit Position Flag Name
0 CF Carry Flag Set if there is a
carry/borrow in
arithmetic
operations.
2 PF Parity Flag Set if the number
of 1s in the result is
even.
4 AF Auxiliary Carry Set if there is a
Flag carry from lower
nibble (used in
BCD operations).
6 ZF Zero Flag Set if the result of
an operation is
zero.
7 SF Sign Flag Set if the result is
negative (MSB is
1).
8 TF Trap Flag Used for
debugging;
enables single-step
execution.
9 IF Interrupt Enables/disables
Flag external interrupts
(1 = Enable, 0 =
Disable).
10 DF Direction Used in string
Flag operations (1 =
Decrement, 0 =
Increment).
11 OF Overflow Set if an arithmetic
Flag operation results in
an overflow.
Draw the functional block diagram of 8086 microprocessor