Live data from Hacker News

C++ proposal: There are exactly 8 bits in a byte

open-std.org

91–100 of 357 posts

Re: C++ proposal: There are exactly 8 bits in a byte

#92
post #61

Earlier quoted context omitted.

Eight is a nice power of two.

Can you explain how that's helpful? I'm not being obtuse, I just don't follow

Because modern computing has settled on the Boolean (binary) logic (0/1 or true/false) in the chip design, which has given us 8 bit bytes (a power of two). It is the easiest and most reliable to design and implement in the hardware.

On the other hand, if computing settled on a three-valued logic (e.g. 0/1/«something» where «something» has been proposed as -1, «undefined»/«unknown»/«undecided» or a «shade of grey»), we would have had 9 bit bytes (a power of three).

10 was tried numerous times at the dawn of computing and… it was found too unwieldy in the circuit design.

Re: C++ proposal: There are exactly 8 bits in a byte

#93
post #80

Previously, in JF's "Can we acknowledge that every real computer works this way?" series: "Signed Integers are Two’s Complement" https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p09... >

Maybe specifying that floats are always IEEE floats should be next? Though that would obsolete this Linux kernel classic so maybe not. https://github.com/torvalds/linux/blob/master/include/math-e...

That line is actually from a famous Dilbert cartoon.

I found this snapshot of it, though it's not on the real Dilbert site: https://www.reddit.com/r/linux/comments/73in9/computer_holy_...

Re: C++ proposal: There are exactly 8 bits in a byte

#95
post #25

Is C++ capable of deprecating or simplifying anything? Honest question, haven't followed closely. rand() is broken,I;m told unfixable and last I heard still wasn't deprecated. Is this proposal a test? "Can we even drop support for a solution to a problem literally nobody has?"

C++ long ago crossed the line where making any change is more work than any benefit it could ever create.

Re: C++ proposal: There are exactly 8 bits in a byte

#97

Not sure about that, seems pretty controversial to me. Are we forgetting about the UNIVACs?

This would be a great setup for a time travelling science fiction where there is some legacy UNIVAC software that needs to be debugged, and John Titor, instead of looking for an IBM 5100, came back to the year 2024 to find a pre-P3477R0 compiler.

Re: C++ proposal: There are exactly 8 bits in a byte

#99
post #61

Earlier quoted context omitted.

Eight is a nice power of two.

Can you explain how that's helpful? I'm not being obtuse, I just don't follow

Many circuits have ceil(log_2(N_bits)) scaling wrt to propagation delay/other dimensions so you’re just leaving efficiency on the table if you aren’t using a power of 2 for your bit size.

Re: C++ proposal: There are exactly 8 bits in a byte

#100

D made a great leap forward with the following: 1. bytes are 8 bits 2. shorts are 16 bits 3. ints are 32 bits 4. longs are 64 bits 5. arithmetic is 2's complement 6. IEEE floating point and a big chunk of wasted time trying to abstract these away and getting it wrong anyway was saved. Millions of people cried out in relief! Oh, and Unicode was the character set. Not EBCDIC, RADIX-50, etc.

"1. bytes are 8 bits"

How big is a bit?

Post reply on HN