iGamesNews

Menu
  • Home
  • Forum
  • PC
  • Sony
    • PlayStation
    • Ps5
  • Nintendo
    • Switch
  • Microsoft
    • Xbox One
  • Mobile
    • Android
    • Ios
  • Reviews
    • Guides

Instruction of a CPU, what it is, what it is used for and its types

The Boss April 4, 2021 No Comments

The processors of millions of computers around the world only know how to do one thing, execute instructions continuously. But what is an instruction? Keep reading to find out.

What is an instruction?

Binary system

An instruction is the minimum unit of a program, which tells the CPU what to do through a series of instructions that are executed sequentially. Each instruction is a number of bits in the binary code which is divided into three different parts:

  • Instruction Bits: These bits indicate which instruction the CPU will execute and therefore the path that the instruction will follow to execute, is also called an opcode.
  • Address bits: indicate at which memory address the data is in memory.
  • Mode bits: Mode bits indicate how an instruction is executed, they are used when there are multiple ways to execute an instruction or there are different conditions.

If you want to know how a CPU executes instructions, we recommend the article “This is how your CPU executes the instructions that the software gives itIn HardZone, this very site.

Addressing Instructions

CPU RAM

Depending on where the data is located, there can be different variations of the same type of instruction, the way a processor accesses data is called addressing mode.

  • Immediate addressing is used when the data is the same instruction, in which case the data is stored in a register or internal memory of the processor to be executed from there.
  • The second type of addressing is direct, where the program indicates the memory address where the data is located.
  • The third type of addressing is indirect, which gives us the address where the memory address is where the data is located.

It should be noted that some instructions do not have an addressing mode, because they do not require data to be executed.

Types of instructions in a CPU

RISC-V_3

Here is a summary of the instructions most commonly used by different processors. These instructions are common to all registers and instruction sets, whether they are x86, ARM, MIPS, PowerPC, etc. In addition, it has no relation whether the instruction set is RISC or CISC.

  • The instructions of arithmetic manipulation These are the ones who perform mathematical manipulation operations such as addition, subtraction, multiplication, and division. As well as more complex operations such as trigonometric formulas, square roots, powers.
  • the logic instructions This is the second type of instructions executed by the ALU, they are in fact binary operations which emulate the operation of logic gates. That is, AND, OR, XOR, NAND, NOR, XNOR and NOT.
  • the bit manipulation instructions, are based on the manipulation of the bits of a ditto string with instructions such as shifting one bit to the left or right, inverting the order or switching them.
  • the data movement instructions They are responsible for moving data from one part of memory to another, from memory to memory, from processor to memory, and from memory to processor.
  • the program control instructions are those that are activated when certain conditions are met, such as
  • the jump instructions they are those which indicate that the program does not go to the next memory address, but to a specific memory address marked by the jump instruction.

Data types and multiplicity of instructions

Processors

Because a processor today can process different types of data, for example integers and floating points. Some arithmetic instructions are often duplicated for the floating point instruction set. There are also vector instructions, such as AVX instruction sets, or also known as SIMD instructions, which work with multiple operands at the same time.

Since these instructions are executed in different units, they end up requiring different instruction bits, which means that adding new types of data in a processor means in many cases significantly increasing the instruction set, their complexity. . as well as the part that decodes and executes them on a CPU.

Table of Contents

  • What is an instruction?
  • Addressing Instructions
  • Types of instructions in a CPU
  • Data types and multiplicity of instructions
Share
Tweet
Reddit
Pinterest
Prev Article
Next Article
Tags:CPU instruction types

Leave a Reply

Cancel reply

Popular Posts

  • DDR4 on Rocket Lake-S, Gear 1, and Gear 2 mode settings
  • Black Ops Cold War arrives tomorrow with many news
  • Mobile version will soon start in beta

iGamesNews

Popular Month

  • Some games can no longer be updated
  • Outriders patch notes: crossplay, bug fixes, and more
  • Hit the ice in NHL 21 with EA Play

Most Recent

  • Destiny 2’s new transmog system sounds like a grind-in-the-ace
  • Nier Replicant Review Impressions: Is the Nier Remaster Worth it? Should you buy Nier Replicant …
  • Gameplay NieR Replicant Version 1.22: The first 20 minutes of the game on PS4

Related News

  • Cougar MARS, RGB table for playing XL games
  • How to Download Microsoft PowerPoint Free
  • Home
  • Contact Us
  • Privacy Policy
Copyright © 2021 iGamesNews
Video Games News, Gaming Reviews, Tips, Guides and More.