In the third year of the B.Sc. Physics practical program under TANSCHE, it's crucial to grasp how microprocessors work. A significant part of this involves the Microprocessor 8085, which is a popular 8-bit processor. In this experiment, students get to practice basic arithmetic operations.
This blog post will highlight the experiment on finding the 1's complement of 8-bit/16-bit Numbers using the Microprocessor 8085. This hands-on activity helps students dive into the essential features of the 8085 microprocessor, including programming logic and memory functions. By completing this task, you'll develop a clear understanding of how the 8085 processes data and performs arithmetic operations, laying a strong groundwork in microprocessor systems.
Microprocessor 8085 program to find 1's complement
Aim:
Write an assembly language program to find 1’s complement numbers using microprocessor 8085.
Apparatus required:
Microprocessor 8085 kit, power supply etc
Program:
1’s complement of 8-bit
Memory address | Machine code | Mnemonics | Operands | Comments |
8000 | 3A | LDA | 8501H | Load the data in accumulator |
8001 | 01 | |||
8002 | 85 | |||
8003 | 2F | CMA | Complement the accumulator | |
8004 | 32 | STA | 8502H | Store the result in the memory location 8502 |
8005 | 02 | |||
8006 | 85 | |||
8007 | 76 | HLT | Stop the program |
Example:
1’s complement of 8-bit number
First input location 8501H - 14H (In binary form 0001 0100)
Result location 8502H - EBH (In binary form (1110 1011)
YouTube Demo:
1’s complement of 16-bit
Memory address | Machine code | Mnemonics | Operands | Comments |
8000 | 21 | LXI | H, 8501H | Address of the LSB of the number |
8001 | 01 | |||
8002 | 85 | |||
8003 | 7E | MOV | A, M | Move the number to the accumulator |
8004 | 2F | CMA | Complement the accumulator | |
8005 | 32 | STA | 8503H | Store the result in the accumulator in the location 8503H |
8006 | 03 | |||
8007 | 85 | |||
8008 | 23 | INX | H | Increment C register |
8009 | 7E | MOV | A, M | Move the content of C register to accumulator |
800A | 32 | STA | 8504H | Store the result in the accumulator in the location 8504H |
800B | 04 | |||
800C | 85 | |||
800D | 76 | HLT | Stop the program |
Example:
1’s complement of 16-bit number
First input location 8501H - 14H (In binary form 0001 0100)
Second input location 8502H - 15H (In binary form 0001 0101)
Result location 8503H - EBH (In binary form (1110 1011)
Result location 8504H - EAH (In binary form (1110 1010)
YouTube Demo:
Procedure:
Result:
The assembly programmes for microprocessor 8085 for finding 1's complement of 8-bit and 16-bit numbers were written and executed using the microprocessor 8085 kit.
0 Comments
It's all about friendly conversation here : )
I'd love to hear your thoughts!
Be sure to check back again because I do make every effort to reply to your comments here.
Please do not post your website link here.