2.7. 2.7 Logical Operations on Bits
There are four primary logical operations we'll do with hexadecimal and binary numbers: AND, OR, XOR (exclusive-or), and NOT. Unlike the arithmetic operations, a hexadecimal calculator isn't necessary to perform these operations. It is often easier to do them by hand than to use an electronic device to compute them. The logical AND operation is a dyadic[25] operation (meaning it accepts exactly two operands). These operands are individual binary bits. The AND operation is:
[25] Many texts call this a binary operation. The term dyadic means the same thing and avoids the confusion with the binary numbering system.
0 and 0 = 0 0 and 1 = 0 1 and 0 = 0 1 and 1 = 1
A compact way to represent the logical AND operation ...
Get Art of Assembly Language, 1st Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.