suppose that we ahve the following 8bit binary value 1001101

suppose that we ahve the following 8-bit binary value.

10011011

1) What is the decimal value of this binary word if we interpret it as an unsigned 8-bit integer? Explain your calculation.

2) What is the decimal value of this binary word if we interpret it as a two\'s complement 8-bit integer? Explain your calculation.

3) What is the decimal value of this binary word if we interpret it as a signed-magnitude 8-bit integer? Explain your calculation.

Solution

10011011

1) What is the decimal value of this binary word if we interpret it as an unsigned 8-bit integer? Explain your calculation.

2) What is the decimal value of this binary word if we interpret it as a two\'s complement 8-bit integer? Explain your calculation.

3) What is the decimal value of this binary word if we interpret it as a signed-magnitude 8-bit integer? Explain your calculation.

Solution of 1) - part.

For unsigned binary to decimal conversion we multiply number by 2 powers and then finally add all the result...

1          0          0          1          1          0 1 1

1

0

0

1

1

0

1

1

27

26

25

24

23

22

21

20

128 + 0 +      0 +   16 +      8   +     0       +   2        +   1

= 155

Multiply both the rows by 2’s power add them

The decimal of (10011011)2---------- (155)10

Solution of 2) - part.

For converting it in 2’s complement

Step 1)- first we check the number is +ve or –ve for this we check the left most bit if it is 1 the number is –ve if bit is 0 then number is +ve

                             In our case first bit is 1 so the number is –ve. But this case for signed magnitude in question you not mention for this..

1

0

0

1

1

0

1

1

Now we change the bit from 1 to 0 and 0 to 1.then what we get.

0

1

1

0

0

1

0

0

Step 2)- now we reverse the bit like 1--à 0 and 0 --à 1 Look below

Multiply both the rows by 2’s power and add them

Then add 1 in right most bit   after adding Multiply both the rows by 2’s power add them look below

0

1

1

0

0

1

0

0

Add 1 in right most bit 1

0

1

1

0

0

1

0

1

0         +   64     +    32   +         +     0      + 4        +    0       +   1

                           = (101)

        

(10011011)2à(01100101)2   2’s complement

Solution of 3) - part.

The signed magnitude represent the binary number with signed the Left most bit is called signed bit if the

Bit is 1 the number is negative if the bit is bit is 0 then the number is positive.

                             In our case first bit is 1 so the number is –ve

Then left bit is not multiply by 2\'s power but we multiply rest bits with 2’s power and add them

1

0

0

1

1

0

1

1

--

26

25

24

23

22

21

20

                   0 +    0   + 16   + 8 +   0     + 1 +   0     

= -(25)

Calculate the decimal number --

The Left most bit was 1 so the number is –ve .

(10011011)2-------------------------------à -(25)10

1

0

0

1

1

0

1

1

27

26

25

24

23

22

21

20

128 + 0 +      0 +   16 +      8   +     0       +   2        +   1

= 155

suppose that we ahve the following 8-bit binary value. 10011011 1) What is the decimal value of this binary word if we interpret it as an unsigned 8-bit integer
suppose that we ahve the following 8-bit binary value. 10011011 1) What is the decimal value of this binary word if we interpret it as an unsigned 8-bit integer
suppose that we ahve the following 8-bit binary value. 10011011 1) What is the decimal value of this binary word if we interpret it as an unsigned 8-bit integer

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site