Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
1google
Posts: 1
Registered: ‎04-19-2011
0

Subtraction operation

hi

 

all i need is how  ADSU8 do the Subtraction operation i did some operation but i cant understand how  for exemple 2-5=252

7-9=253 why

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Subtraction operation

[ Edited ]

You need to learn about signed numbers and signed arithmetic.

 

Read this article, and let us know if your results are completely understood.

 

In pure unsigned, radix-256 arithmetic, 02h - 05h = FDh (253d).  In signed 8-bit notation, FDh = -2

If you perform a subtract-with-borrow rather than a simple subtract, result would be FCh (252d), or -3 in signed 8-bit notation.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.