Tuesday, July 2, 2013

          The program status word (PSW) register is an 8-bit register.It is also referred to as the flag register. Although the PSW register is 8 bits wide, only 6 bits of it are used by the 8051.The two unused bits are user-definable flags. Four of the flags are called conditional flags, meaning that they indicate some conditions that result after an instruction is executed. These four are CY (carry), AC (auxiliary carry), P (parity), and OV (overflow).As seen from below figure, the bits PSW.3 and PSW.4 are designated as RS0 and RS1 as register selection bit, respectively, and are used to change the bank registers.The PSW.5 and PSW.l bits are general-purpose status flag bits and can be used by the programmer for any purpose. In other words, they are user definable. See below Figure for the bits of the PSW register.


FORMAT OF PSW OF 8051 

The following is a brief explanation of four of the flag bits of the PSW register. The impact of instructions on these registers is then discussed.
how the bits of PSW are change after arithmetic & logical operation?


CY, the carry flag
  • This flag is set whenever there is a carry out from the D7 bit. 
  • This flag bit is affected after an 8-bit addition or subtraction. 
  • It can also be set to 1 or 0 directly by an instruction such as “SETB C” and “CLR C” where “SETB C” stands for “set bit carry” and “CLR C” for “clear carry”.
AC, the auxiliary carry flag
  • If there is a carry from D3 to D4 during an ADD or SUB operation, this bit is set; otherwise, it is cleared. 
  • This flag is used by instructions that perform BCD (binary coded decimal) arithmetic.
P, the parity flag
  • The parity flag reflects the number of 1 s in the A (accumulator) register only. 
  • If the A register contains an odd number of Is, then P = 1. Therefore, P = 0 if A has an even number of 1s.
OV, the overflow flag
  • This flag is set whenever the result of a signed number operation is too large, causing the high-order bit to overflow into the sign bit. 
  • In general, the carry flag is used to detect errors in unsigned arithmetic operations. 
  • The overflow flag is only used to detect errors in signed arithmetic operations
instruction that affect flags of PSW



69 comments:

Satyam singh said...

Awesome

Satyam singh said...

Thanks

Unknown said...

Awesome

Unknown said...

this is same to same word copy from mazdi

Unknown said...

This was so good to store all above info permanently in mind

Unknown said...

Yes

Rushikesh Koyale said...

Awesome

ap2v said...

Are you looking for Devops Training in delhi? AP2V Academy is the best option for you! We are one of the best DevOps Training provider academies in Delhi, India. We Also conduct DevOps Training, AWS Training, GCP Course, Linux Courses training, etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323

ap2v said...

Are you looking for AWS Training in delhi? AP2V Academy is the best option for you! We are one of the best AWS Training provider academies in Delhi, India. We Also conduct python Training DevOps Training, GCP courses, Linux Courses training, etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323.

ap2v said...

Are you looking for AWS Training in Gurgaon? AP2V Academy is the best option for you! We are one of the best AWS Training provider academies in Gurgaon, India. We Also conduct DevOps Training, DevOps Training, GCP courses, Linux Courses training, etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323.

ap2v said...


Are you looking for Python Training in Gurgaon? AP2V Academy is the best option for you! We are one of the best Python Training provider academies in Gurgaon, India. We Also conduct DevOps Training, GCP courses, Linux Courses training, AWS Training etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323.

ap2v said...

Are you looking for Python Training in Noida? AP2V Academy is the best option for you! We are one of the best Python Training provider academies in Noida, India. We Also conduct DevOps Training, GCP courses, Linux Courses training, AWS Training etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323.

ap2v said...

Are you looking for AWS Training in Noida? AP2V Academy is the best option for you! We are one of the best AWS Training provider academies in Noida, India. We Also conduct DevOps Training, GCP courses, Linux Courses training, Python Training etc. Online live interactive classrooms with lifetime recording videos & 24*7 support. For more information- 92103 33323.

Anonymous said...

Domminik is the best online cricket shop for cricket equipment in Sydney, and we offer premium quality Batting Leg Guard, "Kookaburra cricket balls" at unbeatable prices.

AIHM said...

