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

What is evaluating information system investments, 1. What is Evaluating In...

1. What is Evaluating Information System Investments? 2. Is IS evaluation different to evaluation of other investments? 3. What approaches are used to evaluate IS investments

Object oriented programming, Write a method called Grade that takes a numer...

Write a method called Grade that takes a numeric score and returns a letter grade. Use the rule that 90 to100 is an A, 80 to 89 a B, 60 to 79 is a C, 45 to 59 is a D, and less th

Assignment - concept of programming language , Assignment :  It is compose...

Assignment :  It is composed of variable name, an assignment operator of the language and a value or variable or some expression as per composition allowed based on rules defined

C programming, input is n positive numbers and reverse it, out put gv the a...

input is n positive numbers and reverse it, out put gv the absolute difference and give the reverse(magic number),using function reverseinteger, and function generate magicnumber

Multi-valued attribute dbms, Multi-valued Attribute DBMS Each multi valued ...

Multi-valued Attribute DBMS Each multi valued attribute maps into a separate table. Include also an attribute for the primary key of the entity and relationship type which the attr

Ip addressing assignment help, An IP address consists of 4 contiguous octet...

An IP address consists of 4 contiguous octets and is generally written in Dotted Decimal Notation in the form: A.B.C.D Where: A represents the most significant octet, D the leas

Probability, Mike sells on the average 15 newspapers per week (Monday – Fri...

Mike sells on the average 15 newspapers per week (Monday – Friday). Find the probability that 2.1 In a given week he will sell all the newspapers [7] 2.2 In a given day he will sel

Introduction to Computer and Programming Concept, Classify computer systems...

Classify computer systems according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.

Cache memory, Cache memory: To reduce the idle time of the CPU and inc...

Cache memory: To reduce the idle time of the CPU and increase the speed of processing, a fast memory can be used. This can be done by using a large size of main memory. But th

Problem - programming language, Problem - programming language: A Prob...

Problem - programming language: A Problem is to carry out a particular task. For solving the problem, some input has to be given to the system. The system will process or mani

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