Set Instruction and Instruction Addresses | Arsitektur dan Organisasi Komputer

Share

Summary

This video discusses instruction sets, focusing on their characteristics and functions. It covers the basics of what an instruction set is, its various elements, and how instructions are represented, particularly in machine code and assembly code. The video also delves into different types of instruction addresses (three-address, two-address, one-address, and zero-address) using practical examples and explains the concept of postfix notation for zero-address instructions. Finally, it briefly touches upon various types of operations, including data transfer, arithmetic, logical, conversion, I/O, system control, and transfer of control.

Highlights

What is an Instruction Set?
00:00:52

An instruction set is a complete collection of instructions understood by the CPU. These instructions are typically represented in machine language (binary code) and assembly code, which differs from high-level human language. They control hardware components to process logical instructions.

Elements of Instructions
00:02:24

There are four key elements: Operation Code (opcode), which specifies the operation (e.g., AND, OR, +, -, *), Source Operand Reference, indicating the data to be processed, Result Operand Reference, specifying where the result will be stored, and Next Instruction Reference, directing to the next instruction in sequence.

Instruction Representation
00:05:54

Each instruction has a unique bit pattern in machine code. In assembly code, symbols like ADD, SUB, LOAD, DIV, STORE, MUL, and MOVE represent operations. An example like 'ADD A, B' means adding the values in variables A and B, with the result stored back into A.

Instruction Format and Address Types
00:07:30

A simple 16-bit instruction format allocates 4 bits for the opcode and 6 bits for each operand reference. The video then explains instruction addresses: three-address, two-address, one-address, and zero-address. Three-address instructions specify two source operands and one result operand (e.g., ADD Y, A, B means Y = A + B). Two-address instructions mean one operand serves as both source and result (e.g., ADD A, B means A = A + B). One-address instructions rely on an accumulator for temporary storage (e.g., LOAD A, ADD B, results in A+B in accumulator).

Example of Instruction Addresses
00:12:41

The video provides a detailed example of how the operation Y = A + B - C would be implemented using three-, two-, and one-address instructions. It shows how variables are moved, operated on, and results stored at each step, highlighting the roles of accumulators and temporary variables.

Zero-Address Instructions and Postfix Notation
00:27:52

Zero-address instructions use postfix (or Reverse Polish) notation, where the operator follows its operands (e.g., A B + for A + B). This type of instruction typically utilizes a stack. The video illustrates converting infix expressions to postfix and then demonstrating the push/pop operations on a stack to execute these instructions.

Types of Operands and Operations
00:40:54

Operands can be addresses, numbers, characters, or logical data. Numbers can be integers, floating-point, or decimal. The video also lists various types of operations: Data Transfer (e.g., MOVE, LOAD, STORE), Arithmetic (e.g., ADD, SUB, MUL, DIV, ABS), Logical (e.g., AND, OR, NOT, XOR), Conversion (e.g., converting data types), I/O (input/output processes), System Control (e.g., privilege status), and Transfer of Control (e.g., JUMP, CALL, RETURN).

Recently Summarized Articles

Loading...