Electronic – ny such logic gate that accepts inputs from both sides and also stores information within the gate itself

digital-logic

I'm trying to design a logic circuit that will end up looking a binary tree (there will be a "root" logic gate at the top and a whole bunch of "leaf" logic gates at the bottom).

Input is fed as bits into the leaves and the outputs are passed upward towards the root. But at any time (not necessarily at the root) the flow could change direction and they need to "follow" the path where they came from down to the leaf where they originated from.

I feel like the only way to create "breadcrumbs" is to create a storage bit at each gate indicating either right or left down the tree, leading to the leaf node.

Am I way off in my thinking here? Is it possible to have inputs go upward towards a root logic gate and then reverse the direction and go back to the leaf logic gate?

Best Answer

The logic that accepts and stores input is a "flip-flop". If you wish to store from either "side" you can have a 2:1 multiplexer that selects between the 2 inputs.