CSCI 3371 Assignment 5: Branching and Bitwise Operations

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

1/13

flashcard set

Earn XP

Description and Tags

Vocabulary practice flashcards covering branching instructions, loop counters, bitwise logic operations, and status flags from CSCI 3371 Assignment 5.

14 Terms

1
New cards

ECX Loop Initialization to Zero

When initialized to zero before a loop begins, the LOOP instruction decrements ECX to FFFFFFFFh, causing the loop to repeat 4,294,967,2964,294,967,296 times.

2
New cards

and AX, 00FFh

A single 16-bit operand instruction that clears the high 88 bits of AX and leaves the low 88 bits unchanged.

3
New cards

Bitwise AND of 91BAh and 92h

An operation executed by mov bx, 91BAh followed by and bx, 92h, resulting in BX containing the value 00920092.

4
New cards

Bitwise AND of 01101111b and 00101101b

A bitwise operation that evaluates mov al, 01101111b and and al, 00101101b, resulting in AL holding 2Dh (00101101b).

5
New cards

Bitwise AND of 6Dh and 4Ah

A bitwise operation that evaluates mov al, 6Dh and and al, 4Ah, resulting in AL holding 48h (01001000b).

6
New cards

Bitwise OR of 00001111b and 61h

A bitwise operation that evaluates mov al, 00001111b and or al, 61h, resulting in AL holding 6Fh (01101111b).

7
New cards

Bitwise XOR of 94h and 37h

A bitwise operation that evaluates mov al, 94h and xor al, 37h, resulting in AL holding A3h (10100011b).

8
New cards

Flag Results of TEST AL, 00000010b (AL = 00001111b)

The status flags produced when testing bit 11 of 00001111b00001111\text{b}, resulting in CF=0\text{CF} = 0, ZF=0\text{ZF} = 0, and SF=0\text{SF} = 0.

9
New cards

Flag Results of CMP AL, 00000101b (AL = 00000110b)

The status flags produced by comparing 00000110b00000110\text{b} with 00000101b00000101\text{b}, resulting in CF=0\text{CF} = 0, ZF=0\text{ZF} = 0, and SF=0\text{SF} = 0.

10
New cards

Flag Results of CMP AL, 00000111b (AL = 00000101b)

The status flags produced by comparing 00000101b00000101\text{b} with 00000111b00000111\text{b}, resulting in CF=1\text{CF} = 1, ZF=0\text{ZF} = 0, and SF=1\text{SF} = 1.

11
New cards

Signed Comparison of 7FFFh and 8000h (JL)

An assembly sequence comparing EAX (7FFFh7\text{FFFh}) against 8000h8000\text{h} using jl, which jumps to L1 because 7FFFh<8000h7\text{FFFh} < 8000\text{h}, leaving EDX with 0000000100000001.

12
New cards

Set Difference (SetX - SetY)

An assembly sequence consisting of mov eax, SetX, mov ebx, SetY, not ebx, and and eax, ebx, which produces a bit string in EAX representing members in SetX that are not members of SetY.

13
New cards

ja Instruction

Jump if Above; an unsigned conditional branching instruction used to skip code when the left operand is greater than the right operand (such as branching to L1 if edx > ecx).

14
New cards

Short-Circuit Evaluation (AND Condition)

A branching technique that implements compound conditions like if( val1 > ecx ) AND ( ecx > edx ) by immediately branching to the else block (jle L1) as soon as any single sub-expression evaluates to false.