Jump to content

SOS: Assembly Code for Adding and Subtracting Binary

- - - - -

  • Please log in to reply
1 reply to this topic

#1
falconlogs

falconlogs

    Newbie

  • Members
  • Pip
  • 1 posts
Hello Guys,

I hope you can help me with my requirement in assembly.


I need a code with an input that can add and subtract binary.

Example Output:

Enter Operation You Want to Execute, Press 1 for Addition Press 2 for Subtract

You selected Addition

Enter the 1st 4bit binary:
1001 (here the user will input a binary)
Enter the 2nd 4bit binary
0001 (here the user will input a binary)


The answer is: 1010

Press Enter to return or ESC to end this program.




:cool:

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
A few things:

1) You don't specify if you're using special libraries given to you by your professor or if you have to rely on interrupt routines.

2) We don't do your homework for you. We'll help but we won't do it. If you post some of your work or at least your thought process we'll help you in the right direction.

Edited by dargueta, 26 October 2010 - 11:57 AM.
I am an idiot.

sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users