Concept
How much information can one or more bytes store?
Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk / Chapter 1
"Capacity How large a value can a byte store? There are 8 bits, and each one can independently have either of two values (0 or 1), so by the Fundamental Theorem of Counting, there are 2 8 different combinations. This works out to 256, but we can’t actually store the number 256 in a byte if we’re using the bit pattern 00000000 2 (or 00 16 ) to represent zero. The highest value would be 11111111 2 (or FF 16 ), which is 256 10 . How do we store a number larger than that? Simply use more than one byte, of course. If we used two bytes of memory, and treated them as concatenated one after the other, that would give us 16 bits, allowing us to store up to the number 0000000000000000 2 = FFFF 16 = 65,535 10 . We’d call one of these bytes — the one representing the 2 0 ’s place up to the 2 7 ’s place — the least significant byte , and the other one — containing places 2 8 through 2 15 — the most significant byte. Extending to more than two bytes to accommodate even larger numbers is done in the obvious way."
Related Ideas
- How do you convert between binary and hexadecimal using nibbles?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
- Why is binary, or base 2, used in computer science?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- How does a base determine the symbols and place values used to represent numbers?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- Why is hexadecimal used in computer science, and what do its digits represent?Stephen Davies, Ph.D. Version 2.2.2 Through Discrete Mathematics A Cool Brisk Walk · Chapter 1
- 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
- What are the representable range and overflow rules for two’s-complement numbers?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