Are you looking for Diploma in Food Production Jaipur? Each diploma program equips students in the basic areas of specialization and institutes to provide hands-on training to students in the institute kitchens and laboratories. with the student community as it guarantees them jobs in the hospitality industry immediately upon completion.

Anonymous said...

Ghanta kuch nhi samaja 😂

ap2v said...

Are you looking for Microsoft Azure Training In Delhi? AP2V Academy is the best option for you We are one of the Microsoft Azure Training provider academies in Delhi, India. For More information contact us - 92103 33323.

appu ghar said...

The best water park in Gurgaon AppuGhar is one of the best waterparks to enjoy the most amazing and trending water slides and spread across an area of 10 acres,

Reiasindia said...

Ready to Move Affordable Flats in Gurgaon. Reias India is providing the best Flats at a very affordable and reasonable price. the space is situated in a prime location in Gurgaon.

Reiasindia said...
This comment has been removed by the author.
Eduyush India said...

Want to know more about the ACCA Subjects and what will be the syllabus like Business and Technology, Management Accounting and Financial Accounting you will gonna learn all about this topics in this blog Click here To learn more

Reiasindia said...

Book New Projects in Gurgaon, you can buy all pre-launch, under construction, or upcoming projects and property at a relevant price in the second largest city of Haryana.

appu ghar said...

Appu Ghar provides a low price for oyster water park tickets booking online . Get the best Deals & offer on Online tickets Booking at AppuGhar Gurgaon. Book Now.

astrologer said...

Looking for an online astrologer in Gurgaon? Look no further than Mahakali Jyotish Kendra. Our experienced astrologers can answer all of your questions about love, career, and more. Contact us today!

Barman Eye Care said...


Barmen Eyecare is One of the best Eye Care Clinic in Gurgaon, we have the most experienced eye surgeons Team. We have the Best technology, and painless treatments with hight class equipment

AIHM said...

At Agarwal Institute Of Hotel Management, you can choose
diploma in food production in Jaipur
to adapt and meet challenges within a range of roles and responsibilities. AIHM is known for its quality education and wide-ranging programs.
Our motive is to focus on the upskill the aspiring youngsters for serving the global society.

Reiasindia said...

Looking for the latest treatment for dry eye Syndrome in Gurgaon you are facing problems in wearing contact, driving at night, and Reddening of eyes. No worry Barman EyeCare Can solve all your dry eye-related problems

ACSA JAIPUR said...

If you are looking for best competition coaching in Jaipur? Agrasen civil services Academy (ACSA), is one of the top competition coaching in Jaipur. We have a team of professionals Faculty members in Rajasthan.Our motive is to focus on the upskill the aspiring youngsters of the society.

Reiasindia said...

Are you Looking For a good Commercial Space in Gurgaon For your Office use. your search is Over now Reias India is providing the best Commercial property at good reasonable Price.you will get a work friendly Envirment

AIHM said...

Agarwal Institute of Hotel Management is the best HM college in Jaipur. If you are interested, Aihm is the best option for you. Placing yourself on a scale of personal growth is especially important for a hotel industry.

astrologer said...

If you are looking for a Husband-wife problem solution in Gurgaon? you should contact Mahakali Jyotish Kendra and consult with the best astrologer in Gurgaon.

Eduyush India said...

Do you want to know about the ACCA Exam Fees or any details regarding this certification like where you can get ACCA Online courses Study material, and the Semester Fees of this particular certification?

Eduyush India said...


The COSO Framework stands for the Committee of Sponsoring Organizations of the Treadway Commission. It is a framework that organizations can use to manage enterprise risk. If you want to know more about the History, components, and Principals of the COSO Framework read this blog now.

AIHM said...

Do you know which institute is best for civil services preparation? ACSA is the reputed and very famous Institute for Civil Services Coaching in Jaipur.

Shadanga– Kerala’s Ayurveda said...

Are you looking for a Ayurvedic massage for your weight loss woes? We have the perfect solution for you! Our ayurvedic massage therapy is a holistic technique that helps balance your body, mind and soul.

Shadanga– Kerala’s Ayurveda said...

Panchakarma treatment is a way of healing your body using five elements: air, fire, water, earth and space. Shadanga is providing a complete detox treatment, and it can help with a wide variety of health issues. Panchakarma can help with anxiety, stress, and depression, as well as many other health problems.

zeenysolution said...
This comment has been removed by the author.
SRV associates said...

looking for best virtual CFO service in India. Whether you're a fast-growing startup or an established business, there's no denying the value of a solid CFO.The best virtual CFO service will save you time, money, and resources as we take care of all aspects of this important role for your company.

Anonymous said...

Very informative Model Business Corporation Act

Haut Monde said...

This one is the best stylish budget hotel available in Gurgaon with all ultramodern amenities included and stylish value for your plutocrat. For travelers looking for 5-star hotels in Gurgaon Hotel Haut Monde Gurgaon is one of the best business hotels in Gurgaon well known for its homely feel and hospitality hygienic and budget-friendly. it offers 24/7 room service and very good room service along with free parking and AC rooms.

EControlDEvice said...

APIR motion sensor is an electronic sensor that measures infrared light emitted by objects. PIR sensor. These are commonly used in PIR-based motion detectors, security alarms, and automatic lighting applications.

Godrej Pest Control said...

Cockroaches are among the most challenging pests to eradicate because they have incredible survival
skills and have even been known to last one week without a head. One of the greatest treatments
for cockroach control services, is
offered by Godrej Pest Control in Gurgaon and is based on the gel formulation, which has been tried and tested by professionals.

Godrej Pest Control said...


The Certified pest control services in Gurgaon. Godrej pest control provides total Services for cockroaches, mosquitoes, rodents, bedbugs, pigeons, ants, honeybees, Termite, Spider, Fly completely devoted to removing all types of pest control-related problems with the use of state-of-the-art technology and non-toxic chemicals.

sswing said...

We take pleasure in our dedication to provide children the best possible care and education, making Sswingspreschool is the most reliable learning partner and daycare in Gurgaon. We encourage kids to explore, create, and dream in order to develop their foundations and get them ready for the future. We do this by putting extensive safety procedures and protocols in place, as well as a carefully prepared curriculum.

JoGenii Online said...

You can buy best learning toys for 3 year old kids. JoGenii will be a great place to find different toys and we offers the most affordable prices for educational toys. These types of wonderful toys are available as jigsaw puzzles, wooden puzzles, cubes, and brain teasers. Jigsaw puzzles and wooden puzzles are great to help learn about colours and shapes.

Vishwakarma Automobiles said...

The bestcar ac repair in Gurgaonis provided
by Vishwakarma Automobiles.We offer high-quality,reasonably cost-effective AC services and promised excellent
outcomes that are backed by a warranty.

Haut Monde said...

Looking for a 4 star hotel in Gurgaon? look no further than the Haut Monde Hotel.The hotel also offers a wide range of amenities for business travellers, including function rooms, boardrooms, and even a business centre. Plus, you'll have access to free Wi-Fi and high-speed internet throughout the hotel. All of these features make the Haut Monde Hotel the perfect place to stay during your visit

NRS Kitchen said...

NRSKitchen is one of the most reputable and best
restaurant equipment Manufacturers in Delhi
. It has more than 15 years of experience
serving a number of industrial kitchens.We provide high-quality, specialist cooking equipment
that is tailored to your needs.

Vishwakarma Automobiles said...

Gurgaon has plenty to offer in terms of auto repair. Highly equipped workshops at Vishwakarma Automobiles provide you the greatest services, excellent quality, best prices, and genuine spare parts for routine maintenance.The best car service in Gurgaon have the knowledge and tools necessary to do the task swiftly and correctly. Phone now.

aceheart said...

If you are looking for the best cardiologist in Mohali With a team of highly qualified and experienced professionals, ACEheartinstitute is the premier cardiology clinic in Mohali, you can feel the warm and friendly atmosphere and the staff’s commitment to providing the highest quality of care. Their futuristic facility is equipped with the latest technology to ensure that their patients receive the best care possible. They offer the highest quality of care, so you can rest assured that you are in good.

APPWARS Technologies said...
This comment has been removed by the author.
Soapboxstudios said...

Soapbox Studios is the best photographer in Gurgaon. We specialize in wedding, family, and commercial photography.
Our team is dedicated to providing you with excellent service and quality images.we offer a variety of services that will help make your photo experience unforgettable

sswing said...

Best Preschool in Gurgaon and Activity Centre is one of the leading preschools in Gurgaon, builds a strong foundation for children’s future. We offers holistic education that meets international standards, it has a friendly, fun, warm, safe nurturing and stress-free environment.

Anonymous said...

I've found that classroom management software has helped me create a more collaborative and engaging classroom environment. The communication tools and group discussion features allow my students to work together more effectively and learn from each other.

Poshace said...

Are you looking for the best-refurbished macbook in India for your budget? We are excited to introduce you to our best macbook for your professional career. All our devices are working perfectly and are 100% tested for a better experience. It can help you to do heavy task and projects in an easy way and its powerful processor help you to gain unlimited faster experience. Battery life is very strong you don't need to worry about charge time to time. That's why we have a great business of refurbished macbook air India in the market

NRS Kitchen said...

NRSKitchen is one of the premier Bakery Equipment Manufacturer . The company has been providing top-notch bakery equipment for many years, boasting an excellent track record in terms of quality and efficiency. NRSKitchen has a wide range of products to choose from.

Saurabh said...

Linux is one of the most popular and widely used operating systems in the world today. It is known for its stability, security, and open-source nature, which makes it a favorite among developers and IT professionals. if you want to learn Linux Classes in Pune is best for you!

Anonymous said...
This comment has been removed by the author.
Saurabh said...

Are you looking for Linux Training in Pune? Well, Join IT Education Centre for the Best Linux Certification & Training in Pune. Claim your ✔ FREE Demo Class now.

Lime Tree Hotels said...

Amazing Blog Post, Thanks for sharing. Hotels in Gurugram

Eduyush India said...

Leading the sustainability movement, Eduyush provides ESG certification to businesses looking to have a beneficial influence on the environment, society, and government. Our thorough certification programme assesses a company's performance and practises in crucial areas including ethical governance, reducing carbon footprints, and employee wellbeing.

Loomstay said...

Hotels in Delhi NCR Loomstay is the ideal destination for comfort and elegance among. Our hotel, which is tucked away in the centre of the city, offers a seamless fusion of contemporary elegance and first-rate service and the best option for a memorable stay hotel in Delhi NCR thanks to its excellent location and attentive service.

aaryuvedam said...

Best Ayurveda Center in Gurugram | Ayurvedic Physician in Gurugram
In Gurgaon, there are several reputed Ayurvedic treatment centers that offer a range of therapies and treatments based on Ayurvedic principles. AARYUVEDAM - Best Ayurvedic Treatment in Gurgaon and Ayurvedic clinic in Gurgaon- This Ayurvedic clinic in Gurgaon focuses on Panchakarma treatments, detoxification therapies, and Ayurvedic consultations. They have qualified Ayurvedic doctors and therapists.

Eduyush India said...

The ACCA course in 2023 continues to represent dedication to quality in the field of finance and accounting, giving access to a world of job options and professional development. Eduyush offers a variety of study alternatives for ACCA courses, including in-person classes, online courses, and self-study programs.

Appwars Technologies Pvt. Ltd. said...

Excellent blog! I learned a lot. Looking forward to more content like this. Thanks for sharing valuable and informative knowledge through this blog. If you are looking for
Python Training in noida
Data Science Training in noida
full stack development training in noida
Software Testing Training in Noida
Digital Marketing Training in Noida

Muskan said...

Your explanation of the PSW register in the context of the 8051 microcontroller is clear and insightful. The breakdown of the flags, including CY, AC, P, and OV, along with their impact on arithmetic and logical operations, adds a valuable layer of understanding for those working with microcontrollers. I appreciate the detailed explanation of each flag and how they are affected by various instructions. Keep up the informative content!

Also Read: Python for Data Analysis From Basics to Advanced Techniques

Blogger said...
This comment has been removed by the author.
College of Hospitality Administration said...

Are you looking for hotel management courses in jaipur
? Each diploma program equips students in the basic areas of specialization and institutes to provide hands-on training to students in the institute kitchens and laboratories. with the student community as it guarantees them jobs in the hospitality industry immediately upon completion.

Anonymous said...

jio

Related Posts Plugin for WordPress, Blogger...
Subscribe to RSS Feed Follow me on Twitter!