I added another pressure plate to the bottom of my water level gauge, so it can also measure a "one":
..c.
.cc.
..c.
..c.
.ccc
That's mainly for completeness' sake, outside of computing purposes (although i wonder who'd bother to jump through the stack of hoops required to compute with water depth) there's no use for this option - one deep water can't be picked up by pumps and bodies of water won't really be that deep: they're either 2+ deep or they'll evaporate away.
I spotted another minecart pathing oddity: downward track ramps can typically be used to move a cart down levels, and a horizontally-moving cart will dive into a pit that contains a track ramp. That's a sharp contrast to the behaviour regarding non-track ramps and ordinary holes, carts will usually jump past them. Track ramps are effectively treated as track corners (and are consequently ignored by straight-moving carts going at derail speeds), but as i found now, that also requires the cart to come _from_ a track tile:
==▼ =+▼
Left: two tiles of track, track ramp down - cart goes down the ramp
right: track, smoothed floor, track ramp down - cart flies over the ramp
Unsurprisingly, putting a hatch on top of a track doesn't allow the cart to jump the hole, hatch covers don't obscure track.
However, a bridge is treated as fully valid track by carts, so a z-level switch can be designed by using non-track floor directly before the ramp and covering it with a signal-operated retracting bridge. If the signal is "on", the bridge is retracted and the cart jumps over the pit (e.g. to level ground behind the hole). If the signal is "off", the bridge is extended and the cart dives into the pit.
And happy New Year, everybody!
Edit: using the abovementioned jump feature, i built a single-pit, two-bridge bit compare:
.1..234..
.║..║║║..
=╚+▼▼╝╝
.║..║║║
=╚B▼BB╝
Cart enters from the west and ends up on one of the four branches going off north.
Above just the paths and the crucial non-track spot, below with the two retracting bridges, one over the smooth spot, another, two long, covering both the track corner directly behind the pit _and_ the eastern ramp. The track ramps in the pit are EW in the west, NW in the east (i.e. a corner sending an incoming cart off north).
I built and tested this, it requires a bit more speed than a dwarven push can provide, but with slightly enhanced speed, it works perfectly:
* both signals off: both bridges are extended, the cart enters the pit, tries to leave to the north, but bumps against the western half of the eastern bridge and leaves the pit going west, gets turned around the corner to the north, branch 1.
* first signal off, second on: western bridge extended, eastern bridge retracted. The cart enters the pit and can leave unhindered to the north, branch 2.
* first signal on, second off: western bridge retracted, eastern bridge extended. The cart jumps and lands on the extended eastern bridge, the track corner is obscured by the bridge, so the cart goes straight and ends up on branch 4.
* both signals on: both bridges retracted. The cart jumps over the pit, lands on the track corner behind the pit and follows it to the north, branch 3. This is the case where more than dwarven speed is required, otherwise the cart drops into the eastern pit, gets a weird acceleration and ends up taking branch 2.
The output branches can be collected to correspond to specific logic conditions, or different-weight carts and weight-sensitive plates can be used to check for different logics. Since this gate splits two binary input into the full four possible output branches, it's effectively an all-purpose logic gate:
Path 1 is NOR. Paths 2, 3, 4 together are OR.
Path 3 is AND. Paths 1, 2, 4 together are NAND.
Paths 1 and 3 are NXOR (Equality). Paths 2 and 4 are XOR.
And since there's no meaningful difference between paths 2 and 4, why not just roll them into one? That gets a bit trickier, because "jumping onto the bridge" is the only usable operation for the condition "first signal on, second off", so we'll need to get the "first signal off, second on" to take the same path - i.e. the cart must go into the pit and emerge to the north in such a way that it doesn't take the track corner directly north. Obviously, this can be done by simply merging path 2 into path 4, but it's also possible to make the cart jump from the pit over the corner tile:
Carts emerging from pits can behave differently if there's no ceiling above the tiles they're emerging from and emerging to. This way, a cart going straight through the pit (if the eastern track ramp isn't curved but also EW) will jump over the tile directly behind the pit. Since the cart already entered the operation pit at significant speed, it emerged at high enough speed to actually make it to the level above, where i made it slam into a wall and fall back down to the actual level of the circuit. This of course resulted in a "standing" cart landing on the corner tile of branch 4. Simplistically, you could just engrave straight track on that tile, place a wall behind it to stop the other type of cart and install your "XOR" pressure plate there. I opted for a moving cart, so built a wall behind it as well, but also a wall to the side, to which i attached a track ramp: carts ending up on that tile either bump into the wall one level above or directly behind the branch tile, land on the ramp and roll off slowly onto the branch 2+4. Took me a bit of fiddling, but i got it to work.