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

C programming, a cloth merchant A cloth showroom has announced the followin...

a cloth merchant A cloth showroom has announced the following seasonal discounts on purchase of items: Purchase amount Discount Mill items Handloom items 0-100 - 5% 101-200 5% 7.5%

Computer Literacy Assignment Task, Assignment Task: You are required to dev...

Assignment Task: You are required to develop working solutions in Excel that will manage the annual budget, current month’s inventory, and a list of the current month’s transaction

Assigment, how to measure marginal utility.?

how to measure marginal utility.?

Operating systems, Consider the state transition diagram of Figure 3.9b. Su...

Consider the state transition diagram of Figure 3.9b. Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/Su

Distinguish between s-http and ssl, QUESTION (a) Distinguish between S...

QUESTION (a) Distinguish between S-HTTP and SSL (b) What are the three basic security provided by SSL? (c) Discuss the limitations of SSL (d) State the port number us

Definition of assembler structure, In assembly language code lines have t...

In assembly language code lines have two fractions, the earliest one is the name of the instruction which is to be executed, and the next one are the parameters of the command. For

Client - server architecture, Client/ Server Architecture:   As the ca...

Client/ Server Architecture:   As the capacity and power of personal computers improved, the need to share the processing demands between the host server and the client workst

Operating system services, Operating system services: In this section ...

Operating system services: In this section we consider basic services supported by an operating system. There are many building blocks to be considered, not all of which will

Convert string to super ascii, A string S is said to be "Super ASCII", if i...

A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''''''''a''''''''-'''''''

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