1's complement vs 2's complement-Difference between 1's complement and 2's complement
This page on 1's complement vs 2's complement describes basic difference between 1's complement and 2's complement.
1's complement
The formula for finding 1's complement of a number is as follows:
N' = (2n - 1) - N
Where,
n = number of bits per word
N = Positive Integer
N' = -N in 1's complement Notation
EXAMPLE:
Input: 8 bit word, N = 6
N' = (28 - 1) - 6
N' = 249
N' = (11111001)2
How to find 1's complement of a binary number:
In order to find 1's complement take bit by bit complement of the binary number.
EXAMPLE: N = 6 = (00000110)2
1's complement of N = N' = (11111001)2
2's complement
The formula for finding 2's complement of a number is as follows:
N* = 2n - N
Where,
n = number of bits per word
N = Positive Integer
N* = -N in 2's complement Notation
EXAMPLE:
Input: 8 bit word, N = 6
N* = 28 - 6
N* = 250
N* = (11111010)2
How to find 2's complement of a binary number:
In order to find 2's complement; start at the right end of the binary number and
complement each bit to the left of the first "1" in the number.
EXAMPLE: N = 6 = (00000110)2
2's complement of N = N* = (11111010)2
Find 2's complement from 1's complement
➨In order to determine 2's complement, add 1 to LSB of 1's complement.
what is difference between
difference between FDM and OFDM
Difference between SC-FDMA and OFDM
Difference between SISO and MIMO
Difference between TDD and FDD
Difference between 802.11 standards viz.11-a,11-b,11-g and 11-n
OFDM vs OFDMA
CDMA vs GSM
Bluetooth vs zigbee
Fixed wimax vs mobile