Question

In: Computer Science

What decimal value does the 8-bit binary number 10011110 have if: a) it is interpreted as...

What decimal value does the 8-bit binary number 10011110 have if:

a) it is interpreted as an unsigned number?

b) It is on a computer using signed-magnitude representation?

c) It is on a computer using one’s complement representation?

d) It is on a computer using two’s complement representation?

Solutions

Expert Solution

a)
=> 10011110
=> 1x2^7+0x2^6+0x2^5+1x2^4+1x2^3+1x2^2+1x2^1+0x2^0
=> 1x128+0x64+0x32+1x16+1x8+1x4+1x2+0x1
=> 128+0+0+16+8+4+2+0
=> 158
Answer: 158

b)
10011110
since left most bit is 1, this number is negative number.
convert 0011110 to decimal
=> 0011110
=> 0x2^6+0x2^5+1x2^4+1x2^3+1x2^2+1x2^1+0x2^0
=> 0x64+0x32+1x16+1x8+1x4+1x2+0x1
=> 0+0+16+8+4+2+0
=> 30
Answer: -30

c)
since left most bit is 1, this number is negative number.
so, follow these steps below to convert this into a decimal value.
I. first flip all the bits. Flip all 0's to 1 and all 1's to 0.
   10011110 is flipped to 01100001
01100001 in decimal
=> 01100001
=> 0x2^7+1x2^6+1x2^5+0x2^4+0x2^3+0x2^2+0x2^1+1x2^0
=> 0x128+1x64+1x32+0x16+0x8+0x4+0x2+1x1
=> 0+64+32+0+0+0+0+1
=> 97
Answer: -97

d)
II. Add 1 to 1's complement binary
01100001 + 1 = 01100010
III. Now convert this result to decimal value
=> 1100010
=> 1x2^6+1x2^5+0x2^4+0x2^3+0x2^2+1x2^1+0x2^0
=> 1x64+1x32+0x16+0x8+0x4+1x2+0x1
=> 64+32+0+0+0+2+0
=> 98
Answer: -98

Related Solutions

The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754...
The number –11.375 (decimal) represented as a 32-bit floating-point binary number according to the IEEE 754 standard is
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a...
Program that does conversions (i.e. decimal to hexadecimal, binary to decimal) but needs to have a drop down menu to give you the option to choose with conversion you want to go from and convert into (JOptionPane). Cannot use the conversion tool that is built-in Java. Need to use equations or some sort. Please include comments on what is happening to understand.
Write a program in C that takes as input an 8-bit binary number and prints the...
Write a program in C that takes as input an 8-bit binary number and prints the next 10 binary numbers. Define a binary number as int binNum[8]; Use binNum[0] to store the most significant (i.e., leftmost) bit and binNum[7] to store the least significant bit. Ask the user to input the first binary number with each bit separated by at least one space.
convert fraction decimal number 14/13 to acorrectly rounded binary number with 8 digits.
convert fraction decimal number 14/13 to acorrectly rounded binary number with 8 digits.
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers...
Represent -60 in binary using 8-bit signed magnitude. Add the following unsigned 8 bit binary numbers as shown. 01110101 + 00111011 Add the following unsigned 8 bit binary numbers as shown. 01000100 + 10111011
1. Given the 8 bit hex number 0x5E, what smallest hex value would you have to...
1. Given the 8 bit hex number 0x5E, what smallest hex value would you have to add to set the Overflow flag? 2. Given the 8 bit hex number 0x6E, what smallest hex value would you have to add to set the Carry Flag? Please give detailed explanation on how to solve.
Convert the decimal number, 315.56 into binary form?
Convert the decimal number, 315.56 into binary form?
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000...
Convert the following binary number (signed 32-bit floating point IEEE-754) into decimal. 0100 0011 0100 0000 0000 0000 0000 0000
convert the binary number(base 2) To Octal (base 8) to decimal (base 10) a. 101 b....
convert the binary number(base 2) To Octal (base 8) to decimal (base 10) a. 101 b. 1001 c. 101010 d.1101101 convert the number to the other base a. 253 base 10 to base 8 b. 98 base 10 to base 3 C. 1340 base 10 to base 16 D. AB Base 16 to base 8 E. 111010 base 2 to base 16 F. 1010101 base 2 to base 6 g. 69 base 10 to base 2 h . 1023 base...
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number...
Problem: Convert the following binary number to decimal. 1. 110101.101 Problem: Convert the following decimal number to fractional binary representation. 1. 103.5625
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT