programb24 - Microprocessors & Applications (UPTU) Appendix...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Appendix B ØØ Explanation : For Binary-Gray conversion. (i) Record the MSB as it is. (ii) Add this bit to the next position, recording the sum and neglecting carry if any. (iii) Record successive sums until completed. e.g. to convert 0AH i.e. 1010 binary to gray. *** corel *** For our program the logic that we will be using for Binary-Gray conversion is that first we will add the number with itself. Then we will X-OR this added number with the original number. Then we will shift this X-ORed number by 1 bit position to the right. This gives the equivalent gray code. Display this Gray code. e.g. number = 0A. 0 A H + 0 A H 14 H XOR added number 0 0 0 1 0 1 0 0 (14 H) with original number 0 0 0 0 1 0 1 0 (0A H) 0 0 0 1 1 1 1 0 Shift by 1 bit to right 0 0 0 0 1 1 1 1 (0F H) (0FH) is the gray equivalent of 0A H. ØØ Algorithm : Step I : Get the number whose gray code equivalent is to be found. Step II
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/04/2011 for the course ECON 101 taught by Professor Lucky during the Spring '11 term at Silver Lake.

Page1 / 2

programb24 - Microprocessors & Applications (UPTU) Appendix...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online