Computer Science, asked by aakashrai655, 5 months ago

Employee of Dell Mr.Rajesh had a been given a code which is in signed binry 5bit code (0.101). He has to locate the digital password which is in decimal. After decoding the password obtained is

Answers

Answered by dadapp67
0

Answer:by me it come 58125

Answered by mad210203
0

0101 (In Binary) = 5 (In Decimal)

Explanation:

  • Signed binary numbers are of two types:
  1. The MSB (Left most bit) is 0.
  2. The MSB (Left most bit) is 1.
  • If the MSB bit is equal to 0, it represents a positive number.
  • If the MSB bit is equal to 1, it represents a negative number.

To convert a signed binary number to decimal number, follow the below steps.

  • If the MSB bit is 0, follow these steps.
  1. Convert the binary number into decimal number.
  2. The result after converting is the password.
  • If the MSB bit is 1, follow these steps.
  1. Flip all the bits present in the binary number.
  2. Now, add 1 to the above number.
  3. Convert the above result to decimal number.
  4. Add negative symbol in front of the number.

Our number is 0101.

  • The leftmost bit is a 0, it means that, our number is positive.
  • Now, convert it to decimal number.

\Rightarrow 0101=0\times2^3+1\times2^2+0\times2^1+1\times2^0

\Rightarrow 0101=0\times8+1\times4+0\times2+1\times1

\Rightarrow 0101=0+4+0+1

\Rightarrow 0101=5

Therefore, after decoding, the password will be 5.

Similar questions