←back to thread

182 points Twirrim | 3 comments | | HN request time: 0.689s | source
Show context
donatj ◴[] No.41875031[source]
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 little bit easier?

replies(6): >>41875041 #>>41875052 #>>41875110 #>>41875147 #>>41875204 #>>41875211 #
dplavery92 ◴[] No.41875041[source]
Eight is a nice power of two.
replies(1): >>41875063 #
donatj ◴[] No.41875063[source]
Can you explain how that's helpful? I'm not being obtuse, I just don't follow
replies(4): >>41875100 #>>41875101 #>>41875319 #>>41875462 #
1. inkyoto ◴[] No.41875319[source]
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.

replies(1): >>41875536 #
2. davemp ◴[] No.41875536[source]
> 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).

Is this true? 4 ternary bits give you really convenient base 12 which has a lot of desirable properties for things like multiplication and fixed point. Though I have no idea what ternary building blocks would look like so it’s hard to visualize potential hardware.

replies(1): >>41875705 #
3. inkyoto ◴[] No.41875705[source]
It is hard to say whether it would have been 9 or 12, now that people have stopped experimenting with alternative hardware designs. 9-bit byte designs certainly did exist (and maybe even the 12-bit designs), too, although they were still based on the Boolean logic.

I have certainly heard an argument that ternary logic would have been a better choice, if it won over, but it is history now, and we are left with the vestiges of the ternary logic in SQL (NULL values which are semantically «no value» / «undefined» values).