Question: part b Review how logical operators AND, OR, XOR work and take a look at the table below a AND b a OR b a
part b 
Review how logical operators AND, OR, XOR work and take a look at the table below a AND b a OR b a XOR b 0 0 Put together a simple program to demonstrate Flags (ZF, CF, SF, and OF) are set properly for both unsigned and signed comparisons (cmp instruction). In order to demonstrate a certain flag, you need to set up values for destination operand and source operand, and thern perform the cmp instruction. You can use one cmp instruction to demonstrate each flag (i.e., this cmp instruction will set CF flag) or you can use one cmp instruction to demonstrate multiple flags at the same time (i.e., this cmp instruction will set this class and will not set the other flag). Clearly label your code and output. For example, you can use a comment like a. : the following cmp instruction will set CF flag b. Assume that XOR instruction is not available, set up some instructions to simulate XOR of two bits (results should match the last column in the table above). Use AL to hold 1 bit (AL is either 0 or 1), use BL to hold the other bit (BL is either 0 or 1), and assign result to CL (CL- AL XOR BL so CL is either 0 or 1). Hint. can either use AND, OR, and NOTinstructions (more preferable) or CMPinstruction together with condition jump instruction Review how logical operators AND, OR, XOR work and take a look at the table below a AND b a OR b a XOR b 0 0 Put together a simple program to demonstrate Flags (ZF, CF, SF, and OF) are set properly for both unsigned and signed comparisons (cmp instruction). In order to demonstrate a certain flag, you need to set up values for destination operand and source operand, and thern perform the cmp instruction. You can use one cmp instruction to demonstrate each flag (i.e., this cmp instruction will set CF flag) or you can use one cmp instruction to demonstrate multiple flags at the same time (i.e., this cmp instruction will set this class and will not set the other flag). Clearly label your code and output. For example, you can use a comment like a. : the following cmp instruction will set CF flag b. Assume that XOR instruction is not available, set up some instructions to simulate XOR of two bits (results should match the last column in the table above). Use AL to hold 1 bit (AL is either 0 or 1), use BL to hold the other bit (BL is either 0 or 1), and assign result to CL (CL- AL XOR BL so CL is either 0 or 1). Hint. can either use AND, OR, and NOTinstructions (more preferable) or CMPinstruction together with condition jump instruction
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
