Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

Program to find 2's Complement of given binary number

Posted By: Dominic Brown     Category: Assembly Language     Views: 4707

An Assembly Language Program to find 2's Complement of given binary number.

Code for Program to find 2's Complement of given binary number in Assembly Language

Data Segment
  num dw 00000010B
Data Ends

Code Segment
  Assume cs:code, ds:data

  Begin:
    mov ax, data
    mov ds, ax
    mov es, ax
    mov ax, num
    NOT ax
    add ax, 00000001B

  Exit:
    mov ax, 4c00h
    int 21h
Code Ends
End Begin
  
Share: 


Didn't find what you were looking for? Find more on Program to find 2's Complement of given binary number Or get search suggestion and latest updates.

Dominic Brown
Dominic Brown author of Program to find 2's Complement of given binary number is from London, United Kingdom.
 
View All Articles

 

Other Interesting Articles in Assembly Language:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!