Q. Show the Subtraction Method?
For this procedure (method), start with a weighted position value greater that the number. If the number is greater than the weighted position for the digit, write down a 1 and subtract the weighted position value.
If a number is less than the weighted position for the digit, write down a 0 and subtract 0 this process is continued until the result is 0 and when performing the subtraction, the digits which will represent the binary equivalent of the decimal number are written beginning at the most significant digit (the left) and each new digit is written to the next lesser significant digit (on the right) of the previous digit. Consider the same number as 2671 using a different method.
Weighted Value
|
Subtraction
|
Remainder
|
Binary Number
|
2^12 = 4096
|
2671 - 0
|
2671
|
0
|
2^11 = 2048
|
2671 - 2048
|
623
|
0 1
|
2^10 = 1024
|
623 - 0
|
623
|
0 10
|
2^9 = 512
|
623 - 512
|
111
|
0 101
|
2^8 = 256
|
111 - 0
|
111
|
0 1010
|
2^7 = 128
|
111 - 0
|
111
|
0 1010 0
|
2^6 = 64
|
111 - 64
|
47
|
0 1010 01
|
2^5 = 32
|
47 - 32
|
15
|
0 1010 011
|
2^4 = 16
|
15 - 0
|
15
|
0 1010 0110
|
2^3 = 8
|
15 - 8
|
7
|
0 1010 0110 1
|
2^2 = 4
|
7 - 4
|
3
|
0 1010 0110 11
|
2^1 = 2
|
3 - 2
|
1
|
0 1010 0110 111
|
2^0 = 1
|
1 - 1
|
0
|
0 1010 0110 1111
|