x86 Adventures

[Part 0x5] Bits with Personality

Welcome to part 5 of x86 Assembly Adventures! In this part we learn about two main subjects: Signed operations and Bitwise Operations.

Signed numbers are numbers with a sign: They could be both positive or negative. It turns out that the x86 processor has some instructions that deal specifically with those numbers. Some instructions that we are going to meet are: neg, movzx, movsx, cwde, cdq, imul and idiv.

Next we discuss bitwise operations. So far all the instructions we have encountered treated the contents of registers as numbers. However this special set of instructions thinks about the contents of a register as a map of bits! Some subjects we mention in this chapter:

In the end of this part of the series you will gain solid understanding of how to work with single bits. (Eat zeroes and ones for breakfast)