MIC Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Shree Ambabai Talim Sanstha’s

SANJAY BHOKARE GROUP OF INSTITUTES, MIRAJ


FACULTY OF POLYTECHNIC
Institute Code: 1552

Department Of ----------------- Engineering


Micro Project Report
On

Project Title
Prepared By

Roll no. Enrolment No. Name

Under the Guidance of


Name Of Faculty

Submitted To

Maharashtra State Board of Technical Education, Mumbai


(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
Academic Year 2020-2021

1
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for individual micro project report)

This is to certify that Mr. / Ms. ………………………………………………………


Roll No. ……………….…., of ………... Semester of Diploma
in………………….. Engineering , of Institute ATS Sanjay Bhokare Group Of
Institutes, Faculty Of Polytechnic, Miraj. (Code: 1552) has completed the Micro-
Project work satisfactorily in course ………………………………. ( ) for
the academic year 20…….. to 20…….. as prescribed in the curriculum.

Place: …………… Enrollment No:.……………

Date: …………… Exam. Seat No: ……………

Subject Teacher Head of the Department Principal

2
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for Micro Project Group report )

This is to certify that following students,

Roll no. Enrolment No. Exam Seat No. Name

of …….. Semester of Diploma in………………….. Engineering , of Institute


ATS Sanjay Bhokare Group Of Institutes, Faculty Of Polytechnic, Miraj.
(Code: 1552) are completed the Micro Project work satisfactorily in course
………………………………. ( ) for the academic year 20…….. to 20……
as prescribed in the curriculum.

Place: ……………
Date: ……………

Subject Teacher Head of the Department Principal

3
Annexure – I

PART A – Micro-Project Proposal

Flag Register
1.0 Brief Introduction
The flag register in a microprocessor is a special-purpose register that stores status
flags indicating the outcome of arithmetic and logic operations. Common flags include Zero
Flag (Z), Carry Flag (C), Sign Flag (S), and Overflow Flag (V), providing essential
information for program control and decision-making. These flags help in conditional
branching and error detection within the processor's operations.
The flag register is a 16-bit register in the Intel 8086 microprocessor that contains information
about the state of the processor after executing an instruction. It is sometimes referred to as
the status register because it contains various status flags that reflect the outcome of the last
operation executed by the processor.

2.0 Aim of the Micro-Project ( in about 1 to 2 Sentences)


This Micro-Project aims at:
1. Performing Actions Based on Flags
2. Define Flag Register

3.0 Intended Course Outcomes


 Analyze the functional block diagram of 8086
 Write assembly language program for the given problem.
 Use instructions for different addressing modes.
 Develop assembly language program using assembler.
 Develop assembly language program procedures, macros and modular programming
approach.

4.0 Literature Review


The flag register in a microprocessor plays a pivotal role in executing and controlling
operations. This critical component is a collection of individual bits, each representing a
specific condition or status. In the literature, researchers have extensively explored the
significance of these flags in enhancing the efficiency and reliability of microprocessor-based
systems.

One key aspect discussed is the impact of flag registers on conditional branching. Scholars
highlight how the state of flags influences decision-making processes within the
microprocessor, allowing for dynamic and responsive program execution. This capability is
fundamental for implementing various control structures and optimizing program flow.

4
Moreover, literature emphasizes the role of flags in arithmetic and logic operations.
Researchers delve into how flags serve as indicators of results, aiding in error detection and
facilitating error-handling mechanisms. Understanding the intricate interplay between flags
and computation is crucial for designing robust algorithms and ensuring the accuracy of
mathematical operations.

Security considerations surrounding the flag register are also explored in the literature. With
the increasing prevalence of security threats in microprocessor-based systems, researchers
investigate potential vulnerabilities associated with flag manipulation. This area of study aims
to develop strategies for safeguarding flag registers against unauthorized access or malicious
tampering.

Additionally, advancements in microprocessor architecture and design are a recurring theme


in the literature. Scholars delve into novel approaches for optimizing flag register utilization,
exploring techniques to reduce power consumption, enhance performance, and support a
broader range of applications.

In conclusion, the literature review underscores the multifaceted role of flag registers in
microprocessor functionality. From influencing program flow to ensuring the accuracy of
computations and addressing security concerns, researchers continue to unravel the
complexities of flag registers, contributing to the ongoing evolution of microprocessor
technology.

4.0 Proposed Methodology


Flag Register of 8086 Microprocessor

Status & Control Flags

The flag register of 8086 is a 16-bit register that contains 16 flip-flops. So, it can store a
maximum of 16-bit of data. Out of 16-bits, 9-bits are used as flags as shown in the below
figure These nine flags are divided into two parts as status flags and control flags.

