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

Group 5

The document is an assignment from the Department of Computer Science at Kaduna Polytechnic, focusing on assembly language. It explains the concept of registers as high-speed storage locations within the CPU that enhance computational efficiency and outlines the instruction set as a collection of commands that a CPU can execute, detailing four types: data transfer, arithmetic, logical, and control flow instructions. The assignment includes contributions from a group of students with their names and registration numbers listed.

Uploaded by

Daniel Godwin
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)
4 views4 pages

Group 5

The document is an assignment from the Department of Computer Science at Kaduna Polytechnic, focusing on assembly language. It explains the concept of registers as high-speed storage locations within the CPU that enhance computational efficiency and outlines the instruction set as a collection of commands that a CPU can execute, detailing four types: data transfer, arithmetic, logical, and control flow instructions. The assignment includes contributions from a group of students with their names and registration numbers listed.

Uploaded by

Daniel Godwin
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

KADUNA POLYTECHNIC

COLLEGE OF SCIENCE AND TECHNOLOGY


DEPARTMENT OF COMPUTER SCIENCE

ASSEMBLY LANGUAGE
ASSIGNMENT

GROUP 5
NAMES REGOSTRATION NUMBER
ZAINAB ABDULMUMIN CST23HND0716
CALEB LUKA CST23HND0736
ALIYU AHMAD ALIYU CST23HND0728
ABDULRAHMAN YUSUF CST23HND0738
GODWIN ENEOJO DANIEL CST23HND0737
ISAH ZAINAB RAMAT
MUHAMMAD ATTAHIR CST23HND0734

07, OCTOBER 2024


Question:
1. vividly explain what you understand by the term registers as used in the context of
assembly language.
2. what is an instruction set? Highlight and explain at least 4 types you know.

Solutions:
1. Registers in Assembly Language
In the context of assembly language, registers refer to small, high-speed storage
locations located directly inside the Central Processing Unit (CPU). Registers are
essential to the CPU's ability to perform computations efficiently because they
provide immediate access to the most frequently used data and instructions.
Unlike general memory (RAM), which is relatively slow to access, registers allow
the CPU to quickly retrieve data, manipulate it, and then store the result. Because of
their proximity to the CPU, registers play a critical role in enhancing performance,
as they reduce the need to frequently access slower forms of memory.
Different CPUs have different sets of registers, which can vary in size, typically
ranging from 8-bit to 64-bit registers, depending on the architecture. Common types
of registers include:
 Accumulator (AX): Used to store results of arithmetic and logic operations. It is the
most frequently accessed register for computation tasks.
 Base Register (BX): Typically holds the base memory address for data storage and
is used for addressing modes in assembly language.
 Counter Register (CX): Commonly used as a loop counter in iterative operations or
loops, managing how many times a particular loop should run.
 Data Register (DX): Handles input/output operations and can store extra data for
more complex calculations, such as those requiring large numbers.
Registers, due to their limited size, are directly manipulated by assembly language
instructions. As such, they form the backbone of low-level CPU operations, ensuring
efficient data processing, memory addressing, and instruction execution.

2. Instruction Set in Assembly Language


An instruction set refers to the collection of commands or instructions that a
particular CPU architecture can execute. These instructions are the building blocks
of a machine’s language, defining the types of operations the processor can perform
and dictating how it interacts with memory, registers, and peripheral devices.
Each processor has its unique instruction set, known as an Instruction Set
Architecture (ISA). It consists of machine-level instructions that are translated
directly into binary code, which the CPU can execute. In assembly language, these
instructions are typically represented by human-readable mnemonics, making it
easier for programmers to write code that interacts with the hardware.
There are various types of instructions within an instruction set, categorized based
on the operations they perform. Four common types include:
 Data Transfer Instructions: These instructions move data from one place to
another, such as between registers or from memory to registers. Examples include:
o 'MOV': Transfers data from one location to another.
o 'PUSH' and 'POP': Manage data on the stack for temporary storage.
 Arithmetic Instructions: These perform basic mathematical operations on data,
such as addition and subtraction. Some examples include:
o 'ADD': Adds two values.
o 'SUB': Subtracts one value from another.
o 'MUL': Multiplies two values.
o 'DIV': Divides one value by another.
 Logical Instructions: These instructions perform bitwise logical operations, such as
AND, OR, XOR, and NOT, commonly used in comparing or manipulating binary
data. Examples include:
o 'AND': Performs a bitwise AND operation.
o 'OR': Performs a bitwise OR operation.
o 'XOR': Performs a bitwise exclusive OR.
o 'NOT': Inverts the bits of a value.
 Control Flow Instructions: These control the sequence of execution of instructions
in a program. They include jumps, loops, and conditional execution instructions.
Examples include:
o 'JMP': Unconditional jump to another part of the program.
o 'CALL': Calls a procedure or function.
o 'RET': Returns from a procedure.
o 'JZ' or 'JE': Jumps if the result of an operation is zero or equal.

You might also like