Access free live classes and tests on the app
Download
+
Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA
Login Join for Free
avtar
  • ProfileProfile
  • Settings Settings
  • Refer your friendsRefer your friends
  • Sign outSign out
  • Terms & conditions
  • •
  • Privacy policy
  • About
  • •
  • Careers
  • •
  • Blog

© 2023 Sorting Hat Technologies Pvt Ltd

NTA UGC NET 2023 » NTA Study Materials » Computer Science » Instruction Codes
doubtsolving_ntaugc

Instruction Codes

Instruction codes are binary bits that lay down sequential operations needed to perform a specific task.

Table of Content
  •  

A computer program comprises a set of sequentially-ordered instructions that the computer interprets and executes to perform some user-specified tasks. Programs are written in special programming languages that are human-readable. However, a computer can’t execute high-level code, for it only understands binary machine code. Hence, for the execution of a particular task, a computer first converts the high-level codes into binary machine-executable codes and then performs the user-specified task. 

An instruction code is a set of bits that lays down a sequence of micro-operation that the computer needs to perform a specific task. Operands are definite elements of instructions which specify the data on which the operation is to be done. The data can be numbers, characters, logical data, and even addresses. For example, an instruction describes an addition operation and the numbers (operand) on which the operation is to be performed.

Structure of an Instruction Code

In general, each instruction code is 16-bit and consists of three parts called fields, which include:

  • The mode field defines how the location of the operand can be found by the computer. 

  • The operation code field or Opcode specifies the operation, such as addition, subtraction, shift, and complement, to be performed. The bits required for the operation code may vary as it is dependent on the total operations available on the computer. 

  • The address field contains the operand’s address, that is, memory or register memory location. The operand is stored in the computer’s memory just as data is stored. Based on the address of the operand, there are different types of operands: direct operand, indirect operand, and immediate operand. 

Mode

Opcode

Address of the Operand

Types of Instruction Code

In general, there are three code formats for computer instructions. Of 16-bit code, the opcode usually contains 3 bits, and the rest of 13-bit is subjective, depending on the operation code encountered. Based on the instruction code format, the three types of instruction code are:

1. Memory-reference instruction: In this type of code, 12 bits are used to specify the memory address, 3 bits for the opcode (000 to 110), and 1 bit to specify the mode as indirect addressing mode (I). 

2. Register-reference instruction: In this type of code, 12 bits indicate the register operation address, 3 bits for the opcode (111), and 1 bit is utilised for setting the mode as 0. The instructions are executed on the register. 

3. Input-output instruction: This type of code contains a 12-bit input/output operation address, 3 bits for the opcode (111), and 1 bit is utilised for setting the mode as 1. These instructions are required to transfer to and from the AC register and output device.

Completeness of Instruction Set 

For a set of computer instructions to be complete, the computer must include an adequate number of instructions in each of the following categories:

  • Arithmetic, logical, and shift instructions: These instructions specify the computational capabilities for processing the data one may wish to employ.

  • An instruction set for deploying data between the memory and processor registers

  • Instructions regulating the program along with instructions that examine status conditions

  • Input/output instructions

It is necessary to possess the capability to move data between the memory unit and registers, for a large amount of binary data is stored in the memory unit; however, all actions are executed in the processor registers. 

Instruction Cycle Code

A computer program consists of orderly instructions that are executed by a processor through a cycle called the instruction cycle. Each instruction cycle is executed in the following phases:

  • Fetching instructions from the memory unit

  • Decoding the instruction

  • Reading the operand address from memory

  • Executing the instruction

After executing an instruction, the cycle starts again at step 1, for the next instruction. The program instructions are stored in RAM. The processor initiates the execution program by fetching the instructions one at a time from the RAM. The CPU’s control unit decodes the operand part of the instruction, based on the instruction format. The ALU component of the CPU is responsible for the execution of the instructions and operation of data.

Conclusion

An instruction code is a set of bits that lay down a sequence of micro-operation that the computer needs to perform a specific task. Operands are definite elements of instructions that specify the data on which operation is to be done. In general, each instruction code is 16-bit and consists of three parts called fields, which include the mode, the opcode, and the address. 

faq

Frequently asked questions

Get answers to the most common queries related to the NTA Examination Preparation.

