logic_gate 0.4.0

Logic Gates
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use super::{And, Not, Or, Signal};

pub struct Mux;

impl Mux {
    pub fn send_signal(s: &Signal, a: &Signal, b: &Signal) -> Signal {
        Or::send_signal(
            &And::send_signal(&Not::send_signal(s), a),
            &And::send_signal(s, b),
        )
    }
}