Module 4.1 Logical Instructions

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:36 AM on 9/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

9 Terms

1
New cards

AND
OR
XOR
TEST
NOT

Five primary bitwise logical instructions that are used to manipulate, test, set, or clear individual bits within registers or memory locations.

2
New cards

Two-operand instructions: INSTRUCTION operand1, operand2
Single-operand instruction: NOT operand1

Syntax Pattern

3
New cards

The first operand can be a register or memory location. The second operand can be a register, memory, or immediate value. Operations directly between two memory locations are not supported.

Rule

4
New cards

These operations update CPU flags, including CF (Carry), OF (Overflow), PF (Parity), SF (Sign), and ZF (Zero).

Flags Affected

5
New cards

AND Instruction

It clears specific bits (masking) or testing bit conditions. Performs a bitwise AND operation (returns 1 only if both corresponding bits are 1).

6
New cards

OR Instruction

Setting specific bits to 1. Performs a bitwise OR operation (returns 1 if at least one corresponding bit is 1).

7
New cards

XOR Instruction

Toggling bits or efficiently clearing registers to zero. Performs a bitwise Exclusive-OR operation (returns 1 if corresponding bits are different, 0 if identical).

8
New cards

TEST Instruction

Checking values or bit states without altering data. Performs a non-destructive bitwise AND operation. It updates CPU flags (e.g., ZF) without modifying the destination operand.

9
New cards

NOT Instruction

Performs a bitwise NOT (one's complement), inverting all bits of the operand (0 becomes 1, 1 becomes 0).