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

Discuss about the descriptor classes, Question 1 List down any six feature...

Question 1 List down any six features of a Smartphone Question 2 Give a brief note on a) Internal Flash Disk. b) Use of C++ in Symbian OS Question 3 What are the naming

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

Assembly, Design and develop a program to calculate the sum of an integer n...

Design and develop a program to calculate the sum of an integer number using MIPS assembly language.

Explain Debug program in assembly language , To make a program in assemble...

To make a program in assembler two choices exist, the earliest one is to use the TASM or Turbo Assembler, of Borland, and the next one is to use the debugger, generally we use this

CAI, what is CAI? explain its pit falls.

what is CAI? explain its pit falls.

Briefly explain main parts of the camera, Question 1 Briefly explain main ...

Question 1 Briefly explain main parts of the Camera Question 2 Write a note on: Ripple Edit Tool, Rate Stretch Tool & Track Selection Tool Question 3 What is Pixel

Memory, what is cache memory

what is cache memory

Register array, #queA register is a memory location surrounded by the CPU i...

#queA register is a memory location surrounded by the CPU itself, designed to be rapidly accessed for purposes of fast data retrieval. Processors normally hold a register array, wh

Cpu, what is cpu

what is cpu

A* search-artificial intelligence, A* Search-Artificial intelligence:  ...

A* Search-Artificial intelligence:   A* search combines the best parts of uniform cost search that  called the fact that it's optimal and complete, and the best parts of gre

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