|
ABSTRACT
Title |
: |
Operations on Signed Numbers |
Authors |
: |
Naika Sateesh Kumar, Muduganti Rathan Reddy, Y. Srinivas, J. Vijayasekhar, V K Narla |
Keywords |
: |
SAR, ROL, ROR, Overflow |
Issue Date |
: |
January 2013 |
Abstract |
: |
Signed integers are normally represented using 2’s complement representation. Addition and subtraction of signed numbers is done similar to that of unsigned numbers. However carry (or borrow) is simply ignored. Unlike unsigned number carry (or borrow) does not mean overflow or error. Doubling of a signed number can be done by shift left. However, halving of a signed number cannot be done by shift right. Hence special arithmetic instruction SAR (Shift arithmetic right) is needed.
We have defined an alternative representation for signed numbers. Here a positive number is represented by appended a zero (0) at right. Here a negative number is represented by inverting all bits in corresponding positive number. Two signed numbers are added by adding corresponding binary representation. After that carry is added to the result. Similarly two signed numbers are subtracted by subtracting corresponding binary representation. After that borrow is subtracted. Doubling and halving is done by ROL (Rotate left) and ROR (Rotate right) respectively. |
Page(s) |
: |
44-48 |
ISSN |
: |
2229-3345 |
Source |
: |
Vol. 4, Issue.1 |
|
|
|