Does the concept of 2\'s complement work for any number system? Is there such a
ID: 1936062 • Letter: D
Question
Does the concept of 2's complement work for any number system? Is there such a thing as a 10's complement to use for decimal numbers?Explanation / Answer
YES To understand binary numbers, begin by recalling elementary school math. When we first learned about numbers, we were taught that, in the decimal system, things are organized into columns: H | T | O 1 | 9 | 3 such that "H" is the hundreds column, "T" is the tens column, and "O" is the ones column. So the number "193" is 1-hundreds plus 9-tens plus 3-ones. Years later, we learned that the ones column meant 10^0, the tens column meant 10^1, the hundreds column 10^2 and so on, such that 10^2|10^1|10^0 1 | 9 | 3 the number 193 is really {(1*10^2)+(9*10^1)+(3*10^0)}. As you know, the decimal system uses the digits 0-9 to represent numbers. If we wanted to put a larger number in column 10^n (e.g., 10), we would have to multiply 10*10^n, which would give 10^(n+1), and be carried a column to the left. For example, putting ten in the 10^0 column is impossible, so we put a 1 in the 10^1 column, and a 0 in the 10^0 column, thus using two columns. Twelve would be 12*10^0, or 10^0(10+2), or 10^1+2*10^0, which also uses an additional column to the left (12). The binary system works under the exact same principles as the decimal system, only it operates in base 2 rather than base 10. In other words, instead of columns being 10^2|10^1|10^0 they are 2^2|2^1|2^0 Instead of using the digits 0-9, we only use 0-1 (again, if we used anything larger it would be like multiplying 2*2^n and getting 2^n+1, which would not fit in the 2^n column. Therefore, it would shift you one column to the left. For example, "3" in binary cannot be put into one column. The first column we fill is the right-most column, which is 2^0, or 1. Since 3>1, we need to use an extra column to the left, and indicate it as "11" in binary (1*2^1) + (1*2^0). Examples: What would the binary number 1011 be in decimal notation? Click here to see the answer Try converting these numbers from binary to decimal: 10 111 10101 11110 Remember: 2^4| 2^3| 2^2| 2^1| 2^0 | | | 1 | 0 | | 1 | 1 | 1 1 | 0 | 1 | 0 | 1 1 | 1 | 1 | 1 | 0 Click here to see the answer Return to Table of Contents Binary Addition Consider the addition of decimal numbers: 23 +48 ___ We begin by adding 3+8=11. Since 11 is greater than 10, a one is put into the 10's column (carried), and a 1 is recorded in the one's column of the sum. Next, add {(2+4) +1} (the one is from the carry)=7, which is put in the 10's column of the sum. Thus, the answer is 71. Binary addition works on the same principle, but the numerals are different. Begin with one-bit binary addition: 0 0 1 +0 +1 +0 ___ ___ ___ 0 1 1 1+1 carries us into the next column. In decimal form, 1+1=2. In binary, any digit higher than 1 puts us a column to the left (as would 10 in decimal notation). The decimal number "2" is written in binary notation as "10" (1*2^1)+(0*2^0). Record the 0 in the ones column, and carry the 1 to the twos column to get an answer of "10." In our vertical notation, 1 +1 ___ 10 The process is the same for multiple-bit binary numbers: 1010 +1111 ______ Step one: Column 2^0: 0+1=1. Record the 1. Temporary Result: 1; Carry: 0 Step two: Column 2^1: 1+1=10. Record the 0, carry the 1. Temporary Result: 01; Carry: 1 Step three: Column 2^2: 1+0=1 Add 1 from carry: 1+1=10. Record the 0, carry the 1. Temporary Result: 001; Carry: 1 Step four: Column 2^3: 1+1=10. Add 1 from carry: 10+1=11. Record the 11. Final result: 11001
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.