[][src]Trait bitintr::Andn

pub trait Andn {
    fn andn(self, y: Self) -> Self;
}

Logical and not

Required methods

fn andn(self, y: Self) -> Self

Bitwise logical AND of inverted self with y.

Instructions

  • ANDN:
    • Description: Logical and not.
    • Architecture: x86.
    • Instruction set: BMI.
    • Registers: 32/64 bit.

Example

assert_eq!(0.andn(0), 0);
assert_eq!(0.andn(1), 1);
assert_eq!(1.andn(0), 0);
assert_eq!(1.andn(1), 0);

assert_eq!(0b0000_0000u8.andn(0b0000_0000u8), 0b0000_0000u8);
assert_eq!(0b0000_0000u8.andn(0b1111_1111u8), 0b1111_1111u8);
assert_eq!(0b1111_1111u8.andn(0b0000_0000u8), 0b0000_0000u8);
assert_eq!(0b1111_1111u8.andn(0b1111_1111u8), 0b0000_0000u8);

assert_eq!(0b0100_0000u8.andn(0b0101_1101u8), 0b0001_1101u8);
Loading content...

Implementors

impl Andn for i8[src]

impl Andn for i16[src]

impl Andn for i32[src]

impl Andn for i64[src]

impl Andn for u8[src]

impl Andn for u16[src]

impl Andn for u32[src]

impl Andn for u64[src]

Loading content...