It's the analog aspects, of the Solar Light switching that is interesting. That's why an example, Analog to Digital conversion, helps show the digital sequencing along with the analog response, and how they relate.
The scheme differs slightly, from conventional AtoD subsystems.
Firstly, not much hope of going beyond about 4 bits of resolution just simply for mechanical reasons, too many components, in small spaces
Example includes a 3-bit layout, with maximum A/D count of '8'. Each bit will contribute according to binary weight. Now, it took a lot of thought, but I've set the A/D system up for 1 count = 200 mVolts.
The 'overflow' value used is '7', a little unusual, but at that scale, a resultant A to D voltage reading is 1.4 volts. Readers may recall, the value, near 1.35 volts is where device switching occurs.
Conventionally, a different choice would have been, to use overflow (to '8', a binary boundary), and to assign each count as 160 mV each.
The rationale for using '7', instead, for the overflow, has to do with so-called 'Two's Complement' representation:. Consider, an ambient (light) condition causing something around a quarter of total light, from natural and from (yard light LED) sources:
So, an ambient level, at count of 2, would require the REFERENCE Digital to Analog source to count up, reaching overflow status at count = 5.
Notice, that '5' is directly a complement, of value under measurement: level of '2'. Otherwise, with more conventional overflow, at '8', will produce a result,..
.I.E. '6'; which would require 'Two's complement' additional process, so total process, for an AtoD answer would then require COMPLEMENT (easy), and then an INCREMENT (slightly tough, using all optical register logic).
At any rate, the explanation is unconventional, but is mere conjecture anyway: The little light simply switches, nominal, near 1.35 volts, 1.40 volts being 'nicely' represented, by AtoD count of '7'.
The other unconventional aspect, is that there are TWO analog sources, between the ambient light (about 2 out of the 7 total counts, and the Digital to Analog source, giving out '5' counts worth of light (that would be 5 X 200mV = 1.0 volts. ). Adding then, the ambient contribution, of 2 X 200mV and you reach the trigger level, of 1.4 Volts.
There was concern, initially, that some A to D full counts are not there, thus some loss of already low, resolution. However, when asked, to regurgitate an analog value, a Digital to Analog converter WILL produce, normally, all amplitude counts, 0 thru 7, even though original converter only utilized, up to count of five. All this is normal, as also, when ambient light factor is 'zero', the system has to count up to '7', then invert, to show a correct value, (of 000 binary).
So you have full range and resolution, (within that, crappy counts 0 through 7 range), it's just that most Analog to Digital conversions only involve one single parameter, not two, that have been summed.
It seemed perplexing for a second, as I contemplated, how to construct that Optical Logic A to D converter, how to bring analog values in, for summing (at the photo cell). But THEN realirzed, NO, those signals are still digital (meaning rail to rail voltage swing), with analog process only at the destination; the analog weights tweaked by filters, reducing intensity, so that bit 2, for example, the MSB, is done with a '50%' blocking or partially obscure filter. That would be placed in front of the LED emitter for bit2.
Of course, distance to the 'comparator' gate is another potential manipulation method...having nothing to do with the very very very slight increased (light) propagation time, a couple extra inches...that's negligible.
So there you have it: An intro to a digital gate system, having analog qualities, briefly or in one specific region (near to the switching input).
Reading, in biosciences book 'NeuroScience for Dummie', this is almost exactly similar to neurons, except one (interesting) aspect:
Neurons do their job, having, sometimes HUNDREDs of little digital inputs (synapses).
I can't solder that fast, but interesting results to be had,
(If I can wrestle out all these variables.)
"N cans, holding 'N' worms..."
--Rick B.