Home » Embedded Systems

1's and 2's Compliment of 8 bits number in 8085 Microprocessor

Here, we are going to learn how to perform 1's and 2's compliment on 8 bits number in 8085 Microprocessor?
Submitted by Akash Kumar, on October 19, 2018

1's compliment of 8 bits number

Problem statement:

To perform 1'scompliment of 8 bits number using 8085 microprocessor.

Algorithm:

  1. Load the accumulator with the first data.
  2. Compliment the content of accumulator.
  3. Now load the result value in memory location.

Program:

    LDA     2050   
    CMA 
    STA     2052

Observation:

    INPUT: 
    2050:05

    OUTPUT: 
    2052:FA

Hence, we successfully find the compliment of 8 bits number.

2's compliment of 8 bits number

Problem statement:

To perform 2'scompliment of 8 bit number using 8085 microprocessor.

Algorithm:

  1. Load the accumulator with the first data
  2. Compliment the content of accumulator
  3. ADD 01 to the content of accumulator
  4. Now load the result value in memory location

Program:

    LDA     2050   
    CMA 
    ADI     01
    STA     2052

Observation:

    INPUT: 
    2050:05

    OUTPUT: 
    2052:FB

Hence, we successfully find the 2's compliment of 8 bits number






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.
Learn PCB Designing: PCB DESIGNING TUTORIAL







Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing » Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.