Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which one of the following is decimal value of a signed binary number 1101010, if it is in 2's complement form ?

  • A.- 42
  • B.- 22
  • C.- 21
  • D.- 106

Answer: B

The signed binary number 1101010 in 2's complement form has a leading 1, so it is negative. To find its magnitude, invert the bits to get 0010101 and add 1 to get 0010110, which is 16 + 4 + 2 = 22. So the value is -22, option (B). The value -42 in (A) is what is found by reading the number as a sign and magnitude, 1 followed by 101010 = 42, and -106 in (D) comes from taking the unsigned 1101010 = 106 and adding a negative sign. The value -21 in (C) results from inverting the bits without adding 1.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.