Clear: Resets F to 0000.
AND: F results from the bitwise AND operation between A and B.
Transfer A/B: F simply takes the value of A or B.
OR: F results from the bitwise OR operation between A and B.
ExclusiveOR: F results from the bitwise XOR operation between A and B.
Explanation of Examples:
Shiftleft (shl): Moves all bits to the left, filling the rightmost bit with 0. For example, 1010
becomes 0100.
Shiftright (shr): Moves all bits to the right, filling the leftmost bit with 0. For example, 1010
becomes 0101.
Circular shiftleft (cil): Moves the leftmost bit to the rightmost position. For example, 1010
becomes 0101.
Circular shift (cir): Similar to circular shiftleft, moving the bits to the left and wrapping around.
For example, 1010 becomes 0101.
Arithmetic shiftleft (ash l): Similar to shiftleft, moves bits to the left and fills the rightmost bit
with 0. For example, 1010 becomes 0100.
Arithmetic shiftright (ash r): Moves bits to the right, preserving the sign bit. For example,
1010 becomes 1101.
1. Which of the following is NOT listed as an application of logic operations?
A) Selective set B) Data encryption C) Select clear D) Mask
2. What is the purpose of a selective complement in logic applications?
A) To reset all bits B) To invert specific bits C) To transfer data D) To combine data
3. Which application would be used to clear specific bits in a register?
A) Selective set B) Insert C) Select clear D) Mask
4. What does the term "mask" refer to in logic applications?
A) Hiding data B) Selecting specific bits for manipulation
C) Encrypting data D) Transforming data types
5. What is an instruction code?
A) A type of data storage B) A group of bits that instructs the computer to perform a specific
operation C) A method for data encryption D) A hardware component
6. What do operands indicate in an instruction code?
A) The speed of execution B) The registers and/or memory addresses for data
C) The type of processor D) The system clock rate
7. What does the opcode in an instruction code do?
A) It indicates the type of data
B) It serves as a command for the processor to carry out an operation
C) It calculates the execution time D) It stores the result of operations
8. Which of the following is a control operation?
A) Addition B) Data transfer C) Conditional branching D) Division
9. What are the two main components of an instruction code?
A) Opcode and data type B) Opcode and operands
C) Operands and execution time D) Instruction and memory
10. What does the operation code (opcode) define?
A) The size of the memory B) Operations such as addition, subtraction, and shift
C) The type of processor D) The system clock speed
11. Which of the following is an example of an arithmetic opcode?
A) MOV B) JMP C) ADD D) CALL
12. What does the MOV opcode do?
A) Jump to a different instruction B) Move data from one location to another
C) Load data from memory to a register D) Return from a subroutine
13. Which opcode is used to call a subroutine?
A) RET B) ADD C) CALL D) JMP
14. In the stored program organization diagram, what does the "Processor Register" refer to?
A) The location of the opcode B) The accumulator (AC)
C) The data bus D) The memory address
15. What is the primary function of the JMP opcode?
A) Store data to memory B) Call a subroutine
C) Jump to a different instruction D) Load data from memory
16. What is a direct operand?
A) An operand whose address requires an additional step to access
B) An operand stored directly in the register or at a specified memory location
C) An operand with a value explicitly specified within the instruction
D) An operand that cannot be modified
17. Which instruction is an example of using a direct operand?
A) LOAD R1, (R2) B) ADD R1, #5 C) LOAD R1, 1000 D) SUB R1, R2
18. What characterizes an indirect operand?
A) The value is specified within the instruction
B) The address of the operand is stored in a register or memory location
C) The operand is stored directly in the register D) The operand is always a constant value
19. In the instruction `LOAD R1, (R2)`, what does `(R2)` represent?
A) The immediate value to be loaded B) The address of the operand is found in register `R2`
C) The value stored in register `R1` D) A direct memory address
20. What is an immediate operand?
A) An operand that requires memory access to retrieve its value
B) An operand stored directly at a specified memory location
C) An operand whose value is explicitly specified within the instruction
D) An operand that cannot be used directly in operations
21. Which instruction demonstrates the use of an immediate operand?
A) LOAD R1, 1000 B) LOAD R1, (R2) C) ADD R1, #5 D) SUB R1, R2
22. What is the primary function of the Data Register (DR)?
A) Holds instruction code B) Holds memory operand
C) Holds instruction address D) Holds output character
23. Which register holds the memory address?
A) Accumulator (AC) B) Instruction Register (IR)
C) Address Register (AR) D) Program Counter (PC)
24. What does the Accumulator (AC) store?
A) Final results of computations B) Intermediate results during processing
C) Input characters D) Instruction addresses
25. What is the role of the Program Counter (PC)?
A) Holds instruction code B) Holds memory operand
C) Holds instruction address D) Holds output character
26. Which register is used to temporarily hold data during processing?
A) Data Register (DR) B) Temporary Register (TR)
C) Input Register (INPR) D) Accumulator (AC)
27. What does the Output Register (OUTR) hold?
A) Input character B) Memory address C) Intermediate results D) Output character