Status Flags:

In the flag register, 6 out of 9 flags are used as status flags. When the microprocessor
performs an arithmetic or logical operation in ALU, then depending upon the status of the
result, the microprocessor will store corresponding status bits 0 or 1 in status flags. The status
flags are,

o Carry flag (CF)


o Parity flag (PF)
o Auxiliary carry flag (AF)
o Zero flag (ZF)

5
o Sign flag (SF), and
o Overflow flag (OF).

The flag register in a microprocessor is crucial for indicating and managing the status of various
operations. A proposed methodology could involve defining specific bits within the flag register to
represent different conditions or statuses. For example:

 Zero Flag (Z): Set if the result of an operation is zero.


 Carry Flag (C): Set if there is a carry-out or borrow into the high-order bit during arithmetic
operations.
 Sign Flag (S): Indicates the sign of the result, typically the most significant bit.
 Overflow Flag (V/O): Set if the result of a signed operation exceeds the representable range.
 Parity Flag (P): Indicates whether the number of set bits in the result is even or odd.

5.0 Resources Required (major resources like raw material, tools, software etc.)
S. No. Name of Resource/material Specifications Qty Remarks
1 Software
2 Books
3
4
5

6
6.0 Action Plan (Sequence and time required for major activities for 8 Weeks)
S. No. Details of activity Planned Planned Name of
Start date Finish date Responsible Team
Members
1
2

********

Annexure – II
PART B – Micro-Project Report

7
Flag Register

1.0 Rationale
The flag register in a microprocessor is a special-purpose register that stores status flags
indicating the outcome of arithmetic and logic operations. Common flags include Zero Flag
(Z), Carry Flag (C), Sign Flag (S), and Overflow Flag (V), providing essential information for
program control and decision-making. These flags help in conditional branching and error
detection within the processor's operations.
The flag register is a 16-bit register in the Intel 8086 microprocessor that contains information
about the state of the processor after executing an instruction. It is sometimes referred to as
the status register because it contains various status flags that reflect the outcome of the last
operation executed by the processor.

2.0 Course Outcomes Addressed


 Analyze the functional block diagram of 8086
 Write assembly language program for the given problem.
 Use instructions for different addressing modes.
 Develop assembly language program using assembler.
 Develop assembly language program procedures, macros and modular programming
approach.

3.0 Literature Review

The flag register in a microprocessor plays a pivotal role in executing and


controlling operations. This critical component is a collection of individual bits, each
representing a specific condition or status. In the literature, researchers have extensively
explored the significance of these flags in enhancing the efficiency and reliability of
microprocessor-based systems.

One key aspect discussed is the impact of flag registers on conditional branching. Scholars
highlight how the state of flags influences decision-making processes within the
microprocessor, allowing for dynamic and responsive program execution. This capability is
fundamental for implementing various control structures and optimizing program flow.

Moreover, literature emphasizes the role of flags in arithmetic and logic operations.
Researchers delve into how flags serve as indicators of results, aiding in error detection and
facilitating error-handling mechanisms.
Understanding the intricate interplay between flags and computation is crucial for designing
robust algorithms and ensuring the accuracy of mathematical operations.

8
Security considerations surrounding the flag register are also explored in the literature. With
the increasing prevalence of security threats in microprocessor-based systems, researchers
investigate potential vulnerabilities associated with flag manipulation. This area of study aims
to develop strategies for safeguarding flag registers against unauthorized access or malicious
tampering.

Additionally, advancements in microprocessor architecture and design are a recurring theme


in the literature. Scholars delve into novel approaches for optimizing flag register utilization,
exploring techniques to reduce power consumption, enhance performance, and support a
broader range of applications.

In conclusion, the literature review underscores the multifaceted role of flag registers in
microprocessor functionality. From influencing program flow to ensuring the accuracy of
computations and addressing security concerns, researchers continue to unravel the
complexities of flag registers, contributing to the ongoing evolution of microprocessor
technology.

4.0 Actual Methodology Followed


In microprocessors, the flag register, also known as the status register, typically contains
various condition flags that reflect the outcome of arithmetic or logical operations. The actual
methodology for flag handling can vary among different microprocessor architectures, but I'll
provide a general overview.

Zero Flag (Z): Set if the result of an operation is zero.

Carry Flag (C): Set if there's a carry-out from the most significant bit during addition or
borrow during subtraction.

Sign Flag (S): Reflects the sign of the result (negative or positive).

Overflow Flag (V or O): Indicates if an arithmetic operation resulted in an overflow.

