wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CORLANG Week6-7

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.
Shift Instructions can be classified as either Logical Shift or Arithmetic Rotate.
a)
TRUE
b)
FALSE
2.
Shift instructions can not be classified by the direction of the shift (i.e., shift to the left or shift to the right).
a)
TRUE
b)
FALSE
3.
Thus there are four types of shift instructions: shift logical left (SHL), shift logical right (SHR), shift arithmetic left (SAL), and ?
a)
shift arithmetic right (SAR)
b)
shift arithmetic left (SAL)
c)
shift arithmetic right (SHR)
d)
shift asymmetric right (SAR).
4.
SHL (Shift Logical Left) and SAL (Shift Arithmetic Left) are the same mnemonics but does not perform the same operation. Both instructions shift to the left the destination operand by the number of bits specified in the count operand.
a)
TRUE
b)
FALSE
5.
The SHR (Shift Logical Right) instruction shifts to the right the destination operand by the number of bits specified in the count operand. Which of the following is TRUE?
a)
As the bits are being shifted, zeros are shifted in on the left.
b)
As the bits are being shifted, zeros are shifted in on the right.
c)
As the bytes are being shifted, zeros are shifted in on the left.
d)
As the bytes are being shifted, zeros are shifted in on the right.
6.
The SAR (Shift Arithmetic Right) instruction shifts to the right the destination operand by the number of bits specified in the count operand. Which of the following is TRUE?
a)
As the bits are being shifted, the most significant bit is shifted in to the left, preserving the sign bit.
b)
As the bits are being shifted, the most significant bit is shifted in to the right, preserving the sign bit.
c)
As the bits are being shifted, the most significant bit is shifted in to the left, preserving the carry bit.
d)
As the bits are being shifted, the most significant bit is shifted in to the left, preserving the parity bit.
7.
Rotate Instructions rotate bits out into the other end of the operand can be classified by the direction of the rotation (rotate to the left or shift to the right)
a)
TRUE
b)
FALSE
8.
The different types of rotate instructions are?
ROL, ROR, RCL and RCR instruction
a)
ROL, ROR, RCL and RCR instruction
b)
ROL, ROR, RCF and RCF instruction
c)
RTL, RTR, RCL and RCR instruction
d)
RTL, RTR, RCF and RCF instruction
9.
The ROL (Rotate Left) instruction rotates to the left the destination operand by the number of bits specified in the data operand.
a)
TRUE
b)
FALSE
10.
The ROL (Rotate Left) instruction rotates to the right the destination operand by the number of bits specified in the count operand.
a)
TRUE
b)
FALSE
11.
The RCL (Rotate Left through Carry) instruction rotates to the left the destination operand by the number of bits specified in the count operand. Which of the following is TRUE?
a)
The carry flag is treated as part of the rotate.
b)
The parity flag is treated as part of the rotate.
c)
The sign flag is treated as part of the rotate.
d)
The overflow flag is treated as part of the rotate.
12.
The RCR (Rotate Right through Carry) instruction rotates to the right the destination operand by the number of bits specified in the count operand. Which of the following is TRUE?
a)
The carry flag is treated as part of the rotate.
b)
The sign flag is treated as part of the rotate.
c)
The parity flag is treated as part of the rotate.
d)
The overflow flag is treated as part of the rotate.
13.
In Shift Instructions, LSB means?
a)
Least Sign Bit
b)
Least Significant Bit
c)
Last Sign Bit
d)
Lowest Status Bit
14.
In Rorate Instructions, MSB means?
a)
More Sign Bit
b)
Most Significant Bit
c)
Must Sign Bit
d)
Memory Status Bit
15.
MOV DL, AAH
SAR DL, 02H
What is the Value of DL after execution?
a)
2AH
b)
AAH
c)
0AH
d)
02H
16.
MOV AL, 55H
SHR AL, 4
What is the Value of AL?
a)
AAH
b)
44H
c)
05H
d)
22H
17.
MOV AL, 04H
RCR AL, 1

Assume that CF = 1
What is the Value of AL?
a)
82H
b)
80H
c)
06H
d)
02H
18.
MOV AL, 55H
MOV CL, 03H
RCL AL, CL
Assume CF = 0
What is the Value of AL?
a)
AAH
b)
A9H
c)
ABH
d)
A0H
19.
MOV AL, AAH
MOV CL, 01H
ROL AL, CL
RCR AL, CL
What is the Value of AL?
a)
55H
b)
22H
c)
AAH
d)
A0H
20.
MOV AL, 55H
MOV CL, 02H
SHL AL, CL
SAR AL, CL
What is the Value of CF?
a)
0
b)
1
c)
Undefined
d)
Error