Represent the decimal values 26 2123 as signed 10bit numbers

Represent the decimal values 26, 2123 as signed, 10-bit numbers using each of the following binary formats:

(a) Sign-and-magnitude;   (b) 2’s complement.

Solution

1.) a.) Sign and magnitude:

2610 = (0000011010)2

In sign magnitude, MSB represents the sign bit. For positive numbers, sign bit is 0 and for negative numbers sign -bit is 1.

b.) In 2\'s complement form, positive numbers are stored directly like sign-magnitude representation. Therefore, in 2\'s complement 26 will be represented as:

2610 = (0000011010)2

Q2.) a.) Using 10-bits, maximum no. we can represent in sign-magnitude is 2^9 -1 i.e., 511. So, we can\'t represent 2123 in 10-bit sign magnitude representation.

b.) Similarly, using 10-bits, maximum no. we can represent in 2\'s complement form is 2^9 -1 i.e., 511. So, we can\'t represent 2123 in 10-bit 2\'s complement representation.

Hope it helps. Do give your feedback.

Represent the decimal values 26, 2123 as signed, 10-bit numbers using each of the following binary formats: (a) Sign-and-magnitude; (b) 2’s complement.Solution1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site