O'Reilly logo

Linux Assembly Language Programming by BOB NEVELN

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. BIT MANIPULATIONS

Bitwise Logic Operations

In chapter 3, section 3.3, circuits and truth tables for the Boolean operations AND, OR, NOT, and XOR were discussed. The truth table for AND is

p q (p AND q)
1 1 1
1 0 0
0 1 0
0 0 0

and is implemented using the Boolean circuit

Bitwise Logic Operations

If eight of these Boolean circuits are used in parallel, then two eight-bit numbers,

    1111 0101
    1100 0011

when fed into the eight AND gates, result in one eight-bit output:

    1100 0001

The operation is carried out as shown in Figure 10-1. In hex notation, the bytes F5H and C3H used as inputs to a one-byte AND operation have produced the output C1H. This operation can be applied ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required