Signed Numbers Conversions
Journal Title: Indian Journal of Computer Science and Engineering - Year 2011, Vol 2, Issue 1
Abstract
Signed integers are normally represented using 2’s complement representation. Addition and subtraction of signed numbers is done in the same manner as for unsigned numbers. However carry (or borrow) is simple 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 can not 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. Following are drawbacks of our system. (A) Addition is done in two stages. In the first stage the numbers are added. In the second stage carry is added. Carry can not be ignored as in 2’s complement representation. (B) Same holds for subtraction. (C) When an odd number is halved then error results. In 2’s complement representation approximate answer appears. The advantage of our system is that entire arithmetic can be carried using ordinary logical instructions. No special instruction is needed. In 2’s complement representation a special instruction SAR is needed. This instruction is not used for any other purpose.
Authors and Affiliations
J. Vijayasekhar , Y. Srinivas , N. Vamsi Krishna
A Steganography method for JPEG2000 Baseline System
Hiding capacity is very important for efficient covert communications. For JPEG2000 compressed images, it is necessary to enlarge the hiding capacity because the available redundancy is very limited. In addition, the bit...
Comparative Study for Selection of Open Source Hypervisors and Cloud Architectures under Variant Requirements
Cloud computing has been emerging as one of the prominent technologies to the end users which offers pay-asyou- go model with the help of various underlying technologies. One of such technologies is virtualization that f...
AN EXTENSIVE ANALYSIS OF MANET ATTACKS USING SPECIAL CHARACTERISTICS
Wired or Wireless network, security is the most crucial part of any data transmission. Securing Mobile Ad hoc networks is an extremely tough issue because chances of having vulnerabilities are more when comparing to conv...
Impact of Aspect Orientation on Object Oriented Software Metrics
Object Oriented Paradigm has become quite popular over recent years and has completely replaced the Procedural Oriented Paradigm. Object-Oriented Programming (OOP) encourages software reuse by providing design and langua...
A literature study on clustering the uncertainty data
Clustering is one of the important topics in data mining. The purpose of clustering is to group the similar data items. Clustering the uncertainty data is not an easy task but an essential task in data mining. Uncertain...