Courses

Signed Binary Electrical Engineering (EE) Notes | EduRev

Electrical Engineering (EE) : Signed Binary Electrical Engineering (EE) Notes | EduRev

The document Signed Binary Electrical Engineering (EE) Notes | EduRev is a part of the Electrical Engineering (EE) Course Digital Electronics.
All you need of Electrical Engineering (EE) at this link: Electrical Engineering (EE)

Signed Binary Notation

All the binary arithmetic problems looked at in Module 1.3 used only POSITIVE numbers. The reason for this is that it is not possible in PURE binary to signify whether a number is positive or negative. This of course would present a problem in any but the simplest of arithmetic.

There are a number of ways in which binary numbers can represent both positive and negative values, 8 bit systems for example normally use one bit of the byte to represent either + or âˆ’ and the remaining 7 bits to give the value. One of the simplest of these systems is SIGNED BINARY, also often called â€˜Sign and Magnitudeâ€™, which exists in several similar versions, but is commonly an 8 bit system that uses the most significant bit (msb) to indicate a positive or a negative value. By convention, a 0 in this position indicates that the number given by the remaining 7 bits is positive, and a most significant bit of 1 indicates that the number is negative.

For example:

+4510 in signed binary is (0)01011012

-4510 in signed binary is (1)01011012

Note:

The brackets around the msb (the sign bit) are included here for clarity but brackets are not normally used. Because only 7 bits are used for the actual number, the values the system can represent range from is âˆ’12710 or 111111112, to +12710.

A comparison between signed binary, pure binary and decimal numbers is shown in Table 1.4.1. Notice that in the signed binary representation of positive numbers between +010 and +12710, all the positive values are just the same as in pure binary. However the pure binary values equivalents of +12810 to +25510 are now considered to represent negative values âˆ’0 to âˆ’127.

This also means that 010 can be represented by 000000002 (which is also 0 in pure binary and in decimal) and by 100000002 (which is equivalent to 128 in pure binary and in decimal).

Signed Binary Arithmetic

Because the signed binary system now contains both positive and negative values, calculation performed with signed binary arithmetic should be more flexible. Subtraction now becomes possible by adding a negative number to a positive number, without the problems of borrow and payback described in  Fig. 1.4.1 Adding Positive Number Systems Module 1.3. However there are still problems. Look at the two Numbers in Signed Binary examples illustrated in Fig. 1.4.1 and 1.4.2, using signed binary notation. Z

In Fig. 1.4.1 two positive (msb = 0) numbers are added and the correct answer is obtained. This is really no different to adding two numbers in pure binary.

In Fig. 1.4.2 however, the negative number âˆ’5 is added to +7, the same action in fact as SUBTRACTING 5 from 7, which means that subtraction should be possible by merely adding a negative number to a positive number. Although this principle works in the decimal version the result using signed binary is 100011002 or âˆ’1210 which of course is wrong, the result of 7 âˆ’ 5 should be +2.

Fig. 1.4.2 Adding Positive & Negative Numbers in Signed Binary

Although signed binary can represent positive and negative numbers, if it is used for calculations, some special action would need to be taken, depending on the sign of the numbers used, and how the two values for 0 are handled, to obtain the correct result. Whilst signed binary does solve the problem of REPRESENTING positive and negative numbers in binary, and to some extent carrying out binary arithmetic, there are better sign and magnitude systems for performing binary arithmetic. These systems are the ONES COMPLEMENT and TWOS COMPLEMENT systems, which are described in Number Systems

Offer running on EduRev: Apply code STAYHOME200 to get INR 200 off on our premium plan EduRev Infinity!

Digital Electronics

91 videos|75 docs|8 tests

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

,

;