In: Computer Science
1) Covert the following binary values to decimal. Do this interpreting the binary as unsigned and signed.
a. 0111 1001
b. 1000 0000
c. 1111 1111
PLEASE EXPLAIN IT IN DETAIL
*** Binary to Decimal Conversion:
** In the process of conversion of binary number to decimal
number,
1. Seperate every bit (0 or 1) in the binary
number.
2. number them from right to left starting from
0.
3. Calculate the proper base (power of 2) of that
position.
4. Multiply that value with that particular bit (0
or 1).
5. Do it for every number of every position.
6. Add all that calculated values.
* For Example-
If the binary number is 101
Then
decimal number = 1*(2^2) + 0*(2^1) + 1*(2^0)
= 4 + 0 + 1
= 5
a) 0111 1001
decimal number = 0*(2^7) + 1*(2^6) + 1*(2^5) + 1*(2^4) + 1*(2^3) +
0*(2^2) + 0*(2^1) + 1*(2^0)
= 0 + 64 + 32 + 16 + 8 + 0 + 0 + 1
= 121
b) 1000 0000
decimal number = 1*(2^7) + 0*(2^6) + 0*(2^5) + 0*(2^4) + 0*(2^3) +
0*(2^2) + 0*(2^1) + 0*(2^0)
= 128 + 0 + 0 + 0 + 0 + 0 + 0 + 0
= 128
c) 1111 1111
decimal number = 1*(2^7) + 1*(2^6) + 1*(2^5) + 1*(2^4) + 1*(2^3) +
1*(2^2) + 1*(2^1) + 1*(2^0)
= 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
= 255