pub trait Subtractor {
    type Borrow;
    type Difference;

    // Required method
    fn subtractor(
        &self,
        other: &Self,
        borrow: &Self
    ) -> (Self::Difference, Self::Borrow);
}
Expand description

A single-bit binary subtractor with a borrow bit.

https://en.wikipedia.org/wiki/Subtractor#Full_subtractor

difference = (a XOR b) XOR borrow borrow = ((NOT a) AND b) OR (borrow AND (NOT (a XOR b))) return (difference, borrow)

Required Associated Types§

Required Methods§

source

fn subtractor( &self, other: &Self, borrow: &Self ) -> (Self::Difference, Self::Borrow)

Returns the difference of self and other as a difference bit and borrow bit.

Implementors§

§

impl<E> Subtractor for Boolean<E>where E: Environment,