What is the difference between a computer program and instructions?

Ans. A computer program is a set of sequentially-arranged instructions, written using a programming language, wherea...Read full

What is an operand?

Ans. Operands are definite elements of instructions that specify the data on which operation is to be done. The data...Read full

What are memory-reference instruction codes?

Ans. In this type of code, 12 bits are used to specify the memory address, 3 bits for the opcode (000 to 110), and 1...Read full

What is the requirement for a set of instructions to be complete?

Ans. For a complete set of computer instructions, the computer should include an adequate number of input/output ins...Read full

What are the stages in an instruction cycle?

Ans. Each instruction cycle consists of the following phases: ...Read full

Ans. A computer program is a set of sequentially-arranged instructions, written using a programming language, whereas computer instructions are ordered binary machine codes that perform specific tasks.

Ans. Operands are definite elements of instructions that specify the data on which operation is to be done. The data can be numbers, characters, logical data, and even addresses.

Ans. In this type of code, 12 bits are used to specify the memory address, 3 bits for the opcode (000 to 110), and 1 bit to specify the mode as indirect addressing mode (I).

Ans. For a complete set of computer instructions, the computer should include an adequate number of input/output instructions, arithmetic, logical and shift instructions, a set of instructions to deploy data between memory and processor registers, and instructions that control the program along with instructions that check status conditions.

Ans. Each instruction cycle consists of the following phases:

  • Fetching instructions from the memory unit
  • Decoding the instruction
  • Reading the operand address from memory
  • Execution of the instruction

Crack NTA UGC with Unacademy

Get subscription and access unlimited live and recorded courses from India’s best educators


  • Structured syllabus
  • Daily live classes
  • Ask doubts
  • Tests & practice
Learn more

Notifications

Get all the important information related to the NTA UGC Examination including the process of application, important calendar dates, eligibility criteria, exam centers etc.

Application Process
NTA UGC Results
UGC NET Admit Card
UGC NET Eligibility Criteria 2023
UGC NET Exam Pattern 2023: Paper 1 & Paper 2 Marking Scheme
See all

Related articles

Learn more topics related to Computer Science
What is the Instruction Cycle in Computer Architecture

The instruction cycle helps the CPU perform its primary job of expecting tasks. This article will discuss the steps involved in the instruction cycle and an example of the instruction cycle in detail.

What is Data Structure?

Data structure is putting together data in an organised manner. Data is arranged as primitive data structure, non-primitive data structure, and linear data structure.

Types of Registers

Different types of registers are available nowadays. Read this article to learn about Accumulator, MAR, MDR, and more.

Types of Queues and their Applications

Queue is a linear structure in which actions are conducted in a certain order. This article contains the study material notes on the types of queues - linear queue, circular queue, priority queue, dequeue, and their applications.

See all
Access more than

7,940+ courses for NTA-UGC-NET and SET Exams

Get subscription
freeliveclasses_ntaugc
testseries_ntaugcnet
Subscribe Now
.
Company Logo

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585

Company
About usShikshodayaCareers
we're hiring
BlogsPrivacy PolicyTerms and Conditions
Help & support
User GuidelinesSite MapRefund PolicyTakedown PolicyGrievance Redressal
Products
Learner appLearner appEducator appEducator appParent appParent app
Popular goals
IIT JEEUPSCSSCCSIR UGC NETNEET UG
Trending exams
GATECATCANTA UGC NETBank Exams
Study material
UPSC Study MaterialNEET UG Study MaterialCA Foundation Study MaterialJEE Study MaterialSSC Study Material

© 2025 Sorting Hat Technologies Pvt Ltd

Unacademy
  • Goals
    • AFCAT
    • AP EAMCET
    • Bank Exam
    • BPSC
    • CA Foundation
    • CAPF
    • CAT
    • CBSE Class 11
    • CBSE Class 12
    • CDS
    • CLAT
    • CSIR UGC
    • GATE
    • IIT JAM
    • JEE
    • Karnataka CET
    • Karnataka PSC
    • Kerala PSC
    • MHT CET
    • MPPSC
    • NDA
    • NEET PG
    • NEET UG
    • NTA UGC
    • Railway Exam
    • SSC
    • TS EAMCET
    • UPSC
    • WBPSC
    • CFA

Share via

COPY