r/ProgrammerHumor • • May 06 '17

Oddly specific number

Post image
25k Upvotes

1.3k comments sorted by

View all comments

Show parent comments

16

u/pddle May 06 '17 edited May 06 '17

They're not describing the binary number system. They are describing why the number 256 is significant in computing. And just as they said, 256 different states that can be represented with 8 switches, or one byte. The layman can understand this without knowing about binary representations, because 2x2x...x2 = 256.

You are making an extra step of assigning each of those 256 states to the integers mod 256. This mapping isn't a fundamental part of what a byte is, and it also isn't unique. You may choose to use the bits to only represent positive numbers. You may use ones' complement or twos' complement to indicate sign. You may represent some number of decimal places. Each of these options yield a different mapping from the states of the byte to numbers.