Live data from Hacker News

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

open-std.org

71–80 of 357 posts

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

#72

Some people are still dealing with DSPs. https://thephd.dev/conformance-should-mean-something-fputc-a... Me? I just dabble with documenting an unimplemented "50% more bits per byte than the competition!" 12-bit fantasy console of my own invention - replete with inventions such as "UTF-12" - for shits and giggles.

no doubt you've got your brainfuck compiler hard at work on this ...

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

#73
post #56

So please do excuse my ignorance, but is there a "logic" related reason other than hardware cost limitations ala "8 was cheaper than 10 for the same number of memory addresses" that bytes are 8 bits instead of 10? Genuinely curious, as a high-level dev of twenty years, I don't know why 8 was selected. To my naive eye, It seems like moving to 10 bits per byte would be both logical and make learning the trade just a li…

If you're ignoring what's efficient to use then just use a decimal data type and let the hardware figure out how to calculate that for you best. If what's efficient matters then address management, hardware operation implementations, and data packing are all simplest when the group size is a power of the base.

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

#74

This is entertaining and probably a good idea but the justification is very abstract. Specifically, has there even been a C++ compiler on a system where bytes weren't 8 bits? If so, when was it last updated?

I know some DSPs have 24-bit "bytes", and there are C compilers available for them.

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

#76
post #34

Earlier quoted context omitted.

You're right. To be consistent with bytes we should call it a snack .

Henceforth, it follows that a doublesnack is called a lunch. And a quadruplesnack a fourthmeal.

There's only one right answer:

Nybble - 4 bits

Byte - 8 bits

Snyack - 16 bits

Lyunch - 32 bits

Dynner - 64 bits

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

#77

This is entertaining and probably a good idea but the justification is very abstract. Specifically, has there even been a C++ compiler on a system where bytes weren't 8 bits? If so, when was it last updated?

There were/are C++ compilers for PDP-10 (9 bit byte). Those haven't been maintained AFAICT, but there are C++ compilers for various DSP's where the smallest unit of access is 16 or 32 bits that are still being sold.

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

#78

Earlier quoted context omitted.

Doesn't matter ternary computers just have ternary bits, 8 of them ;)

Supposedly, "bit" is short for "binary digit", so we'd need a separate term for "ternary digit", but I don't wanna go there.

The prefix is tri-, not ti- so I don’t think there was any concern of going anywhere.

It’s tricycle and tripod, not ticycle.

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

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

Post reply on HN