0% found this document useful (0 votes)
7 views4 pages

Syl 2

Uploaded by

Kamarul Ariffin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Syl 2

Uploaded by

Kamarul Ariffin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Computer Hardware Language

Overview

This teaching note focuses on the fundamentals of hardware language, specifically the
instructions that direct computer hardware operations. It includes topics such as number
representation, different types of instructions (logical, arithmetic, control, and memory
operations), and their roles in computer systems. The goal is to provide students with a
foundational understanding of how computer hardware executes instructions and processes
data.

Objectives

1. Understand Computer Hardware Operations: Gain insight into how hardware executes
basic operations.
2. Learn Number Representation: Explore how numbers are represented and manipulated
in computers.
3. Introduction to Instruction Representation: Understand how instructions are
represented and interpreted by hardware.
4. Differentiate Instruction Types: Learn about logical, arithmetic, control, and memory
operation instructions.
5. Apply Knowledge to Basic Hardware Operations: Relate instruction types to their
practical applications in hardware operations.

1. Computer Hardware Operations

 Basic Components:
o Central Processing Unit (CPU): Executes instructions and performs
computations.
o Registers: Small, fast storage locations within the CPU used for temporary data
storage and operations.
 Instruction Cycle:
o Fetch: Retrieve an instruction from memory.
o Decode: Interpret the instruction to understand what action is required.
o Execute: Perform the specified operation.
o Store: Save the result to a register or memory.
 Instruction Set Architecture (ISA):
o Definition: The set of instructions that a CPU can execute, including the format
and encoding of instructions.

2. Number Representation in Computers

 Binary Representation:
o Binary Digits (Bits): The fundamental units of data in computers, represented as
0 or 1.
o Binary Numbers: Sequences of bits used to represent numerical values.
 Decimal to Binary Conversion:
o Process: Convert decimal numbers to binary by dividing by 2 and recording
remainders.
 Other Number Systems:
o Hexadecimal: Base-16 system used to simplify binary representation (e.g., A =
10, B = 11).
o Octal: Base-8 system, sometimes used in computing (e.g., 10 in octal = 8 in
decimal).
 Floating-Point Representation:
o Standard: IEEE 754 standard for representing real numbers with a fractional
component.
o Components: Sign bit, exponent, and mantissa.

3. Introduction to Instruction Representation

 Instruction Format:
o Opcode: Operation code specifying the operation to be performed.
o Operands: The data or addresses used by the instruction.
o Addressing Modes: Methods for specifying the operands (e.g., immediate,
direct, indirect).
 Instruction Encoding:
o Binary Representation: Instructions are encoded in binary format for execution
by the CPU.
o Instruction Length: Varies depending on the ISA, often fixed or variable in length.
4. Logical and Arithmetic Instructions

 Logical Instructions:
o AND: Performs a bitwise AND operation.
o OR: Performs a bitwise OR operation.
o XOR: Performs a bitwise exclusive OR operation.
o NOT: Performs a bitwise NOT operation (inversion of bits).
 Arithmetic Instructions:
o ADD: Adds two operands.
o SUB: Subtracts one operand from another.
o MUL: Multiplies two operands.
o DIV: Divides one operand by another.
o INC: Increments the value of a register or memory location.
o DEC: Decrements the value of a register or memory location.

5. Control Instructions

 Branch Instructions:
o JUMP: Transfers control to a different location in the program.
o CALL: Calls a subroutine, saving the return address.
o RETURN: Returns from a subroutine to the caller.
 Conditional Branching:
o BEQ (Branch if Equal): Branches if two values are equal.
o BNE (Branch if Not Equal): Branches if two values are not equal.
o BGT (Branch if Greater Than): Branches if one value is greater than another.
 Loop Control:
o LOOP: Repeats a sequence of instructions a specified number of times.

6. Instructions for Memory Operations

 Load Instructions:
o LOAD: Transfers data from memory to a register.
o MOV: Moves data between registers or between memory and registers.
 Store Instructions:
o STORE: Transfers data from a register to memory.
 Memory Addressing:
o Direct Addressing: Specifies the exact memory address.
o Indirect Addressing: Uses a register to hold the address of the memory location.
 Stack Operations:
o PUSH: Adds data to the stack.
o POP: Removes data from the stack.

You might also like