Author Topic: Why binary is represented by two bits 0 and 1 and not three bits?  (Read 9504 times)

0 Members and 1 Guest are viewing this topic.

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1473
  • Country: pl
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #50 on: October 29, 2019, 09:06:13 am »
IDEngineer has given the first half of the answer. The second is: the Boolean algebra with related concepts. While the Boolean algebra was not getting much attention before second quarter of 20th century, it was quickly recognized as a perfect tool for the job. It is deeply connected with prepositional logic, finds its place in multiple branches of mathematics, uses a tiny number of elements in implementation(1), allows super easy synthesis of circuits.(2)(3) and everyone knew how to prove the circuits to be right.

Trivia: there also were negabinary computers. Anecdotal story is that the guys misunderstood a joke and implemented the machine, approaching the subject with complete seriousness. :D

____
(1) Any expression can be represented with only NANDs or only NORs, in the past also only a set of AND/OR/NOT gates. Each of those are trivial and robust circuits.
(2) E.g. De Morgan’s law quickly turns any messy expression into simple, conventional form of OR-of-ANDs or AND-of-ORs, which is a circuit consisting of at most 3 layers of digital gates (optional NOTs, a bunch of ANDs, a single multi-input OR).
(3) Historically Karnaugh maps have been used, and those can be solved by children in kindergarten.
« Last Edit: October 29, 2019, 09:11:04 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4364
  • Country: gb
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #51 on: October 29, 2019, 09:25:04 am »
Any expression can be represented with only NANDs

In uni we were given an assignment to build a logic circuit to run a 7 segment display from a 4 bit binary bus input.  We were only allowed to use NAND gates.  Was quite challenging and quite interesting to do.  Think it ended up being about 50 gates.

These days you just google it.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #52 on: October 29, 2019, 09:37:28 am »
IDEngineer has given the first half of the answer. The second is: the Boolean algebra with related concepts. While the Boolean algebra was not getting much attention before second quarter of 20th century, it was quickly recognized as a perfect tool for the job. It is deeply connected with prepositional logic, finds its place in multiple branches of mathematics, uses a tiny number of elements in implementation(1), allows super easy synthesis of circuits.(2)(3) and everyone knew how to prove the circuits to be right.

Trivia: there also were negabinary computers. Anecdotal story is that the guys misunderstood a joke and implemented the machine, approaching the subject with complete seriousness. :D

____
(1) Any expression can be represented with only NANDs or only NORs, in the past also only a set of AND/OR/NOT gates. Each of those are trivial and robust circuits.
(2) E.g. De Morgan’s law quickly turns any messy expression into simple, conventional form of OR-of-ANDs or AND-of-ORs, which is a circuit consisting of at most 3 layers of digital gates (optional NOTs, a bunch of ANDs, a single multi-input OR).
(3) Historically Karnaugh maps have been used, and those can be solved by children in kindergarten.

That's too simplistic. The key is in the phrase in your footnote: "robust circuits", even if they weren't trivial.

For the first quarter century of logic-based machines, up until the 60s, active devices were very expensive (cost, power, volume) and could only be used very sparingly. To illustrate that, some commercially important general purpose computers were serial machines, i.e. the data paths were one bit wide.

So why weren't semi-analogue techniques (e.g. dividing by 10 with three active devices) used more frequently?

Shannon's theorm provides a big clue.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online mariush

  • Super Contributor
  • ***
  • Posts: 5171
  • Country: ro
  • .
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #53 on: October 29, 2019, 12:07:31 pm »
because i didn't see someone else linking to them





 

Offline wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #54 on: October 29, 2019, 12:17:14 pm »
Btw cheap Solid state hard drives do store more than just on/off or 0/1 per cell, they are like 0/1/2/3 per cell.
Almost all SSD. Even expensive industrial stuff is usually MLC, nowadays often even TLC. Cheap stuff is QLC with 4 bits per cell (16 voltage levels). SLC (1 bit per cell) is very niche nowadays.
Quote
They do have additional circuitry next to the storage chip to convert them back into zeros/ones.
:palm: ALL SSD have controller chip. And it does not convert anything. NAND flash chip outputs binary data.
 
The following users thanked this post: tooki

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #55 on: October 29, 2019, 12:23:16 pm »
There has actually been some revival in multi-level logic recently. With the excess SNR we often see in digital circuits, you could say that you are wasting potential intermediate levels.

Sure, the gates become more complicated, but I don't think that is such a big issue - after all, I think few digital designers still manually do the gates, this is all for the logic synthesis tool to deal with (so you just make the logic synth 'smarter' and nobody has to know about any of this).

