193k views
3 votes
Suppose you have the following three 8-bit bytes: 01011011, 01110010, 01100100.

a) Convert to decimal and sum the values.

User Klara
by
7.5k points

1 Answer

3 votes

Final answer:

The given 8-bit bytes are converted to their decimal equivalents, which are 91, 114, and 100 respectively. Summing these numbers gives a total of 305.

Step-by-step explanation:

To convert the given 8-bit bytes to decimal and sum their values, we need to understand that each bit represents a power of 2, starting from the rightmost digit, which is the least significant bit (20). Each bit's value is the power of 2 corresponding to its position if the bit is 1. If the bit is 0, it does not contribute to the total value.

Now let's convert the bytes:

  1. 01011011: 0*(27) + 1*(26) + 0*(25) + 1*(24) + 1*(23) + 0*(22) + 1*(21) + 1*(20) = 0 + 64 + 0 + 16 + 8 + 0 + 2 + 1 = 91
  2. 01110010: 0*(27) + 1*(26) + 1*(25) + 1*(24) + 0*(23) + 0*(22) + 1*(21) + 0*(20) = 0 + 64 + 32 + 16 + 0 + 0 + 2 + 0 = 114
  3. 01100100: 0*(27) + 1*(26) + 1*(25) + 0*(24) + 0*(23) + 1*(22) + 0*(21) + 0*(20) = 0 + 64 + 32 + 0 + 0 + 4 + 0 + 0 = 100

To find the sum: 91 + 114 + 100 = 305

Therefore, the sum of the decimal values of the given bytes is 305.

User Venkata Gogu
by
8.0k points