Logo 
Search:

Assembly Language Articles

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

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

Posted By: Abelard Fischer     Category: Assembly Language     Views: 30910

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

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

Data Segment
  num db 00000010B
Data Ends

Code Segment
  Assume cs:code, ds:data

  Begin:
    mov ax, data
    mov ds, ax
    mov es, ax
    mov ah, 0000h
    mov al, num
    NOT al
    mov bl, al
    adc al, 00000001B
    mov bl, al

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



Abelard Fischer
Abelard Fischer author of An Assembly Language Program to find 2's Complement of given binary number is from Frankfurt, Germany.
 
View All Articles

 
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!