I don't think Shannon's theorems provide a big clue - if anything, they really do make you wonder 'why not?'. Just look at the PAM4 digital stuff coming to high-speed interconnects - 112 gigabit/s with very low error rates. And sometimes errors are actually acceptable - think neural nets or signal processing, where there is already a error band on the signal anyways. Does a tiny additional error form an issue here? I've already seen examples of this being used on DFEs in communication systems where you have multi-level data (EG, QAM 16 which has 2 4-level streams) and where using 4-level logic provided very elegant and low-power filtering.

I would not be surprised if multi-level computation is more common-place in the future.

(note - I'm not necessarily talking true analog computation with differentiators and integrators - rather multi-level digital, similar to PAM4 etc)



The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #56 on: October 29, 2019, 12:25:42 pm »
They do have additional circuitry next to the storage chip to convert them back into zeros/ones.
:palm: ALL SSD have controller chip. And it does not convert anything. NAND flash chip outputs binary data.

No need to :palm: here. The converter that goes back to binary could easily be on a separate die within the package - esp given how floating-gate non-volatile storage uses vertical stacking on specialized processes. There is obviously a need to turn your multilevel signal back into a nice digital stream, which has to be somewhere - be it on a special controller or in package or on die.
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #57 on: October 29, 2019, 12:46:32 pm »
There has actually been some revival in multi-level logic recently. With the excess SNR we often see in digital circuits, you could say that you are wasting potential intermediate levels.

That isn't new; it has been the centrepiece of digital comms systems for over 50 years!

The key is to understand the difference between "baud rate" and "bit rate"; too many people don't.

Quote
I would not be surprised if multi-level computation is more common-place in the future.

It will indeed.

With modern and future high speed comms links, multipath effects in on-board and in-cabinet comms links will become problematic. Such comms links will then have to re-use techniques from current "long distance" (i.e. 10m to 100km) comms links. Many of those will be multi-level, to minimise the baud rate.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: tooki

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #58 on: October 29, 2019, 04:53:06 pm »
Indeed, a substantial percentage of the digital signaling we use does not rely on encoding a 1 as a high voltage and 0 as a low one. Manchester encoding/NRZ for example is very common.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #59 on: October 29, 2019, 06:14:24 pm »
It looks like you are conflating "electric field" with "charge". Analogy: if I have a 1kg weight on a balanced lever, moving the pivot changes the counterbalancing force by less than (or more than) 1kg.

Not so much the field as its effect upon materials, which are polarized as a consequence.  Polarization is a displacement of charge, and that displacement is continuous.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 854
  • Country: gb
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #60 on: October 29, 2019, 07:04:09 pm »
In uni we were given an assignment to build a logic circuit to run a 7 segment display from a 4 bit binary bus input.  We were only allowed to use NAND gates.  Was quite challenging and quite interesting to do.  Think it ended up being about 50 gates.

I built a clock and calendar using nothing but NOR logic. It really makes you appreciate having the other logic functions and prepackaged circuits for various purposes.

My 7 segment decoders were much simpler than 50 gates though. I used k-maps to figure out the logic required for them which helped a lot.
 

Offline TheUnnamedNewbie

  • Super Contributor
  • ***
  • Posts: 1211
  • Country: 00
  • mmwave RFIC/antenna designer
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #61 on: October 30, 2019, 10:42:14 am »
Indeed, a substantial percentage of the digital signaling we use does not rely on encoding a 1 as a high voltage and 0 as a low one. Manchester encoding/NRZ for example is very common.

I think Manchester/NRZ was not what we were pointing to, it still uses only two levels. Rather things like PAM4/6/8, BPOOK, multi-level ASK/FSK etc...
The best part about magic is when it stops being magic and becomes science instead

"There was no road, but the people walked on it, and the road came to be, and the people followed it, for the road took the path of least resistance"
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7198
  • Country: fi
    • My home page and email address
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #62 on: October 30, 2019, 01:01:49 pm »
There has actually been some revival in multi-level logic recently. [...] Sure, the gates become more complicated, but I don't think that is such a big issue
Multi-level logic is simple to implement for storage and communications, but the complexity in computational logic (number of possible operators) blows through the roof.  The possible configuration space for even just a handful of interconnected gates gets too large to brute-force through, and there has not been much research in the last few decades into multivalue logic (as a subfield of mathematics).

For N-level logic, there are NN unary and NN2 binary operators.  For 4-level logic, that is 256 unary operators, and 4,294,967,296 binary operators.  Depending on the gate types, there are usually more possible gate configurations than the operators, although a tiny subset of the operators is needed for Boolean/binary algebra.  The issue is optimization: even with a handful of operators, the space of possible configurations is too wide to effectively search.

So, I would claim that it is precisely the complexity that is the issue.

Someone would have to see what the electrical components for multi-level logic gates are, then do inefficient multi-level logic gates, then combine a few to implement the standard operators for binary algebra, then implement some kind of search across the huge possible operator space to look for efficient configurations (perhaps do it in reverse, looking at what kind of operators one can implement the easiest, using the basic components available)... A very interesting research project, and probably will be done at some point, but will take a while to get into real-world products, methinks.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #63 on: October 30, 2019, 01:25:25 pm »
So, I would claim that it is precisely the complexity that is the issue.

However the internal complexity of logic gates/functions is much less of an issue that it used to be. Interconnections (cross-chip and external), noise/crosstalk, and power consumption are more problematic.

Plus if processes continue to shrink, soon the number of electrons/holes in a transistor will be come a problem :)
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #64 on: October 30, 2019, 04:48:42 pm »
Introducing multiple levels in logic would mean hugely increased power consumption. To keep it reasonable with CMOS, you would need to do something like multiple power voltages. CMOS consumes barely any current when staying in stable state, current flow happens only during changing state. To keep it in intermediate state, current would need to flow all of the time.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #65 on: October 30, 2019, 05:00:27 pm »
CMOS consumes barely any current when staying in stable state, current flow happens only during changing state.

