- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 Articles
- 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
- C++ Program to convert the Binary number to Gray code using recursion
- 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
- Python program to convert floating to binary
- C# program to convert floating to binary
- C# Program to Convert Binary to Decimal
- 8085 Program to convert ASCII to binary
- 8085 program to convert gray to binary
- Java program to convert floating to binary
- Swift Program to convert Decimal to Binary
- Swift Program to convert Binary to Decimal

Advertisements