user
What is the conversion of -1630 from decimal to binary base?
alphonsio

-1630 in binary (2's complement on 16 bits) is: 1111 1001 1010 0010

(1630)10=(1111 1001 1010 0010)2(-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 16301630 by 22 and note the remainder at each step:

  • 1630÷2=8151630 \div 2 = 815, remainder 0
  • 815÷2=407815 \div 2 = 407, remainder 1
  • 407÷2=203407 \div 2 = 203, remainder 1
  • 203÷2=101203 \div 2 = 101, remainder 1
  • 101÷2=50101 \div 2 = 50, remainder 1
  • 50÷2=2550 \div 2 = 25, remainder 0
  • 25÷2=1225 \div 2 = 12, remainder 1
  • 12÷2=612 \div 2 = 6, remainder 0
  • 6÷2=36 \div 2 = 3, remainder 0
  • 3÷2=13 \div 2 = 1, remainder 1
  • 1÷2=01 \div 2 = 0, remainder 1

Reading the remainders from bottom to top, the binary conversion of 16301630 is :

(1630)10=(11001011110)2(-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)

  • Inverted: 00110100001

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(-1630)_{10}=(1111~1001~1010~0010)_2