-1630 in binary (2's complement on 16 bits) is: 1111 1001 1010 0010
(−1630)10=(1111 1001 1010 0010)2
To convert the number -1630 from decimal to binary, we first convert the positive number 1630 to binary, then encode the negative sign (2's complement).
1. absolute value conversion (1630)
Let's divide 1630 by 2 and note the remainder at each step:
- 1630÷2=815, remainder 0
- 815÷2=407, remainder 1
- 407÷2=203, remainder 1
- 203÷2=101, remainder 1
- 101÷2=50, remainder 1
- 50÷2=25, remainder 0
- 25÷2=12, remainder 1
- 12÷2=6, remainder 0
- 6÷2=3, remainder 0
- 3÷2=1, remainder 1
- 1÷2=0, remainder 1
Reading the remainders from bottom to top, the binary conversion of 1630 is :
(−1630)10=(11001011110)2
2. Negative sign
The negative sign is represented by the 2's complement. Invert each bit and add 1 to the result:
Step 1: invert the bits of 14401630 (11001011110)
Step 2 : Add 1
- 00110100001 + 1 = 00110100010
Step 3 : Complete with 1s
- Add 1's to obtain a 16-bit representation: 1111 1001 1010 0010
On 16 bits, this gives :
(−1630)10=(1111 1001 1010 0010)2