How to convert Binary to Gray conversion

Posted on

Binary to Grey conversion

 

Write a Program for Binary to Grey conversion in Meeting language . Algorithm for Binary-Grey conversion is given under and it may be simply applied by this algorithm .

Algorithm for Binary to Grey conversion

 

Step I : Get the quantity whose grey code equal is to be discovered.

Step II : Add quantity with itself.

Step III : XOR this added end result with the unique quantity.

Step IV : Shift the XOR ed quantity by 1 bit place to the best to get the Grey equal.

Step V : Show the end result.

Step VI : Cease.

Program for Binary to Grey conversion 

 

Learn how to Run this Program

 

For Operating this program it is best to have put in Tasm on you pc .

C:applications>tasm bin-gray.asm

Turbo Assembler Model 3.Zero Copyright (c) 1988, 1991 Borland Worldwide

Assembling file: bin-gray.asm

Error messages: None

Warning messages: None

Passes: 1

Remaining reminiscence: 438okay

C:applications>tlink bin-gray.obj

Turbo Hyperlink Model 3.Zero Copyright (c) 1987, 1990 Borland Worldwide

Warning: No stack

C:applications>bin-gray

0F

 

 

Supply projectgeek.com