3 ms·
Could someone expand on this: >How a single number can be used to represent the answers to a set of yes-no questions.
by captn3m0 12y ago
Could someone expand on this:
>How a single number can be used to represent the answers to a set of yes-no questions.
- untrothy 12y agoOff the top of my head and according to what he meant by single number: - As a single entity: I usually think in decimal so you could write a "single" decimal number (e.g. 234) and convert it to binary and the 1 and 0 character mean Yes / No. - As a single character: You could just write a random character (e.g. ॐ ), specifying that is has to be interpreted as a number in Base N+1 and ॐ + 1 = 10. This is useless though.
- neilk 12y agoThink about how everything in the computer is represented as binary ones and zeroes. That's kind of weird. When a non-programmer counts 5 items in the real world, they don't think of it as being equivalent to saying "101", or "YES NO YES". Now imagine you have a set of questions like that, to be stored for kajillions of items. You can efficiently pack those yes-no questions into a single number for each item. Like, in the unix file permission system, 5 expands out to "let others read this; don't let others write this; let others execute this".
- captn3m0 12y agoThe unix perms bit made me understand it. Thanks.