SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

 

#
Authors:
Linda Null ,julia Lobur
Chapter:
Data Representation In Computer Systems
Exercise:
Exercises
Question:7 | ISBN:9780763704445 | Edition: 3

Question

7. Using a “word” of 4 bits, list all of the possible signed binary numbers and their decimal equivalents that are representable in:

a) Signed magnitude

b) One’s complement

c) Two’s complement

TextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbookTextbook

Answer

The “word” of 4-bits means the MSB bit will specify the sign bit and the rest 3-bits will act as magnitude .

Example: -2  can be represented

Signed magnitude representation: The MSB bit is 1 for negative sign and the 2 binary value can be represented by 010 (-2 can be represented by 1010)

1(MSB)

0

1

0(LSB)

Sign          binary value of 2

One’s Compliment: invert the values of signed negative values will give the one’s compliment value : 1101

Two’s Compliment : one’s compliment +1 will give the two’s compliment meaning 1101+1=1110

So in 4-bits word one bit is reserved for  sign and the remaining 3-bits will be used for the value , so the total 3-bits value can be represented is 23= 8 values{000,001,010,011,100,101,110,111}

                                                      

Decimal

Signed Number

1’s Compliment

2’s Compliment

-7

1111

1000

1001

-6

1110

1001

1010

-5

1101

1010

1011

-4

1100

1011

1100

-3

1011

1100

1101

-2

1010

1101

1110

-1

1001

1110

1111

-0

1000

1111

-

+0

0000

0000

0000

+1

0001

0001

0001

+2

0010

0010

0010

+3

0011

0011

0011

+4

0100

0100

0100

+5

0101

0101

0101

+6

0110

0110

0110

+7

0111

0111

0111

0 0

Discussions

Post the discussion to improve the above solution.