−30.75 16.375
Express the following base 10 numbers in two’s complement binary fixed-point numbers with eight integer bits and eight fraction bits. Express your answer in hexadecimal. (Note: You should show all steps)
- −30.75
- 16.375
2's complement:-
2's complement is used for representing the negative binary numbers into their positive equivalents into the binary number system. It is used in binary arithmetic and makes it easy to understand and solve. It can be signed or unsigned, in signed the most significant bit of the number represents the sign of the number, 0 for positive and 1 for negative.
For example:-
-4 in 8-bit binary is 00000100 and for 2's complement, convert it into 1's complement and add 1.
1's complement : 11111011
2's complement : 11111011 + 1 = 11111100
Note : The 2's complement of the positive number is same as it's binary conversion and negative number's 2's complement is calculated by taking 1's complement and adding 1 in it.
Step by step
Solved in 3 steps