opcode and operands, Basic Computer Science

Assignment Help:

Opcode and operands:

Let us further assume that our computer can process only two-digit decimal numbers, i.e. there can be a maximum of two operands each of a maximum of two digits. Thus the computer can add or subtract numbers containing a maximum of two digits. A simple instruction can thus be written as a combination of an opcode and its associated operands. Opcode is denoted by its unique binary code. The operands are decimal digits and therefore also need to be converted to binary code system to pass them as operands to the processor. Suppose BCD code is used to represent the operands. Then following are examples of some valid instructions on the processor:

 

791_opecode.png

In the first instruction, the first three bits represent the opcode and the remaining sixteen bits represent the two operands each a two digit decimal number expressed using BCD code. The opcode for addition  as described in the table is 000 and the BCD codes for 9,3,2 and 5 are 1001, 0011, 0010 and 0101 respectively. Thus the instruction 0001001001100100101 represents 93 + 25. Similarly, in the second instruction, first three bits represent the opcode and the  remaining eight bits specify the operand to perform the operation. However, this is the case of a very simple hypothetical computer. Real world processors are much more complex and capable of performing more than 500 machine instructions. Further they can  take their operands in a number ways: directly, from registers, from memory etc. Moreover, modern processors can perform calculations on large numbers. Thus an instruction in a modern CPU could easily comprise  more than 50 bits.      


Related Discussions:- opcode and operands

Computer generations, Computer Generations: From the early 1940's to t...

Computer Generations: From the early 1940's to the present, computer scientists have been able to identify clear-cut stages in the development of computer technology. With eac

Write separate programs for each of the above points, Question 1 Describe ...

Question 1 Describe the following with respect to creating Web Forms in .Net environment- Web Form Life Cycle Creating a Web Form Write programs with corresponding

We will compare the performance of a vector processor, In this problem we w...

In this problem we will compare the performance of a vector processor with a system that contains a scalar processor and a GPU-based coprocessor. In the hybrid system, the host pr

GNF, what does it means

what does it means

Cryptography, #questionConsider the one-time pad encryption scheme to encry...

#questionConsider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the event

About the faculty posts, is there any oppurtunity for a mca to teach mcasub...

is there any oppurtunity for a mca to teach mcasubjects online

Word processing software, Word Processing Software : The main use for word...

Word Processing Software : The main use for word processing is found in secretarial offices and small publishing companies. However, if you are involved in generating your own cor

#title.flow chart., akrenda club has just opened their jym and pools servic...

akrenda club has just opened their jym and pools services. They need a system that can keep record of total sales of each. The club has silver and gold members. The silver members

Graphs, Find the corresponding matrix of the digraph above

Find the corresponding matrix of the digraph above

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd