
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8086 program to convert binary to Grey code
In this program we will see how to find the gray code from a binary number.
Problem Statement
Write 8086 Assembly language program to find the equivalent gray code from a binary number. The number is stored at location 2500 and store the result at 2600.
Discussion
To convert binary to gray code, we have to shift the number one bit to the right, then XOR with the previous number. Thus the gray code will be generated.
For a number 2C (0010 1100) the gray code will be 3A (0011 1010)
Input
Address | Data |
---|---|
… | … |
2500 | 2C |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
2600 | 3A |
… | … |
- Related Questions & Answers
- Python Program to Convert Gray Code to Binary
- Python Program to Convert Binary to Gray Code
- 8085 code to convert binary number to ASCII code
- 8086 program to convert ASCII to BCD number
- 8085 program to convert an 8 bit number into Grey number
- Java Program to convert ASCII code to String
- C# Program to Convert Binary to Decimal
- C# Program to Convert Decimal to Binary
- C# program to convert floating to binary
- Python program to convert floating to binary
- 8085 Program to convert ASCII to binary
- 8085 program to convert gray to binary
- Java program to convert floating to binary
- Convert C/C++ program to Preprocessor code
- C# program to convert binary string to Integer
Advertisements