Question:

How to Convert binary 11110011 to decimal if the number is represented as........?

by  |  earlier

0 LIKES UnLike

A. Unsigned 8-bit number

B.Signed 8-bit Excess (biased)

C. Signed 8-bit two's complement

Three questions above i require urgent help with thanks to all that can offer help

 Tags:

   Report

1 ANSWERS


  1. A) unsigned is easiest:

    1*(2^7) + 1*(2^6) + 1*(2^5) + 1*(2^4) + 0*(2^3) + 0*(2^2) + 1*(2^1) + 1*(2^0)

    = 1*(128) + 1*(64) + 1*(32) + 1*(16) + 0*(8) + 0*(4) + 1*(2) + 1*(1)

    = 128 + 64 + 32 + 16 + 2 + 1

    = 243

    For B) you usually need some number to bias by, say Excess-N where N is some number we bias by, then we solve the number and subtract the biasing N. Let's pretend N=128, then you simply subtract 128 from the SIGNED representation of the number (since you specify SIGNED):

    First, the signed version of the number is solved similarly to A - but we only solve for the first 7 digits, the 8th is the sign-bit. so, dropping the 8th bit (or sign bit):

    11110011 => 1110011 (note: sign bit was = 1)

    And solving the same way as before:

    = 1*(64) + 1*(32) + 1*(16) + 0*(8) + 0*(4) + 1*(2) + 1*(1)

    = 64 + 32 + 16 + 2 + 1

    = 115

    No since the sign bit (the 8th bit we dropped earlier) was 1, we say it's a negative number (if sign bit had been 0, we'd say it was a positive number):

    = -115

    and lastly, we subtract our N from Excess-N (we assumed 128) so:

    = -115 - N

    = -115 - 128 = -243

    For C) Since the sign bit is 1, we have a negative number..keep this in mind.

    The method for solving a negative two-compliment is to invert all bits (so 1's become 0's and 0's become 1's), and then add 1 to the last bit. It sounds complicated, but it's not:

    so flip it:

    11110011 => 00001100

    then add 1:

    00001100 + 00000001 = 00001101.

    Now, just solve as usual:

    = 00001101

    = 1*(2^3) + 1*(2^2) + 0*(2^1) + 1*(2^0)

    = 8 + 4 + 1

    = 13

    BUT remember the sign bit? It was a 1, so we have a negative number:

    = -13

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.