Quick links
Latest articles
Internship
Members
New...
Algorithms
Discrete Mathematics
Big data
Languages
C
C++
C++ STL
Java
Data Structure
C#.Net
Android
Kotlin
SQL
Web
PHP
Python
JavaScript
CSS
Ajax
Node.js
Web prog.
Programs
C
C++
DS
Java
C#
Python
Aptitude
C
C++
Java
DBMS
Interview
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

Home » Embedded Systems

2's Compliment of 8 bits number with carry



Here, we are going to learn how to find 2's compliment of 8 bits number with carry using 8085 microprocessor?
Submitted by Akash Kumar, on November 03, 2018

Problem statement:

To find the 2’s compliment of 8 bits number with carry using 8085 microprocessor.

Algorithm:

  1. Load number in accumulator.
  2. Compliment the content of accumulator.
  3. Add 01 to the content of accumulator.
  4. Store the 2s compliment in memory location 3050.
  5. The carry which is generated during calculating the 2s compliment is stored at memory location 3051.
  6. Terminate the program.

Program:

	LDA     2050
	CMA
	ADI     01
	MOV     L, A
	MVI     A, 00
	ADC     A
	MOV     H, A
	SHLD    2051
	HLT

Observation:

    INPUT: 
    2050:07

    OUTPUT: 
    2051:00
    2052:F9

Hence we successfully calculated 2s compliment of 8 bit number with carry on 8085 microprocessor.






Quick links:
C FAQ(s) C Advance programs C/C++ Tips & Tricks Puzzles JavaScript CSS Python Linux Commands PHP Android Articles More...

Featured post:
Introduction to Linux (Its modes, Safety, Most popular Applications)
Linux Best Distribution Software (Distros) of 2018

Was this page helpful? Please share with your friends...

Are you a blogger? Join our Blogging forum.

Comments and Discussions



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 (2015-2018), Some rights reserved.