CS 2
CS 2
2. Write a short note on Evaluation of Microprocessor giving one example of each generation.
A microprocessor evaluation considers its processing power, data bus width, addressing capabilities, instruction set
complexity, clock speed, and overall performance, with each generation marked by significant advancements in these aspects.
First Generation (4-bit): Example: Intel 4004 - Introduced in 1971, this was the first commercially available microprocessor,
capable of processing 4-bit data at a time, primarily used in early calculators due to its limited processing power.
Second Generation (8-bit): Example: Intel 8080 - Released in 1974, it offered significant improvements with an 8-bit data bus,
allowing for more complex operations and wider applications like early personal computers.
Third Generation (16-bit): Example: Intel 8086 - Introduced in 1978, this microprocessor marked a major leap with 16-bit data
processing, enabling faster computations and more advanced system designs.
Fourth Generation (32-bit): Example: Intel 80386 - Released in 1985, this processor facilitated efficient 32-bit operations,
paving the way for powerful desktop computers with advanced multitasking capabilities.
Fifth Generation (64-bit and Beyond): Example: Intel Core i7 - Modern processors like the Core i7 represent the current
generation, offering 64-bit data processing, complex instruction sets, and high clock speeds for demanding applications like
video editing and gaming.
3. Draw a neat labelled diagram of 8051 memory Register Map.
4. Write an assembly language program to add 2 decimal numbers stored at 1050H and 1051H. Store the result at 1052H
and 1053H.
5. the accumulator contains the data B7H and register A5H.What will be the contents after the execution of the following
instruction independently:
The accumulator value is B7H and B register value is A5H
i) ADI 05
Add immediately with 05H
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Instruction - ADI 05
After execution [A] = 1 0 1 1 1 1 0 0 [
ii) CMP B
Compare B with accumulator
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Before execution [B] = A5H = 1 0 1 0 0 1 0 1
Instruction - CMP B
Condition:
(a) If [A] < [B] then Carry flag is set.
(b) If [A] = [B] then Zero flag is set.
(c) If [A] > [B] then both Carry and Zero flags are reset.
iii) CMA
Complement the accumulator
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Instruction – CMA
After execution : 48H = 0 1 0 0 1 0 0 0
iv) XRA B
Exclusive OR with accumulator
Before execution [A] = B7h = 1 0 1 1 0 1 1 1
Before execution [B] = A5h = 1 0 1 0 0 1 0 1
After execution : 12H = 0 0 0 1 0 0 1 0
v) ORA B
Logical OR with B
Before execution [A] = B7H = 1 0 1 1 0 1 1 1
Before execution [B] = A5H =1 0 1 0 0 1 0 1
After execution : B7 = 1 0 1 1 0 1 1 1
6. Write an assembly language program to increment the content of alternate memory location Each by two from 1051H to
1060H.
Label Mnemonics + Comment
Operand
LDA 1051 Load accumulator from 1051 memory location
INR A Increment accumulator by 1
INR A Increment accumulator by 1
LDA 1053 Load accumulator from 1053 memory location
INR A Increment accumulator by 1
INR A Increment accumulator by 1
LDA 1055 Load accumulator from 1055 memo location
INR A Increment accumulator by 1
INR A Increment accumulator by 1
LDA 1057 Load accumulator from 1057 memory location
INR A Increment accumulator by 1
INR A Increment accumulator by 1
1059 Load accumulator from 1059 memory location
INR A Increment accumulator by 1
INR A Increment accumulator by 1
RST 1.0 Reset
7. Write an assembly language program to perform the multiplication of two eight bit
Number where multiplication is stored at memory location 1050H and 1051H.
Result is to be sorted at memory location 105H and 1053H.
Label Mnemonics
SUB A
MOV D, A
LXI H, 1050H
MOV B, M
INX H
MOV C, M
BACK : ADD B
JNC NEXT
INR D
NEXT: DCR C
JNZ BACK
INX H
MOV M, A
INX H
MOV M, D
RST 1.0
8.Write an Assembly language program to transfer a memory block starting from 1050H to 1059H a new block starting from
1070H to 1079H.
Label Mnemonics + Comment
Operand
LXI H, 1050 Load content from 1050 to memory
LXI D 1070 Load content from 1070 to D reg.
MVI C, 0A Set counter to OA H
9. A two byte number stored at C000H and C001H.Write an assembly language program To Rotate this number to left side 3
places and store the rotated number in BC register
Label Mnemonics + Comment
Operand
LHLD C000 ; Load HL pair from COOO memory location
DAD H ; Add register pair to HL pair
DAD H ; Add register pair to HL pair
DAD H ; Add register pair to HL pair
SHLD BC ; Store HL pair to BC register pair
RST 1.0 ; Restart