You are on page 1of 29

Admas University

Computer Science Department


Computer Organization and Architecture

1
Chapter-4
Register Transfer Language and Micro Operations
Outlines
2

1.Register transfer languages.

2.Bus and memory transfer

3.Arithmetic and logic operations

4.Shift micro-operations
Introduction to Register
3 A digital system is an interconnection of digital hardware
modules.
 The modules are registers, decoders, arithmetic
elements, and control logic.
 The various modules are interconnected with common
data and control paths to form a digital computer system.
 Digital modules are best defined by the registers they
contain and the operations that are performed on the data
stored in them.
 The operations executed on data stored in registers are
called microoperations.
Cont’d…

4  A microoperation is an elementary operation


performed on the information stored in one or
more registers.
 The result of the operation may replace the
previous binary information of a register or may be
transferred to another register.
 Examples of microoperations are shift, count,
clear, and load.
Register Transfer

5  Register transfer refers to the movement of data between registers


in a digital computer or a digital system.
 Information transfer from one register to another is designated in
symbolic form by means of a replacement operator.
 Register transfer is commonly used in the execution of computer
instructions.
 For example, when an instruction is fetched from memory, it is
transferred to a specific register called the instruction register (IR).
 The control unit then decodes the instruction and performs the
necessary operations, which may involve transferring data
between other registers, performing arithmetic or logical
operations, or accessing memory.
Cont’d…

6
 R2←R1 It indicates a transfer of the content of register R1 into
register R2.
 It labelled a replacement of the content of R2 by the content of R1.
The content of the source register R1 does not shift after the transfer.
 In general, Register transfer is a key component in the design and
implementation of computer architectures, microprocessors, and
digital systems. It helps in understanding the flow of data within a
system and the operations performed on that data.
Register transfer languages.
7  Register Transfer Language (RTL) is a formal notation, or a language
used to describe the flow of data and control signals in a digital system
at the register transfer level.
 Also, RTLs are formal languages used to describe the operations and
behavior of digital circuits, especially in the context of digital hardware
design.
 RTLs are used to model the functionality of a digital circuit at a low
level of abstraction, by describing how data is transferred between
registers and how operations are performed on that data.
Cont’d…
 It plays a critical role in the design and verification of digital circuits, as
8
they allow engineers to model and simulate the behavior of complex
systems before they are implemented in hardware.
 Means it provides a way to specify the behavior and operations of a
digital system without delving into the details of the underlying
hardware implementation.
 RTL describes the data transfers that occur between registers and the
operations performed on that data.
Cont’d…

9  It uses a set of symbolic notations to represent various operations


such as data transfers, arithmetic and logical operations, and
conditional branching.
 RTL is often used as an intermediate step in the design and
implementation of digital systems before the actual hardware
description or programming language is used.
 The basic elements of RTL include registers, data paths, and control
signals.
 Registers are represented by symbols or names, and the data transfers
between registers are expressed using assignment statements.
 For example, "R1 <- R2" represents the transfer of data from register
R2 to register R1.
Cont’d…
10  Arithmetic and logical operations are specified using
operators such as addition (+), subtraction (-),
multiplication (*), logical AND (&), logical OR (|), etc.
 Conditional branching and control flow are described
using control signals and conditional statements such as
"if-then-else" or "case" statements.
 RTL allows designers to specify the desired behavior of
a digital system in a concise and structured manner.
 It facilitates the analysis, verification, and synthesis of
digital systems before their actual implementation.
Bus and memory transfer
 They are important concepts in computer architecture and data
11

transfer.
 A bus is a communication pathway that allows different
components within a computer system to exchange data and
signals.
 It serves as a physical connection or a set of wires that connect
various hardware components, such as the central processing unit
(CPU), memory modules, IO devices, and other peripherals.
Cont’d…
1
2 A more efficient scheme for transferring information
between registers in a multiple-register configuration is a
Common Bus System.

 A common bus consists of a set of common lines, one


for each bit of a register.

 Control signals determine which register is selected by


the bus during each particular register transfer.
Memory Transfer
 Memory transfer refers to the process of moving data between the
13

main memory (RAM) and other components of the computer


system.
 The main memory is a volatile storage medium that holds data and
instructions that are actively used by the CPU during program
execution.
 The CPU fetches data and instructions from memory, performs
operations on them, and then stores the results back into memory.
 Memory transfer can occur in several ways:
1. Read/Write
14 Operations: The CPU can read data from memory to retrieve
instructions or load data into registers for processing.
 Similarly, it can write back the results of computations or store data in memory.
2. Data Bus: The data bus is a communication channel used for transferring data
between the CPU and memory.
 The CPU sends memory addresses over the address bus to specify the location
from which it wants to read or write data.
 The data bus carries the actual data being transferred.
3. Address Bus: The address bus is responsible for carrying memory addresses
from the CPU to the memory modules.
 It determines the specific location in memory that needs to be accessed for data
transfer.
4. Control Signals: Control signals are electrical signals that
coordinate and control the operations of the CPU, memory, and other
components.
 They include signals like read/write signals, memory enable
