UNIT 2 – PART B (2 MARK QUESTIONS & ANSWERS)
1. List the classifications of 8051 instructions.
The 8051 instructions are classified into five types:
- Data Transfer Instructions
- Arithmetic Instructions
- Logical Instructions
- Branching Instructions
- Bit Manipulation Instructions
8051 instruction-கள் ஐந்து வகைகளாக வகைப்படுத்தப்பட்டுள்ளன:
1️⃣ Data Transfer Instructions
2️⃣ Arithmetic Instructions
3️⃣ Logical Instructions
4️⃣ Branching Instructions
5️⃣ Bit Manipulation Instructions
2. Give two examples of arithmetic instructions in 8051.
ADD, SUBB are examples of arithmetic instructions.
Arithmetic instruction-களின் உதாரணங்கள் ADD மற்றும் SUBB ஆகும்.
3. Explain time delay routine.
Delay routines are subroutines used to maintain timing between operations. They create time delays by executing loops for a specific duration.
Delay routine என்பது operations இடையே தேவையான நேர இடைவெளியை உருவாக்கும் subroutine ஆகும்; இது loop மூலம் delay ஏற்படுத்துகிறது.
4. Name the addressing modes of 8051.
The 8051 supports five addressing modes: Immediate, Direct, Indirect, Register, Indexed.
8051 இல் Immediate, Direct, Indirect, Register, Indexed addressing modes பயன்படுத்தப்படுகின்றன.
5. Which instruction will multiply R4 and R5 and store the result?
MUL AB — after moving R4 to A and R5 to B registers.
R4, R5 மதிப்புகளை முறையே A மற்றும் B-க்கு மாற்றி, MUL AB instruction மூலம் multiplication செய்யப்படுகிறது.
6. Explain “INC Rn” instruction.
It increments the contents of a register (Rn) by one.
“INC Rn” instruction ஒரு register-ல் உள்ள மதிப்பை ஒன்றால் அதிகரிக்கும்.
7. Explain MUL AB and DAA instructions.
MUL AB multiplies the contents of A and B. The lower byte is stored in A and upper byte in B.
DAA adjusts Accumulator contents after BCD addition.
MUL AB A மற்றும் B-இல் உள்ள மதிப்புகளை பெருக்கி, கீழ் byte-ஐ A-யில் மற்றும் மேல் byte-ஐ B-யில் சேமிக்கிறது.
DAA BCD addition பிறகு Accumulator மதிப்பை சரிசெய்ய பயன்படுகிறது.
8. Differentiate between MOV and MOVX instructions.
MOV is used for internal data transfer, while MOVX is used for external memory access.
MOV instruction உள் memory தரவு பரிமாற்றத்திற்கும், MOVX வெளி memory தரவு பரிமாற்றத்திற்கும் பயன்படுகிறது.
9. Write any four arithmetic instructions.
- ADD A, Rn
- ADD A, direct
- SUBB A, Rn
- SUBB A, direct
8051 Arithmetic instructions:
1️⃣ ADD A, Rn
2️⃣ ADD A, direct
3️⃣ SUBB A, Rn
4️⃣ SUBB A, direct
10. What are the different addressing modes of 8051?
Immediate, Register, Direct, Register Indirect, Indexed, and Implicit addressing modes.
8051-இல் Immediate, Register, Direct, Register Indirect, Indexed மற்றும் Implicit addressing modes பயன்படுத்தப்படுகின்றன.
11. Write short notes on logical instructions.
Logical instructions perform logical operations such as AND, OR, XOR, Complement and Rotate on bit or byte data.
Logical instructions AND, OR, XOR, Complement, Rotate போன்ற Logical செயல்பாடுகளை bit மற்றும் byte தரவுகளில் செய்கின்றன.
12. Classify the instruction set of 8051 depending on function.
- Data Transfer Instructions
- Arithmetic Instructions
- Logical Instructions
- Control Transfer Instructions
- Bit Manipulation Instructions
8051 instruction set பின்வரும் வகைகளாக பிரிக்கப்படுகிறது:
Data Transfer, Arithmetic, Logical, Control Transfer, Bit Manipulation Instructions.
13. Write short notes about Indirect Addressing Mode.
In this mode, the register holds the address of the operand. Both internal and external RAM can be accessed indirectly.
இந்த addressing mode-இல் register operand-ன் address-ஐ வைத்திருக்கும். உள் மற்றும் வெளி RAM இரண்டையும் Indirect-ஆக அணுகலாம்.
14. Compare Direct and Indirect Addressing Modes in 8051.
Direct mode uses fixed memory addresses (e.g., MOV A, 30H).
Indirect mode uses registers as pointers (e.g., MOV A, @R0).
Direct mode-இல் memory address நேரடியாக குறிப்பிடப்படும் (MOV A, 30H).
Indirect mode-இல் register pointer-ஆகப் பயன்படும் (MOV A, @R0).
15. Explain Immediate Addressing Mode with example.
The operand is a constant value given in the instruction.
Example: MOV A, #64H → loads 64H into Accumulator.
Immediate Addressing Mode-இல் constant மதிப்பு instruction-ல் குறிப்பிடப்படும்.
உதாரணம்: MOV A, #64H → 64H மதிப்பை Accumulator-ல் ஏற்றும்.
16. Write short notes about CALL instructions.
ACALL and LCALL are unconditional call instructions that push the next address on the stack and jump to the subroutine.
ACALL மற்றும் LCALL இரண்டும் unconditional call instructions ஆகும்; இவை அடுத்த instruction முகவரியை stack-ல் சேமித்து subroutine-க்கு கட்டுப்பாட்டை மாற்றுகின்றன.
17. Write an instruction and explain to copy the content of register R0 to R1.
Instruction: MOV R1, R0 → copies data from R0 to R1.
Instruction: MOV R1, R0 → R0-இல் உள்ள தரவை R1-க்கு நகலெடுக்கிறது.
18. Write all the rotate instructions in 8051 and explain.
- RL A – Rotate Accumulator Left
- RLC A – Rotate Left through Carry
- RR A – Rotate Accumulator Right
- RRC A – Rotate Right through Carry
8051-இல் உள்ள rotate instructions:
RL A → இடப்புறம் சுழற்றும்
RLC A → Carry வழியாக இடப்புறம் சுழற்றும்
RR A → வலப்புறம் சுழற்றும்
RRC A → Carry வழியாக வலப்புறம் சுழற்றும்
19. Why are delay routines needed in microcontroller programs?
To create timing delays for tasks like blinking LEDs or synchronization in serial communication.
Delay routines LED blinking அல்லது Serial communication-ல் நேர ஒத்திசைவை ஏற்படுத்துவதற்கு பயன்படுகின்றன.
20. State the difference between ACALL and LCALL instructions.
ACALL calls a subroutine within 2K memory range,
LCALL calls a subroutine anywhere within 64K memory range.
ACALL instruction 2K memory வரையிலான subroutine-ஐ அழைக்கும்,
LCALL instruction 64K memory வரை எந்த முகவரியிலும் உள்ள subroutine-ஐ அழைக்க முடியும்.