• Skip to main content
  • Skip to primary sidebar

Technipages

Tutorials and fixes for smartphone, gadget, and computer problems

  • Topics
    • Android
    • Browsers
    • Gaming
    • Hardware
    • Internet
    • iPhone
    • Linux
    • macOS
    • Office
    • Reviews
    • Software
    • Windows
    • Definitions
  • Product Reviews
  • Downloads
  • About
What Are Computer Instructions?

What Are Computer Instructions?

December 14, 2022 by Mel Hawthorne Leave a Comment

It’s pretty easy to understand that computers run the software, such as an operating system or a web browser. However, it’s even generally known that software is developed by writing code in any of the many programming languages. Typically, that code is compiled into a format the computer can run.

Computers can’t understand python, C, Java, or any other programming language. It needs any instructions to be provided in the format of its instruction set. The instruction set is a collection of computer instructions. Each detail what operation is to be performed and on what data. The most common computer instruction set is x86. Specifically, the x86-64 variant is also referred to as AMD64.

Instruction Set Completeness

There are four main categories of instruction that are needed for a computer to be able to operate. Arithmetic, logical, and shift instructions. Instructions to move data between system memory and the registers. Input and output instructions. Program control and status instructions.

Arithmetic, logical, and shift instructions allow the computer to perform computations. This subset of instructions is used to perform actual computations. All the data the CPU needs to operate on is stored in RAM. For the CPU to be able to access it to operate on it. However, the data must be in the processor registers. As such, instructions that move data between RAM and the registers are critical to performance.

While computers do many things, there is typically some human interaction. Capturing these interactions and dealing with them is critical in keeping computers interactive. Further, computer code can often split into two distinct branches, and a choice must be made as to which one to take. These are known as branch instructions and are necessary for complex programming, including for and while loops. Control instructions are also core to ensuring that operations take place in the correct order.

What Is an Instruction?

An instruction is a defined piece of functionality that a processor can execute. An operation is typically displayed with a short form instruction name. The actual instruction is encoded as a short opcode. Many operations need to perform their operation on some data. The address information for this data is known as operands. The most basic operation is generally known as NOP. NOP is short for “no operation.” NOP doesn’t require any further operands as it instructs the CPU to sit idle for one clock cycle. In x86, NOP is encoded as 0x90.

JMP is another operation. It adjusts the program counter that points to the next instruction. Generally, the next instruction to be executed is the next instruction in the list. However, this can’t be true for both cases when you get to a branching statement. JMP allows a branch to jump forward or backward to a set of instructions, potentially far away, allowing the software to continue as intended. In x86, JMP is encoded as 0xE9…0xEB, 0xFF/4 and 0xFF/5. JMP will take an operand that details the memory address to which the program counter needs to be updated to point to the correct next instruction.

Conclusion

Computer instruction, also known as machine instruction, is a single instruction as part of an Instruction set. Instructions detail the exact operations for a processor to complete. Most, but not all, need to operate on data and are called alongside operands. These operands point to registers that contain the data to be operated on.

You Might Also Like

  • How to Tell If Your Computer Is Refurbished
    How to Tell If Your Computer Is Refurbished
  • Why Is My Computer Slow?
    Why Is My Computer Slow?
  • What Is a Zombie Computer?
    What Is a Zombie Computer?
  • What to Do If Your Computer Keeps Locking Itself
    What to Do If Your Computer Keeps Locking Itself
  • What is Computer Memory?
    What is Computer Memory?
  • What Is a Computer Network?
    What Is a Computer Network?

Filed Under: Hardware

Reader Interactions

Did this help? Let us know!

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Recent Posts

  • Windows 11: What is Dynamic Lock and How to Set It Up
  • How to Use Google Pay on Android
  • What is a Firefox Primary Password and How to Create One
  • Fix: Windows 11 Mic Not Working
  • How to Update Galaxy Tab S8
  • How to View a List of Recently Uninstalled Apps on Android
  • How to Sign Into WhatsApp on Multiple Devices
  • Dedicated Server vs. Shared Hosting Server

Who’s Behind Technipages?

Baby and Daddy My name is Mitch Bartlett. I've been working in technology for over 20 years in a wide range of tech jobs from Tech Support to Software Testing. I started this site as a technical guide for myself and it has grown into what I hope is a useful reference for all.

You May Also Like

  • Best Wired Computer Speakers 2022

© Copyright 2023 Guiding Tech Media · All Rights Reserved · Privacy