What would be the value of register AL after the execution of the following assembly language program of 8086 ? AL = 53, CL = 29
ADD AL, CL
DAA
82
The two instructions perform a packed-BCD addition: 53 plus 29 in decimal is 82, and DAA is what makes the binary hardware produce that answer.
Step 1 — the binary addition. The values are packed BCD, so each nibble holds one decimal digit.
\(53_{H}+29_{H}=7C_{H}\)
Checking nibble by nibble: \(3+9=12=C_{H}\) in the low nibble with no carry out, and \(5+2=7\) in the high nibble. The processor has done ordinary binary arithmetic and produced 7C — which is not valid BCD, since C is not a decimal digit. This is why option 1 is offered: it is the answer before the adjustment.
Step 2 — what DAA does with it. The rule is applied to each nibble in turn:
| Test | Action | Here |
|---|---|---|
| Low nibble > 9, or AF = 1 | Add 06H, set AF | C > 9, so add 06 |
| High nibble > 9, or CF = 1 | Add 60H, set CF | 8 is not > 9, no CF — no action |
\(7C_{H}+06_{H}=82_{H}\)
The high nibble is now 8, which is a legal digit and no greater than 9, so the second rule does not fire. AL = 82H — option 2, reading directly as the decimal answer 82.
Why adding 6 is the right correction. A nibble counts in sixteens but a decimal digit counts in tens, so whenever a digit sum passes 9 the binary result is short of a decimal carry by exactly \(16-10=6\). Adding 6 pushes the nibble past 16, which both generates the carry into the next digit and leaves the correct remainder behind. Here \(C+6=12_{H}\) gives a carry of 1 into the high nibble and a 2 left in the low nibble — exactly the decimal digits of 82.
Why the other options are wrong. Option 3, DC, would follow from adding 60H instead of 06H — adjusting the wrong nibble. Option 4, E8, comes from adding 66H, applying both corrections when only one was needed.
The point of packed BCD is that the digits can be read out directly for a display or printed record without any binary-to-decimal conversion, which is why it survives in calculators, tills and real-time clock chips.
Hence, AL = 82.
Given below are two statements :
Statement I : In 8051 micro-controller register banks and stack reserves 32 bytes from locations 00 to 1F Hex
Statement II : Bit-Addressable RAM locations are 20 H to 2 F H.
In the light of the above statements, choose the most appropriate answer from the options given below :
Find the delay generated by Timer 0 in the following code of 8051 microcontroller : clock period = 1.085 µs.
MOV TMOD, #01H
MOV TLO, #3DH
MOV THO, #0A2H.
SET B TRO
Loop : J N B TFO, LOOP
CLR TRO
CLR TFO
In "JZ Next" instruction of 8051 microcontroller, which register's content is checked to see if it is zero?
Using 8051 assembly language programming numbers 54 H and 98 H are added. After addition the status of CY, AC and P flags are respectively:
In 8051 microcontroller, one machine cycle lasts in 12 oscillation period. Crystal oscillator's frequency is 11.0592 MHz. Find how long it takes to execute instruction MOV R4, # 25.
Advantage of segmented memory in 8086 is
A. Allows the memory capacity to be 1M byte, although the actual address is of 16 bit size.
B. Allows the placing of code and data portions of the same program in different parts of memory.
C. Allows the memory capacity to be 2M byte, although the actual address is of 16 bit size.
D. Allows the placing of code and data portion of the same program in same parts of memory.
E. Allows the memory capacity to be 1M byte, although the actual address is of 20 bit size
Choose the correct answer from the options given below :
Which of the following statements are correct for a microcontroller ?
A. A microcontroller has on-chip I/O ports
B. A microcontroller has a fixed amount of RAM on the chip
C. The flag register in the 8051 is called program standard word
D. Auxiliary carry flag is set when there is a carry from D3 to D4 during an ADD or SUB operation
E. Overflow flag is only used to detect errors in unsigned arithmetic operations.
Choose the correct answer from the options given below :
Match List I with List II
| LIST I (instruction of 8051 microcontroller) | LIST II (Addressing mode) | ||
|---|---|---|---|
| A. | MOV A, # 32 H | I. | Register addressing mode |
| B. | MOV R 6, A | II. | Register Indirect addressing mode |
| C. | MOV R4, 7 FH | III. | Immediate Addressing mode |
| D. | MOV A, @ RO | IV. | Direct Addresing mode |
Choose the correct answer from the options given below:
The ALE line of an 8085 microprocessor is used to
Contents of ‘A’ register after execution of the following 8085 microprocessor program is
MVI A, 55 h
MVI C, 25 h
ADD C
DAA
Register which is used to store values of arithmetic and logical operations is termed:
How many bytes of bit addressable memory is present in 8051 based microcontrollers?
A single instruction to clear the lower four bits of the accumulator in 8085 assembly language is-
In Microprocessor 8085 Address/Data buffer is a/an _______ buffer.
Microprocessor 8085 operates on a clock cycle with ______ duty cycle.