From the course: Learning Assembly Language
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Logical or bitwise operators - Python Tutorial
From the course: Learning Assembly Language
Logical or bitwise operators
- [Instructor] Now we know how to move data, let's look at what we can do with it. The first set of instructions we'll look at are the logical or bitwise operators. There are many bitwise instructions in 64 bits assembler, but we'll just look at the more common ones at this stage. The AND operator takes two values. We sometimes call the source value, a mask. The instruction compares the two values bit by bit. If both bits are one, then the result is one. Otherwise the result is a zero. We can see that when we mask a value of 28FD with a mask of 333, we get the result 2031. The AND operator is commonly used to mask off specific bits or bytes in a word. The NOT operator is used to switch the bits in a value, making a one into a zero and a zero into a one. So, NOT 28FD is D702. The XOR is a very useful operator. This will result in a one if one of the bits is one and the other is a zero. If both bits are the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Setting up a program skeleton4m 27s
-
(Locked)
Understanding registers and memory8m 5s
-
(Locked)
Data types3m 18s
-
(Locked)
Using data structures6m 13s
-
(Locked)
The move and exchange instructions7m 22s
-
(Locked)
Extended move instructions3m 44s
-
(Locked)
Logical or bitwise operators5m 40s
-
(Locked)
Arithmetic operators5m 12s
-
(Locked)
Controlling the assembler flow5m 22s
-
(Locked)
Indirect addressing and pointers4m 50s
-
(Locked)
Console Input and output4m 47s
-
(Locked)
Challenge1m 24s
-
(Locked)
Solution4m 20s
-
-
-
-
-
-