Trait BinAnd

Source
pub trait BinAnd<B: Binary> {
    type Output: Binary;
}
Expand description

The AND logic gate

Example

use const_arithmetic::*;
let True = _1;
let False = _0;
 
fn bin_and<B1, B2, R>(_h1: B1, _h2: B2, _r: R) where
B1: Binary,
B2: Binary,
R: Binary,
B1: BinAnd<B2, Output = R>
{}
 
bin_and(_0, _0, False);
bin_and(_1, _0, False);
bin_and(_0, _1, False);
bin_and(_1, _1, True);

Required Associated Types§

Implementors§