Function bitintr::x86::bmi::andn [] [src]

pub fn andn<T: Int>(x: T, y: T) -> T

Bitwise logical AND of inverted x with y.

Assembly Instructions

Example

use bitintr::x86::bmi::*;

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

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

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