Parity Flag (P): Reflects the parity (even or odd) of the result.

Auxiliary Carry Flag (AC): Used in BCD (Binary-Coded Decimal) arithmetic to indicate a
carry-out from the lower nibble (4 bits).

The methodology involves updating these flags based on the outcome of operations. For
example:

9
o Addition: Set flags based on whether there's a carry or overflow.
o Subtraction: Set flags based on borrow or overflow.
o Logical Operations (AND, OR, XOR): Set flags based on the resulting value.
o Shift and Rotate Operations: Update flags as bits are shifted or rotated.

The specific instructions and conditions that affect the flags vary between processor
architectures (e.g., x86, ARM). Assembly language instructions often directly impact these
flags, allowing programmers to make decisions based on the status of these flags in subsequent
instructions.

5.0 Actual Resources Used (Mention the actual resources used).

S. No. Name of Resource/material Specifications Qty Remarks


1
2

6.0 Outputs of the Micro-Project

The 8086 flag register contents indicate the results of computation in the ALU. It also
contains some flag bits to control the CPU operations.

10
(a) A 16 bit flag register is used in 8086. It is divided into two parts . o Condition code or status
flags o Machine control flags
(b) The condition code flag register is the lower byte of the 16-bit flag register. The condition
code flag register is identical to 8085 flag register, with an additional overflow flag.
(c) The control flag register is the higher byte of the flag register. It contains three flags namely
direction flag (D), interrupt flag (I) and trap flag (T).

Figure below shows the details of the 16 bit flag register of 8086 CPU.

(A) It consists of 9 active flags out of 16. The remaining 7 flags marked ‘U’ are undefined flags.
(B) These 9 flags are of two types:

(A) 6 Status flags


(B) 3 Control flags

Status flags:

 Carry flag (CY)-


 It is set whenever there is a carry or borrow out of the MSB (most significant bit) of a result.
D7 bit for an 8 bit operation and D15 bit for a 16 bit operation.
 Parity flag (PF)-
 It is set if the result has even parity. If parity is odd, PF is reset.
 This flag is normally used for data transmission errors.

 Auxiliary carry flag (AC)-

 It is set if a carry is generated out of the lower nibble.


 It is used only in 8 bit operations like DAA and DAS.

 Zero flag (ZF)-

11
 It is set if the result is zero.

 Sign flag (SF)-

 It is set if the MSB of the result is 1. For signed operations such a number is treated as
negative.

 Overflow flag (OF)-

 It will be set if the result of a signed operation is too large to fit in the number of bits available
to represent it.
 It can be checked using the instruction INTO (Interrupt on Overflow).
 Control flags:

 Trap flag (TF)-


 It is used to set the trace mode i.e. start single stepping mode.
 Here the microprocessor is interrupted after every instruction so that the program can be
debugged.

 Interrupt enable flag (IF)-

 It is used to mask (disable) or unmask (enable) the INTR interrupt.


 If user sets IF flag, the CPU will recognize external interrupt requests. Clearing IF disables
these interrupts.

 Direction flag (DF)-

 If this flag is set, SI and DI are in auto-decrementing mode in string operations.

7.0 Skill Developed / learning out of this Micro-Project

In a microprocessor micro-project focused on the flag register, you likely developed skills
related to understanding and manipulating status flags. This includes mastering the flags
associated with arithmetic operations (carry, overflow, sign, zero, etc.).

Additionally, you may have enhanced your knowledge of bitwise operations and conditional
branching, crucial for efficient programming in assembly language. These skills are
foundational for low-level programming and optimizing code execution in a microprocessor
environment.

8.0 Applications of this Micro-Project

12
Conditional Execution: Flag registers are crucial for conditional branching, allowing the
microprocessor to execute specific instructions based on conditions such as zero, carry, or sign
flags.

 Arithmetic Operations: Utilizing flags for arithmetic operations like addition and
subtraction enables error detection and handling overflow conditions.

 Logical Operations: Flag registers are employed in logical operations (AND, OR,
XOR) to indicate the status of the result, aiding decision-making in subsequent
instructions.

 Bit Manipulation: Flag bits can be used for efficient bit-level manipulations, enabling
operations like setting, clearing, or toggling specific bits.

 Interrupt Handling: Flag registers play a role in managing interrupts, allowing the
microprocessor to respond appropriately to external events without disrupting its
current execution flow.

 Data Comparison: Flag registers are essential for comparing data, helping the processor
make decisions based on the relationship between two values.

 Shift and Rotate Operations: Flag bits are involved in shift and rotate operations,
