1.Given that you are working with a 3-bit 2's complement system. What is the additive inverse of -4? That is, -4 + ? = 0 (zero).
2.What is the 7-bit 1's complement representation of 10101012
3.What is the 6-bit sign-magnitude representation of 1001012?
answer in decimal
1) -4 in 2's complement is 100 it's additive inverse is 4. it can't be stored inside a 3-bit 2's complement. so, inverse can not be stored inside a 3-bit 2's complement. 2) since left most bit is 1, this number is negative number. so, follow these steps below to convert this into a decimal value. first flip all the bits. Flip all 0's to 1 and all 1's to 0. 1010101 is flipped to 0101010 Now convert this result(0101010) to decimal value => 0101010 => 0x2^6+1x2^5+0x2^4+1x2^3+0x2^2+1x2^1+0x2^0 => 0x64+1x32+0x16+1x8+0x4+1x2+0x1 => 0+32+0+8+0+2+0 => 42 Answer: -42 3) since left most bit is 1, this number is negative number. 00101 Now convert 00101 to decimal value => 00101 => 0x2^4+0x2^3+1x2^2+0x2^1+1x2^0 => 0x16+0x8+1x4+0x2+1x1 => 0+0+4+0+1 => 5 Answer: -5
Get Answers For Free
Most questions answered within 1 hours.