O'Reilly logo

8051 Microcontrollers, 2nd Edition by Subrata Ghoshal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5

ARITHMETIC OPERATIONS

CHAPTER OBJECTIVES

In this chapter, the reader is introduced to the instructions related with arithmetic operations of MCS-51. After completion of this chapter, the reader should be able to understand how to

  • Use ADD, ADDC, SUBB, INC and DEC instructions.
  • Perform unsigned integer addition and subtraction.
  • Implement multiple byte addition and subtraction.

5.1 | Introduction

In Chapter 4, we learnt how to load and copy 8-bit data from various locations using different addressing modes of 8051. As a matter of fact, except the Program Counter (PC), data may be loaded anywhere and copied from any position to any location. However, all these would be meaningless unless we are able to do some processing with these data. In this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required