Copyright

Basic Computer Architecture Instruction Types: Functions & Examples

Instructor: Brandon Bass

Brandon has a MS in systems engineering & a PhD in Cyber Security. He has taught at several universities and possesses 12 industry certifications.

This lesson examines bit manipulation, data manipulation and the functions of computer processes. It will explore how computers process input and output data and how it travels from the CPU to bus to register and then back again.

Architecture

The process of utilizing low-level architecture is mainly done through an assembly language process that happens with a series of registers. Information that travels from the CPU across the bus to things like the memory address register or memory buffer register is done through a series of electrical signals going across the motherboard.

Registers

All these registers are used by the CPU to create and perform operations. Input is stored in these registers and then output will be sent to the screen after processing and results are completed inside the registers. This happens through a series of commands set forth by the CPU and the program counter.

  • fetch - The fetch command or fetch operation is used for instructions that the user gives to the computer. These instructions are stored in the main memory and are fetched using the registers.
  • decode - The decode operation is an operation for interpreting instructions. The instructions that are decoded will be sent to the CPU to find out what operation is supposed to be performed, for example, an arithmetic operation. This is processed through the arithmetic logic unit.
  • execute - The execute operation is performed solely by the CPU. This operation produces results, stores things into memory, and displays output to the user's screen. It is the final step of the data movement process or any other instruction given to the registers.

Memory Address Register

The memory address register (MAR) holds the addresses of data and instructions. If the CPU wants to store data in memory or read memory, the memory address register will contain all that information.

Program Counter

The program counter is commonly known as the instruction address register or instruction pointer in Intel x86 micro processing code. The program counter keeps track of the next memory address of instructions that are to be executed. Once the current instruction is completed, the program counter holds the address of the next location of instruction that needs to be executed by the processor.

Memory Data Register

The MDR contains data that is used inside RAM. The MDR is an essential process that assists a computer in performing functions faster rather than consistently having to fetch and seek from stored memory. Its primary function is to act as a two-way register that will allow data to be written and fetched more rapidly for things that are used more often.

Memory Buffer Register

The MBR holds the contents of all data, instructions or processes that are being written into memory. All data storage and instruction coming from the CPU that is going to memory go into the MBR.

Data Movement

The combinations of all these registers are how data moves inside a computer. Input is given by the user. It is fetched and stored into the registers. If processing is required these will be decoded and processed. The program counter will continue to increment to point to the appropriate locations within memory to find what is to be manipulated and the CPU will process execute instructions and produce output across the registers.

Arithmetic

Performing arithmetic is a bit different from a low-level architecture standpoint. The most basic function, addition, is incredibly straightforward. First, understand that all decimal equivalents must be translated to binary. The first 10 binary numbers look like this.


1: 00000001


2: 00000010


3: 00000011


4: 00000100


5: 00000101


6: 00000110


7: 00000111


8: 00001000


9: 00001001


10: 00001010


Now, if you want to add 2 to 3, it looks like this:


2 + 3 = 00000010 add 00000011.

This instruction is fetched and executed by the arithmetic logic unit. In binary, when you add a zero and a one, it becomes a one. When you add a one and one, it behaves like the addition of anything moving out of a placeholder for decimal. The one and the one carry over into the next digit to the left. So, 2 + 3 or 00000010 add 00000011 becomes 00000101 or 5.

Subtraction requires what is known as the two's complement. This is because subtraction, for a computer, is really just the addition of negative numbers. In order to find the two's complement, take the number in binary, produce the inversion of that number and add one. For example, we know that the number two is represented as 00000010. The two's complement of this number is 11111101 + 00000001. So, it is really 11111110 for -2 in 8-bit binary. Now, if we want 3 - 2 we just add them together as:


3 + (-2) = 00000011 + 11111110.

This equals 00000001 or 1.

Multiplication is done through addition. So, 5 ∗ 5 is really 5 + 5 + 5 + 5 + 5. Division (5/5) is the same as 5 + (-5) + (-5) + (-5) + (-5) + (-5).

Boolean Logic

From an architecture standpoint, Boolean logic is similar to any other binary function. What it does is allows for a set of choices around the three words OR, AND, and NOT.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it now
Create an account to start this course today
Used by over 30 million students worldwide
Create an account