answersLogoWhite

0


Best Answer

op code is used as the value of instruction . And operand is address location where the instruction can meet.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between operand and opcode?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the difference between opcode and operand?

What is difference between oppress code and operend


What is operand difference between operand and operator?

Simply defining, in an expression like A+B A is an Operand B is an Operand Plus is the Operator in between


Specify the opcode and operand in the instruction MOV HL?

mov H , L mov is opcode H L are operands


What are the Machine Cycles For Inr M Instruction?

3 for opcode fetch, 1 for opcode decode, 3 for operand fetch, and 3 for opcode store, for a total of 10, not including wait states.


What do mean by operands in microprocessor?

An opcode is a single instruction in assembly language. An operand is the data it does something with.For example, in "MOV r0, #0C", MOV is the opcode ("move this value into this register"), while r0 (register 0) and #0C (the number 12) are operands.


How an assembler converts assembly mnemonics to machine language?

Each mnemonic maps directly to a machine instruction code, known as an opcode. Some mnemonics map to more than one opcode, however the instruction's operand types will determine which specific opcode will be generated.


What are operands?

Every instruction contains to parts: operation code[opcode],and operand. The first part of an instruction which specifies the task to be performed by the computer is called opcode. The second part of the instruction is the data to be operated on.,and it is called operand. The operand[or data]given in the instruction may be in various forms such as 8-bit or 16-bit data, 8-bit or 16-bit address, internal register or a register or memory location.


How do you use opcode and operand?

The hard way: Download the processor manuals and code the opcode and operands by hand The easy way: Use an assembler program. The instructions are slightly different for each program, so try reading the manuals.


What is addressing mode in 8086?

Immediate addressing mode is when one of the operands is "immediately" located after the opcode. It is more correct to say that the operand is part of the instruction.


What is addressing mode 8086?

Immediate addressing mode is when one of the operands is "immediately" located after the opcode. It is more correct to say that the operand is part of the instruction.


What is the C source code of pass one of two pass assembler?

#include#include#includevoid main(){char opcode[10],operand[10],label[10],code[10][10],ch;char mnemonic[10][10]={"START","LDA","STA","LDCH","STCH","END"};int locctr,start,len,i=0,j=0;FILE *fp1,*fp2,*fp3;clrscr();fp1=fopen("INPUT.DAT","r");fp2=fopen("SYMTAB.DAT","w");fp3=fopen("OUT.DAT","w");fscanf(fp1,"%s%s%s",label,opcode,operand);if(strcmp(opcode,"START")==0){start=atoi(operand);locctr=start;fprintf(fp3,"%s\t%s\t%s\n",label,opcode,operand);fscanf(fp1,"%s%s%s",label,opcode,operand);}elselocctr=0;while(strcmp(opcode,"END")!=0){fprintf(fp3,"%d",locctr);if(strcmp(label,"**")!=0)fprintf(fp2,"%s\t%d\n",label,locctr);strcpy(code[i],mnemonic[j]);while(strcmp(mnemonic[j],"END")!=0){if(strcmp(opcode,mnemonic[j])==0){locctr+=3;break;}strcpy(code[i],mnemonic[j]);j++;}if(strcmp(opcode,"WORD")==0)locctr+=3;else if(strcmp(opcode,"RESW")==0)locctr+=(3*(atoi(operand)));else if(strcmp(opcode,"RESB")==0)locctr+=(atoi(operand));else if(strcmp(opcode,"BYTE")==0)++locctr;fprintf(fp3,"\t%s\t%s\t%s\n",label,opcode,operand);fscanf(fp1,"%s%s%s",label,opcode,operand);}fprintf(fp3,"%d\t%s\t%s\t%s\n",locctr,label,opcode,operand);fcloseall();printf("\n\nThe contents of Input Table :\n\n");fp1=fopen("INPUT.DAT","r");ch=fgetc(fp1);while(ch!=EOF){printf("%c",ch);ch=fgetc(fp1);}printf("\n\nThe contents of Output Table :\n\n\t");fp3=fopen("OUT.DAT","r");ch=fgetc(fp3);while(ch!=EOF){printf("%c",ch);ch=fgetc(fp3);}len=locctr-start;printf("\nThe length of the program is %d.\n\n",len);printf("\n\nThe contents of Symbol Table :\n\n");fp2=fopen("SYMTAB.DAT","r");ch=fgetc(fp2);while(ch!=EOF){printf("%c",ch);ch=fgetc(fp2);}fcloseall();getch();}INPUT FILE:INPUT.DAT** START 2000** LDA FIVE** STA ALPHA** LDCH CHARZ** STCH C1ALPHA RESW 1FIVE WORD 5CHARZ BYTE C'Z'C1 RESB 1** END **-Fabianski Benjamin


How the compiler conver the hll statements into machine language?

The assembler's role is most important.it converts the high level language statements into machine level language statements with the help of some operand and opcode specifications.there is first mnemonic opcode specification.here instead of writing binary opcodes,mnemonic opcodes can be specified.advantage of using mnemonic opcodes are:program becomes readable.debugging becomes simple.so it is the responsibility of the assembler to replace each mnemonic opcode by its respective binary opcode.also there is symbolic operand specification.in that,instead of specifying the addresses of instructions and data,symbols can be used.advantage of using the symbolic operand is that the program can be modified with no overhead.it is the responsibility of assembler to replace each symbol by its address.