Hacker News new | past | comments | ask | show | jobs | submit login
Logic gates using liquids (2019) (imgur.com)
30 points by aragonite 13 days ago | hide | past | favorite | 14 comments





I never had trouble understanding the basic logic tables, but never got around to understand how a combination of gates makes an adder or other computer functions. Would the visualization extended also make those more clear?

The trick is binary addition works the same as regular addition, but is so simple that even a silly little logic gate can do it.

Think about adding two bits. There are only four possible ways to do it.

0+0=0

0+1=1

1+0=1

1+1=0 (carry 1)

If you squint at the bit patterns in those addition facts, you realize it is actually the truth table for XOR (ignoring the carry). So adding bits A and B is the same as taking A XOR B.

What about carrying the 1? The carry can be represented as an AND: you only carry the 1 if A and B are both 1. So a simple 1-bit adder can be made by combining an AND and a XOR.

Everything becomes simpler when you stop thinking in terms of addition and start thinking in terms of truth tables for bits. Take the truth table for a two bit adder (AB + CD = XY):

A B C D X Y

0 0 0 0 0 0

0 0 0 1 0 1

0 0 1 0 0 1

0 0 1 1 1 0

1 1 1 1 1 1

If you learn the basic algorithm for converting a truth table into logic gates, you can represent any bit pattern as gates, including addition operations. Adders are nice because you can basically concatenate them together in a chain to add larger and larger patterns of bits.


Gate-level addition is happening in binary, it's easier to imagine that way too.

https://www.electronics-lab.com/article/binary-adder/

Define a width of addition operations you'd like to support and work from a 1 bit adder up to that.


Lookup "half adder" and "full adder". https://en.wikipedia.org/wiki/Adder_(electronics)

Also see this link for what a simple fluidic adder looks like:

http://www.blikstein.com/paulo/projects/project_water.html


Maybe try https://nandgame.com - goes from logic gates to adder to a programmable computer, presented as a series of challenges to solve.

very similar to this is "Turing Complete" on Steam https://store.steampowered.com/app/1444480/Turing_Complete/

I didn’t get it either until I played the game MHRD. You work from NAND up.

There is some prior art on using liquids for logic gates.

See the 3-bit Hydro-pneumatic Adder.

https://www.youtube.com/watch?v=6qP9HfUOCN4


I vaguely remember reading about a pneumatic (?) transistor that operated with air flow and no moving parts, but I can't find that anywhere. I don't mean the Tesla valve.

There was a whole field called fluidics that focused on performing operations analogous to those performed with electricity. This[0] gives a good overview of how fluidics worked. One the most commonly used elements of fluidics was the fluidic amplifier. This worked by using sideways flow of lower pressure to redirect a more powerful jet of fluid between two ports. Fluidic amplifiers could be made with frequency responses in the KHz range, so they have been used to amplify sound[1].

There was some brief interest in fluidics because it was cheap, more reliable than electronics of the time, and could function in extreme environments. So it found use in industrial automation and aircraft systems. This document[2] from NASA shows some applications it found at the time. Univac even built a completely fluidic 4 bit digital computer[3].

Fluidics is still around today, but used for very niche applications. One of the most absurd uses I've heard of was getting around rules prohibiting active aerodynamics in Formula 1. In 2010, the McLaren devised a system where the driver could cover a hole on part of the car, causing flow to be redirected to a fluidic amplifier that redirected flow over the rear spoilers causing them stall, allowing drag to be reduced on the straight aways. IIRC the entire purpose of the system was to get around rules which prohibited doing this with moving parts.

[0]https://miriam-english.org/files/fluidics/FluidControlDevice...

[1]https://acoustics.org/pressroom/httpdocs/132nd/2aaa8.html

[2]https://ntrs.nasa.gov/api/citations/19730002533/downloads/19...

[3]https://dl.acm.org/doi/pdf/10.1145/1464052.1464112

[4]https://us.motorsport.com/f1/news/banned-technical-analysis-...


Thank you for the comprehensive summary and the detailed references!

I think it's a topic of great interest. Maybe turn your answer into an HN submission?

A NOT door would be interesting



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: