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

-1440 in binary (2's complement on 16 bits) is: 1111 1010 0110 0000

(1440)10=(1111 1010 0110 0000)2(-1440)_{10}=(1111~1010~0110~0000)_2


To convert the number -1440 from decimal to binary, we first convert the positive number 1440 to binary, then encode the negative sign (2's complement).

1. Absolute Value Conversion (1440)

Let's divide 14401440 by 22 and note the remainder at each step:

  • 1440÷2=7201440 \div 2 = 720, remainder 0
  • 720÷2=360720 \div 2 = 360, remainder 0
  • 360÷2=180360 \div 2 = 180, remainder 0
  • 180÷2=90180 \div 2 = 90, remainder 0
  • 90÷2=4590 \div 2 = 45, remainder 0
  • 45÷2=2245 \div 2 = 22, remainder 1
  • 22÷2=1122 \div 2 = 11, remainder 0
  • 11÷2=511 \div 2 = 5, remainder 1
  • 5÷2=25 \div 2 = 2, remainder 1
  • 2÷2=12 \div 2 = 1, remainder 0
  • 1÷2=01 \div 2 = 0, remainder 1

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

(1440)10=(10110100000)2(-1440)_ {10} = (10110100000)_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 14401440 (10110100000)

  • Inverted: 01001011111

Step 2 : Add 1

  • 01001011111 + 1 = 01001100000

Step 3 : Complete with 1s

  • Add 1's to obtain a 16-bit representation: 1111 1010 0110 0000

On 16 bits, this gives :

(1440)10=(1111 1010 0110 0000)2(-1440)_{10}=(1111~1010~0110~0000)_2