OBJECT:Write a program to find Gray Code Equivalent of a binary number using Lookup Table.
INSTRUMENT REQUIRED: 8086 Microprocessor Trainer Kit.
|MEMORY LOCATION||MACHINE CODE||OPCODE||OPERAND|
|0202||BB 00 03||MOV||BX,0300H|
|0205||BE 00 02||MOV||SI,0200H|
To solve the given objective we have taken a binary number (its hexadecimal equivalent) in the memory location 0200H and left the memory location of 0201H and 0201H empty with 00. Then we have taken a lookup table to check for the gray code equivalent of the input binary number. The lookup table being stored from memory location of 0300H to 030FH.
To solve the given objective we have taken the following steps:
- Move the first gray code number from the lookup table into the BX registe
- Move the source index (SI) pointer to point to the memory location of the input binary number (its hexadecimal equivalent).
- Then the string byte is loaded from the lookup table and translated from gray to binary number.
- Move the source index pointer to point to the memory location where the gray equivalent number is to be stored, i.e. AL.
|0200H 0201H||NUMBER INPUT(BINARY)) NUMBER OUTPUT(GRAY CODE)||0A 00|
INPUT BINARY CODE VALUE:
RESULT: The gray code equivalent of the binary number is checked from the lookup table and stored at the output.
Most Important Question for Exam
All of these
Both a and b
Microprocessor does not contain I/O devices
Fabricated on a tiny silicon chip
Extremely high reliability
All of the these
All of the these
To compare numbers
Either of the these
Read only memory chip
Low =-15 volt to –3 vol, high = +3 volt to +15 volt
is not useful for process control system
to reduce the number of pins
- 8086 Instruction Hex Code
- Write a program to two add 16 bit Hexadecimal numbers without carry.
- Write a program to two add 16 bit Hexadecimal numbers with carry.
- Write a program to find the greatest number from an array of 10 numbers.
- Write a program to calculate the factorial of a number.
- Write a program to multiply two 16-bit numbers result should be greater than 16 bit.
- Write a program to input 5 numbers and arrange them in descending order.
- Write a program to convert the string data it’s Two’s complement form.
- Write a program to read 8 bit data from Port B. Complement this data & send it back to Port A of
- Write a program to move a block of data from one memory location to another. Input Value
- Write a program to find Gray code equivalent of a Binary number using Lookup Table.
- Microprocessor 8086 Video Play List