Question

In: Computer Science

Binary How is 00001001 (base 2) represented in 8-bit two’s complement notation? Convert 0.3828125 to binary...

Binary

How is 00001001 (base 2) represented in 8-bit two’s complement notation?


Convert 0.3828125 to binary with 4 bits to the right of the binary point.


How is 00110100 (base 2) represented in 8-bit one's complement.  

Solutions

Expert Solution

1)
flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00001001 is flipped to 11110110
Add 1 to above result
11110110 + 1 = 11110111
Answer: 11110111

2)
Converting 0.3828125 to binary
Convert decimal part first, then the fractional part
> First convert 0 to binary
Divide 0 successively by 2 until the quotient is 0
Read remainders from the bottom to top as
So, 0 of decimal is  in binary
> Now, Convert 0.38281250 to binary
   > Multiply 0.38281250 with 2. Since 0.76562500 is < 1. then add 0 to result
   > Multiply 0.76562500 with 2. Since 1.53125000 is >= 1. then add 1 to result
   > Multiply 0.53125000 with 2. Since 1.06250000 is >= 1. then add 1 to result
   > Multiply 0.06250000 with 2. Since 0.12500000 is < 1. then add 0 to result
   > Multiply 0.12500000 with 2. Since 0.25000000 is < 1. then add 0 to result
   > Multiply 0.25000000 with 2. Since 0.50000000 is < 1. then add 0 to result
   > Multiply 0.50000000 with 2. Since 1.00000000 is >= 1. then add 1 to result
   > This is equal to 1, so, stop calculating
0.3828125 of decimal is 0.0110001 in binary
so, 0.3828125 in binary is 0.0110001
if you need only 4 bits, answer is 0.0110
Answer: 0.0110

3)
flip all the bits. Flip all 0's to 1 and all 1's to 0.
   00110100 is flipped to 11001011
Answer: 11001011

Related Solutions

Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
Convert -122 to 8-bit sign magnitude, 1's complement and 2's complement
1. What is the two’s complement of: 00110101 2. Carry out the following calculation using 8-bit...
1. What is the two’s complement of: 00110101 2. Carry out the following calculation using 8-bit signed arithmetic (convert to 8-bit binary sequences) and use two’s complement for the negative number, give the result as both an 8-bit binary sequence and in base 10: 127 – 74. 3. What does shifting a binary sequence to left by 3 places correspond to (from the arithmetic standpoint)
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary...
(6 marks- 3 marks each) The following hexadecimal values are shorthand for 16-bit two’s complement binary numbers. Working purely in hex, negate each and then state whether the result is positive or negative. (a) 5E91 (b) D00F 2.
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert...
1a. Convert 67 (base 10) to 8-bit binary using signed magnitude. Show your work. 1b. Convert 69 (base 10) to 8-bit binary using one’s complement. Show your work 1c. Convert 70 (base 10) to 8-bit binary using two’s complement. Show your work. 1d. Convert - 67 (base 10) to 8-bit binary using signed magnitude. 1e. Convert - 67 (base 10) to 8-bit binary using ones compliment. Show your work. 1f. Convert - 67 (base 10) to 8-bit binary using 2s...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT