- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Subtractio n operation
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-12-2011 01:40 PM
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
Re: Subtractio n operation
[ Edited ]
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
05-12-2011 01:47 PM - edited 05-12-2011 02:11 PM
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
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.











