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 ...

Get 8051 Microcontrollers, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.