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

Defining conditional operator, Problem 1 What is conditional operator? ...

Problem 1 What is conditional operator? Using conditional operator find a smallest number between two numbers Defining conditional operator Using it to find smallest n

Explain the working of bus connection, Question 1 Explain the working of B...

Question 1 Explain the working of Bus connection Question 2 Write a note on: Robotics and Voice Recognition Question 3 Describe the construction of CD-ROM Question 4

Flowchart looping, create a flowchart showing average score for the 3 quizz...

create a flowchart showing average score for the 3 quizzes assume that there are 3 sections each having 5 students the only valid number to be entered is 1-100 for the quizzes shou

Operating system (o.s), Operating System (O.S) An operating syst...

Operating System (O.S) An operating system is the complete set of programs written to utilize the computer resources in an optimal manner. The operating system supervise

What are the tasks of ALU and their subcomponents, ALU’s tasks and their s...

ALU’s tasks and their suitable subcomponents: Addition and subtraction these two tasks are carried out by constructs of logic gates, such as half adders and full adders. While they

Basic concepts in internet, INTERNET Internet: The global network of ...

INTERNET Internet: The global network of computers linked by exclusive and regular phone lines and microwave and satellite signals. Extranet: An extranet is the part of

Software evolution, SOFTWARE EVOLUTION:  As you know that in a compute...

SOFTWARE EVOLUTION:  As you know that in a computer system both hardware and software complement each other  -  one is of hardly any use without the other. Hence, since the ve

Data communications and networks, A magazine publisher based in Nairobi has...

A magazine publisher based in Nairobi has branch in Kisumu, and one in Mombasa. The company has kept in touch by telephone and courier service. Each office is networked. The networ

Storage capacity and cost per bit of storage, Storage capacity and Cost per...

Storage capacity and Cost per bit of storage: Storage capacit y:  It is the amount of data that can be stored in the storage unit. A large capacity is preferred.  Cost pe

Digital camera , Digital Camera: A Digital camera is an electronic dev...

Digital Camera: A Digital camera is an electronic device which takes video or still photographs or both, digitally by recording images via an electronic image sensor. Digital

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