indicating whether there is a carry or borrow during these bitwise manipulations.

 Status Reporting: Flag registers provide a quick way to report the status of certain
conditions, aiding debugging and monitoring of the microprocessor's state.

9.0 Area of Future Improvement

One area of future improvement for flag registers in microprocessors could involve enhancing
their versatility by adding new flags or optimizing existing ones for specific operations.
Additionally, improvements in power efficiency and real-time responsiveness could be
explored to enhance overall processor performance.

********

13
Annexure – III

Teacher Evaluation Sheet

Name of Student: ………………………………………………………… Enrollment No.


……………………………………
Name of Programme………………………………………………… Semester:
………………………………………… Course Title
……………………………………………………………….. Code:
………………………………………………………………

Title of the Micro-Project:


…………………………………………………………………………………………………….

(For Office Use Only)


Course Outcomes Achieved
……………………………………………………………………………………………………………………
…………………………..
……………………………………………………………………………………………………………………
……………………………
……………………………………………………………………………………………………………………
…………………………….
Evaluation as per Suggested Rubric for Assessment of Micro Project
 (Please tick in appropriate cell for each characteristic)
S. Characteristic Poor Average Good Excellent
No to be assessed ( Marks 1-3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
.
1 Relevance to the Relate to very Related to some Take care of at- Take care of more
course few LOs Los least one CO than one CO
 ..
2 Literature Not more than At-least 5 relevant At –least 7 About 10 relevant
Survey two sources sources, at least 2 relevant sources, sources, most
/information (primary and latest most latest latest
collection secondary), very
old reference

3 Completion of Completed less Completed 50 to Completed 60 to Completed more


the Target as than 50% 60% 80% than 80 %
per project
proposal
4 Analysis of Data Sample Size Sufficient and Sufficient and Enough data
and small, data appropriate appropriate collected by
representation neither organized sample, enough sample, enough sufficient and
nor presented data generated but data generated appropriate sample
well not organized and which is organized size. Proper
not presented well. and presented well inferences drawn
No or poor but poor by organising and
inferences drawn inferences drawn presenting data
through tables,

14
S. Characteristic Poor Average Good Excellent
No to be assessed ( Marks 1-3 ) ( Marks 4 - 5 ) ( Marks 6 - 8 ) ( Marks 9- 10 )
.
charts and graphs.

5 Quality of Incomplete Just Well Well


Prototype/Mode fabrication/asse assembled/fabricat assembled/fabricat assembled/fabricat
l mbly. ed and parts are ed with proper ed with proper
not functioning functioning parts. functioning parts.
well. Not in proper In proper shape, In proper shape,
shape, dimensions within tolerance within tolerance
beyond tolerance dimensions and dimensions and
limit. good good
Appearance/finish finish/appearance. finish/appearance.
is shabby. But no creativity Creativity in
in design and use design and use of
of material material

6 Report Very short, poor Nearly sufficient Detailed, correct Very detailed,
Preparation quality sketches, and correct details and clear correct, clear
Details about about methods, description of description of
methods, material, methods, methods,
material, precautions and materials, materials,
precaution and conclusion, but precautions and precautions and
conclusions clarity is not there Conclusions. conclusions.
omitted, some in presentation. Sufficient Graphic Enough tables,
details are wrong But not enough Description. charts and sketches
graphic
description.

7 Presentation Major Includes major Includes major Well organized,


information is information but information and includes major
not included, not well organized well organized but information ,well
information is and not presented not presented well presented
not well well
organized .
8 Any other
(depending upon
nature of project:
please write
indicators by
pen)
Defense Could not reply Replied to Replied properly Replied most of
9 to considerable considerable to considerable the questions
number of number of number of properly
question. questions but not question.
very properly

15
MIcro-Project Evaluation Sheet

Process Assessment Product Assessment Total


Part A - Project Methodology Part B - Project individual Mark
Project (2 marks) Report/Working Model Presentation/Viva s
Proposal (2 marks) (4 marks) 10
(2 marks)

Note:
Every course teacher is expected to assign marks for group evolution for each group of students in first 3
columns as per rubrics & individual evaluation in 4TH column for each group of students as per rubrics based
on viva.

Comments/Suggestions about team work/leadership/inter-personal communication (if any)


………………………………………………………………………………………………
……………………………………………………………………………………………..
……………………………………………………………………………………………..
……………………………………………………………………………………………..

Any Other Comment:


……………………………………………………………………………………………
……………………………………………………………………………………………
……………………………………………………………………………………………
………………………………………………………………………………………………

Name and designation of the Faculty Member…………………………………….

Signature………………………………………………………………………………

Date:………………………..

16

You might also like