No longer true in the latest semiconductor processes. Reducing static leakage currents is a hot topic.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #66 on: October 30, 2019, 05:50:22 pm »
CMOS consumes barely any current when staying in stable state, current flow happens only during changing state.

No longer true in the latest semiconductor processes. Reducing static leakage currents is a hot topic.
There is always some leakage. But calling it "no longer true" is nonsense. That leakage is somewhere in femto-picoamps range per single transistor.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 21227
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #67 on: October 30, 2019, 06:35:16 pm »
CMOS consumes barely any current when staying in stable state, current flow happens only during changing state.

No longer true in the latest semiconductor processes. Reducing static leakage currents is a hot topic.
There is always some leakage. But calling it "no longer true" is nonsense. That leakage is somewhere in femto-picoamps range per single transistor.

Then multiply that by the number of transistors :)

The figures I've seen are that the leakage power dissipation can be 30% of the total power dissipation. That will, of course, be dependent on the specific process.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9821
  • Country: 00
  • Display aficionado
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #68 on: October 30, 2019, 06:55:00 pm »
Trying thinking how you would create any sort of logic gate or arithmetic circuit that isn't based on binary. There's not a benefit to doing so.
Ternary computers can apparently be faster or more efficient in both energy consumption and transistor count. We just ended up using binary but it's not the only valid solution.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #69 on: October 30, 2019, 06:59:57 pm »
Then multiply that by the number of transistors :)

The figures I've seen are that the leakage power dissipation can be 30% of the total power dissipation. That will, of course, be dependent on the specific process.
Then make it into microamps to make intermediate levels and multiply by transistor count. 30% on leakage for modern CPU in completely unreal. Unless you mean when it runs at 5% of it's maximum clock speed.
« Last Edit: October 30, 2019, 07:03:00 pm by wraper »
 

Offline paulca

  • Super Contributor
  • ***
  • Posts: 4364
  • Country: gb
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #70 on: October 30, 2019, 07:40:27 pm »
Is the OP sorry he asked yet?
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 
The following users thanked this post: MosherIV

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13157
  • Country: ch
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #71 on: October 31, 2019, 11:00:29 am »
Indeed, a substantial percentage of the digital signaling we use does not rely on encoding a 1 as a high voltage and 0 as a low one. Manchester encoding/NRZ for example is very common.

I think Manchester/NRZ was not what we were pointing to, it still uses only two levels. Rather things like PAM4/6/8, BPOOK, multi-level ASK/FSK etc...
I know. My thought process was actually regarding the baud ≠ bitrate issue. So many people think digital simply means "voltage on = logic 1, voltage off = logic 0", yet that's really not true much of the time, even in systems using only 2 voltage levels. Phase shift keying is another (perhaps better) 2-level example of the disconnect between voltage level and the logical bits being sent.
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: fi
  • Ingineer
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #72 on: November 01, 2019, 04:02:12 pm »
Is the OP sorry he asked yet?
Don't be the party pooper.  >:D
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #73 on: November 01, 2019, 09:53:36 pm »
Two states is all an EE can understand.
BEER or NO BEER
PIZZA or NO PIZZA
and so on.

Imagine if you threw in BEER, CIDER or NO BEER... what happens if you wanted WINE ?
Don't ask a question if you aren't willing to listen to the answer.
 

Offline Vtile

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: fi
  • Ingineer
Re: Why binary is represented by two bits 0 and 1 and not three bits?
« Reply #74 on: November 01, 2019, 10:55:03 pm »
You select "No beer" and go next step of sequence!!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf