Skip to Content
The Art of Assembly Language, 2nd Edition
book

The Art of Assembly Language, 2nd Edition

by Randall Hyde
March 2010
Beginner content levelBeginner
760 pages
18h 51m
English
No Starch Press
Content preview from The Art of Assembly Language, 2nd Edition

2.7 Logical Operations on Binary Numbers and Bit Strings

The previous section defines the logical functions for single-bit operands. Because the 80x86 uses groups of 8, 16, or 32 bits, we need to extend the definition of these functions to deal with more than 2 bits. Logical functions on the 80x86 operate on a bit-by-bit (or bitwise) basis. Given two values, these functions operate on bit 0, producing bit 0 of the result. They operate on bit 1 of the input values, producing bit 1 of the result, and so on. For example, if you want to compute the logical and of the following two 8-bit numbers, you would perform the logical and operation on each column independently of the others:

%1011_0101
                         %1110_1110
                         ----------
                         %1010_0100

You may apply this bit-by-bit ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

x64 Assembly Language Step-by-Step, 4th Edition

x64 Assembly Language Step-by-Step, 4th Edition

Jeff Duntemann
C Programming Language, 2nd Edition

C Programming Language, 2nd Edition

Brian W. Kernighan, Dennis Ritchie

Publisher Resources

ISBN: 9781593272074Errata Page