signals, and various timing signals that synchronize the data transfer
process.
 During memory transfer, the CPU initiates a read or write operation
by sending the appropriate signals over the control lines and address
bus.
 The memory module receives the signals, accesses the specified
memory location, and transfers the requested data back to the CPU
or stores the data provided by the CPU.
Cont’d…

 Efficient memory transfer is crucial for overall system performance.

 Factors like bus width (number of data lines in the bus), bus speed,
memory latency, and bandwidth affect the speed and efficiency of
data transfer between the CPU and memory.
 Improvements in bus architecture, such as wider buses or higher
clock speeds, can enhance memory transfer rates and, consequently,
the overall performance of the computer system also improved.
Arithmetic and logic operations
17
 Arithmetic and logic operations are fundamental
operations performed by a computer's central processing
unit (CPU) to manipulate data and perform
computations.
 These operations include mathematical calculations,
logical comparisons, and bit-level manipulations.
Here's an overview of arithmetic and logic operations:
18 Arithmetic Operations:

1. Addition: Combining two or more values to obtain their sum.

2. Subtraction: Finding the difference between two values.

3. Multiplication: Repeated addition or a shortcut for adding a number to


itself a certain number of times.

4. Division: Splitting a value into equal parts or finding the quotient and
remainder when dividing one value by another.

5. Increment and Decrement: Increasing or decreasing a value by a fixed


amount.
 Logic Operations:
1.
19 Logical AND: Performs a bitwise AND operation on two binary values,
resulting in a value that is true (1) only when both input values are true.
2. Logical OR: Performs a bitwise OR operation on two binary values,
resulting in a value that is true (1) if either or both input values are true.
3. Logical NOT: Performs a bitwise inversion on a binary value, resulting in
its complement (true becomes false, and false becomes true).
4. Logical XOR: Performs a bitwise exclusive OR operation on two binary
values, resulting in a value that is true (1) only when exactly one of the
input values is true.
5. Comparison Operations: These operations compare two values and
produce a result based on the comparison. Common comparison
operations include equal to, not equal to, greater than, less than, greater
than or equal to, and less than or equal to.
Cont’d…
20
 Arithmetic and logic operations are fundamental to computer
programming and are used extensively in various applications,
including numerical calculations, data manipulation, decision-
making, and control flow.
 CPUs are designed with specific circuits and instructions to
efficiently execute these operations, allowing computers to
perform complex tasks and computations.
Cont’d…
 Arithmetic operations are commonly used in numerical computations,
21
financial calculations, scientific simulations, and many other areas of
computing.
 Logical operations are used to perform comparisons and make decisions
based on logical conditions. These operations work with Boolean values
(true or false) and binary data at the bit level.
 In programming, both arithmetic and logical operations are essential for
performing calculations, making comparisons, controlling program flow,
and implementing various algorithms and data manipulations.
Shift micro-operations
22
Shift micro-operations are operations that perform bit-level shifting of
binary values within a computer system.
 These operations shift the individual bits of a binary value to the left or
right by a certain number of positions.
 Shift micro-operations are typically used in digital logic circuits,
processors, and assembly language programming.
 Shift microoperations are used for serial transfer of data.

 The contents of a register can be shifted to the left or the right.


 During a shift-left operation the serial input transfers a bit into the
23
rightmost position.
 During a shift-right operation the serial input transfers a bit into
the leftmost position.
There are two types of shifts: logical, and arithmetic
24
 Logical Shift: A logical shift is one that transfers 0 through the
serial input.
 The symbols shl and shr for logical shift-left and shift-right
microoperations.
 The microoperations that specify a 1-bit shift to the left of the
content of register R and a 1-bit shift to the right of the content of
register R as shown in above table.
 The bit transferred to the end position through the serial input is
assumed to be 0 during a logical shift.
Cont’d…
25  Logical Left Shift: This operation shifts the bits of a binary
value to the left by a specified number of positions. The
leftmost bit is filled with a 0, and the rightmost bit is
discarded.
 Logical Right Shift: This operation shifts the bits of a
binary value to the right by a specified number of positions.
The rightmost bit is filled with a 0, and the leftmost bit is
discarded.
Cont’d…
 Arithmetic Shift: An arithmetic shift is a microoperation that
shifts a signed binary number to the left or right.
 Arithmetic Left Shift: This operation is similar to the logical left
shift, where the bits are shifted to the left by a specified number
of positions.
 However, the leftmost bit (sign bit) is duplicated in each shift,
preserving the sign of the original value.
Cont’d…
27Arithmetic Right Shift: This operation is similar to the logical
right shift, but the leftmost bit (sign bit) is duplicated in each
shift.
 This preserves the sign of the original value in signed number
representations.

 Arithmetic shifts are commonly used in signed number


representations, such as two’s complement, where the
sign of a number is determined by the leftmost bit.
Cont’d…
 Shift micro-operations are important for manipulating
28

binary values, extracting or inserting specific bits, and


performing various bitwise operations.
 They are used in tasks such as data encoding and
decoding, data manipulation, data transfer, and handling
of binary instructions within processors and digital
systems.
!!
29

You
h a n k
T A
Q &

You might also like