Concept
Why does the same binary bit pattern have different values under different representation schemes?
Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk / Chapter 1
"Finally, if we come up for air out of all this mass of details, it’s worth emphasizing that there is no intrinsically “right” way to interpret a binary number. If I show you a bit pattern — say, 11000100 — and ask you what value it represents, you can’t tell me without knowing how to interpret it. If I say, “oh, that’s an unsigned number,” then you’d treat each bit as a digit in a simple base 2 numbering scheme. You’d add 2⁷ + 2⁶ + 2² to get 196, then respond, “ah, then that’s the number 196₁₀.” And you’d be right. But if I say, “oh, that’s a sign-magnitude number,” you’d first look at the leftmost bit, see that it’s a 1, and realize you have a negative number. Then you’d take the remaining seven bits and treat them as digits in a simple base 2 numbering scheme. You’d add 2⁶ + 2² to get 68, and then respond, “ah, then that’s the number −68₁₀.” And you’d be right. But then again, if I say, “oh, that’s a two’s-complement number,” you’d first look at the leftmost bit, see that it’s a 1, and realize you’re dealing with a negative number. What is it the negative of? You’d flip all the bits and add one to find out. This would give you 00111100, which you’d interpret as a base 2 number and get 60₁₀. You’d then respond, “ah, then that’s the number −60₁₀.” And you’d be right. So what does 11000100 represent then? Is it 196, −68, or −60? The answer is any of the three, depending on what representation scheme you’re using. None of the data in computers or information systems has intrinsic meaning: it all has to be interpreted according to the syntactic and semantic rules that we invent. In math and computer science, anything can be made to mean anything: after all, we invent the rules."
Related Ideas
- How are negative numbers represented in binary?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- How does the two’s-complement scheme address the shortcomings of sign-magnitude representation?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- How do you determine the value of a positive or negative number in two’s-complement notation?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- What value does the two’s-complement bit pattern 1010 represent?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- What value would 1010 represent as a sign-magnitude number?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- What value does the binary number 1010 represent as an unsigned number?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Why does sign-magnitude representation lose one value of expressive power?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- How do place values and counting work in binary?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1