Bifalgorithm post · Brisk · Chapter 1

How much information can one or more bytes store?

How much information can one or more bytes store? (Brisk · Chapter 1) — "Capacity How large a value can a byte store? There are 8 bits, and each one can indepe…

Ideas in this flowchart

  • Capacity: how large a value can a byte store?
  • A byte consists of 8 bits, each independently holding 0 or 1.
  • The Fundamental Theorem of Counting gives 2^8 = 256 possible bit combinations.
  • Because 00000000₂ represents zero, a byte cannot store 256; its highest pattern is 11111111₂ = FF₁₆, representing 255.
  • Numbers larger than a byte's capacity require more than one byte.
  • Two concatenated bytes provide 16 bits of storage.
  • Sixteen bits can represent values from 0000000000000000₂ through FFFF₁₆ = 65,535₁₀.
  • The least significant byte represents positions 2^0 through 2^7.
  • The most significant byte represents positions 2^8 through 2^15.
  • Additional bytes can be added in the same way to accommodate even larger numbers.
Feed/

How much information can one or more bytes store?

Channel

Brisk

1 page

"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."

Flowchart preview
Series cover
👍
0
0 comments0 shares

Sign in to view and post comments.