Computer Science, asked by jaber7592, 1 year ago

How processor will distinguish between data and opcode?

Answers

Answered by swagger36
2

How does a microprocessor differentiate between data and instruction code?

Answer

3

Follow

Request

More

Ad by upGrad.com

PG diploma in Data Science. Apply now.

Learn hands on with 12+ case studies & projects. Get 1:1 mentorship with top industry experts.

Learn More

4 ANSWERS

Shailesh Pincha

Shailesh Pincha, Research Scholar at Sardar Vallabhbhai National Institute of Technology, Surat (2018-present)

Answered Aug 14, 2017

Originally Answered: How does a microprocessor differentiate between data and instruction codes?

The first Machine Cycle, pretty much, decides the flow of whole instruction. In 8085, if the instruction is MVI D, 85H, then the first Machine cycle always tells the processor to look for an instruction. Always. Since, the instruction is MVI, microprocessor will look for an 8-bit data for the next cycle. If you forgot writing the data to be written, and instead wrote another instruction, like 3E (which is for MVI A) intended to work as is mentioned in the parentheses, processor won’t get that.

Instead it will put 3E in register D. After taking 3E, the instruction is complete. So, 8085 will again look for a new instruction and not a data.

Similar questions