DATA TRANSFER AND DATA MANIPULATION
Most computer instructions can be
classified into three categories:
1) Data transfer
2) Data manipulation
3) Program control instructions
• Data transfer instruction cause transfer of data
from one location to another.
• Data manipulation performs arithmatic, logic
and shift operations.
Data transfer
Data Manipulation
Typical Data Transfer Instruction :
: transfer from memory to a processor register, usually an AC
(memory read).
: transfer from a processor register into memory (memory
write).
: transfer from one register to another register
: swap information between two registers or a register and a
memory word
: transfer data among processor registers and input/output device
: transfer data between processor registers and a memory
stack
Load
Store
Move
Exchange
Push/Pop
Input/Output
MODE ASSEMBLY CONVENTION REGISTER TRANSFER
Direct Address LD ADR ACßM[ADR]
Indirect Address LD @ADR ACßM[M[ADR]]
Relative Address LD $ADR ACßM[PC+ADR]
Immediate Address LD #NBR ACßNBR
Index Address LD ADR(X) ACßM[ADR+XR]
Register LD R1 ACßR1
Register Indirect LD (R1) ACßM[R1]
Autoincrement LD (R1)+ ACßM[R1], R1ßR1+1
Data Manipulation Instruction
1) Arithmetic
2) Logical and bit manipulation
3) Shift Instruction
ARITHMETIC INSTRUCTIONS
LOGICAL AND BIT MANIPULATION INSTRUCTIONS
NAME MNEMONIC
Clear
Complement
AND
OR
Exclusive-OR
Clear Carry
Set Carry
Complement Carry
Enable Interrupt
Disable Interrupt
CLR
COM
AND
OR
XOR
CLRC
SETC
COMC
EI
DI
SHIFT INSTRUCTIONS
NAME MNEMONIC
Logical Shift Right
Logical Shift left
Arithmetic shift right
Arithmetic shift left
Rotate right
Rotate left
Rotate right with
carry Rotate left with
carry
SHR
SHL
SHRA
SHLA
ROR
ROL
RORC
ROLC
Program control instructions provide
decision making capabilities and change
the path taken by the program when
executed in computer.
Program control instructions
 Program Control
Program Control Instruction :
Branch and Jump instructions are used
interchangeably to mean the same thing.
NAME MNEMONIC
Branc
h Jump
Skip
Call
Return
Compare (by subtraction)
Test (by ANDing)
BR
JMP
SKP
CALL
RET
CMP
TST
MICROPROCESSOR
 A microprocessor is a processing unit on a single chip. It is an integrated circuit
that performs the core functions of a computer CPU.
•
 It is a multipurpose programmable silicon chip constructed using Metal Oxide
Semiconductor (MOS) technology which is clock-driven and register-based.
•
 It accepts binary data as input and provides output after processing it as per the
specification of instructions stored in the memory.
RISC is the way to make hardware simpler whereas CISC is the single
instruction that handles multiple work.
RISC
 RISC stands for Reduced Instruction Set Computers.
 RISC is a microprocessor and as the name indicates, it performs a smaller
number of computer instructions.
 In the RISC architecture, the instruction set of the computer system is
simplified to reduce the execution time.
 RISC architecture has a small set of instructions that generally includes register-
to-register operations.
 The RISC architecture uses comparatively a simple instruction format that is easy
to decode.
 The instruction length can be fixed and aligned to word boundaries. RISC
processors can execute only one instruction per clock cycle.
Advantages of RISC
 Simpler instructions: RISC processors use a smaller set of simple instructions, which makes them easier to
decode and execute quickly. This results in faster processing times.
•
 Faster execution: Because RISC processors have a simpler instruction set, they can execute instructions
faster than CISC processors.
•
 Lower power consumption: RISC processors consume less power than CISC processors, making them ideal
for portable devices.
•
•
Disadvantages of RISC
 More instructions required: RISC processors require more instructions to perform complex tasks than
CISC processors.
•
 Increased memory usage: RISC processors require more memory to store the additional instructions needed
to perform complex tasks.
•
 Higher cost: Developing and manufacturing RISC processors can be more expensive than CISC processors.
CISC
 The CISC architecture comprises a complex instruction set. A CISC processor
has a variable-length instruction format.
 In this processor architecture, the instructions that require register operands can
take only two bytes.
 In a CISC processor architecture, the instructions which require two memory
addresses can take five bytes to comprise the complete instruction code.
Therefore, in a CISC processor, the execution of instructions may take a varying
number of clock cycles.
 The CISC processor also provides direct manipulation of operands that are stored
in the memory.
• The main motive of CISC is to make compiler development easy and simple
Advantages of CISC
 Reduced code size: CISC processors use complex instructions that can perform multiple operations,
reducing the amount of code needed to perform a task.
•
 More memory efficient: Because CISC instructions are more complex, they require fewer
instructions to perform complex tasks, which can result in more memory-efficient code.
•
 Widely used: CISC processors have been in use for a longer time than RISC processors, so they have
a larger user base and more available software.
Disadvantages of CISC
 Slower execution: CISC processors take longer to execute instructions because they have more
complex instructions and need more time to decode them.
•
 More complex design: CISC processors have more complex instruction sets, which makes them more
difficult to design and manufacture.
•
 Higher power consumption: CISC processors consume more power than RISC processors because
of their more complex instruction sets.
S.No. RISC CISC
1. RISC is a reduced instruction
set.
CISC is a complex instruction set.
2. The number of instructions is
less as compared to CISC.
The number of instructions is more as
compared to RISC.
3. The addressing modes are
less.
The addressing modes are more.
4. It works in a fixed instruction
format.
It works in a variable instruction format.
5. The RISC consumes low
power.
The CISC consumes high power.
6. The RISC processors are
highly pipelined.
The CISC processors are less pipelined.
7. It optimizes the performance
by focusing on software.
It optimizes the performance by focusing on
hardware.
8. Requires more RAM. Requires less RAM.
9 Examples of RISC chips
include SPARC, POWER PC.
Examples of CISC include Intel architecture,
AMD.
IEEE SľANDARD
•The Institute of Electrical and Electronics Engineers
(IEEE) produced standards for the encoding of floating
point representation in 32 and 64 bits, known as IEEE 754
standards. The floating point representation has three
fields:
Sign
Significant digits and
Exponents
What is Floating Point Representation?
Binary numbers can also be expressed in exponential form. The
representation of binary integers in exponential form is known as
floating point representation.
•
The floating point representation divides the number into two
parts: the left side is a signed, fixed-point integer known as a
mantissa, and the right side is the exponent.
•
Floating point representation can also have a sign, with 0
denoting a positive value and 1 denoting a negative value.
•
The IEEE (Institute of Electrical and Electronics Engineers) has
developed a floating point representation standard.
Floating Point Representation Types
The IEEE specifies two types of formats in floating point
representation that are:
Single precision(32-bit)
Double precision(64-bit)
A. SINGLE PRECISION
•The single-precision floating-point representation (also known as FP32 or float32) is a computer
number format that uses a floating radix point to express a wide dynamic range of numeric values.
•The IEEE 754 standard defines a binary32 as having the following characteristics:
 1 bit for sign
 8-bit for exponent
 The precision of significand: 24 bits (23 explicitly stored)
•The structure of single precision floating point representation is as follows:
Exponent calculation
E’ = E+127
A. DOUBLE PRECISION
•The double precision floating point representation (also known as FP64 or
float64) is a computer number format that uses a floating radix point to
express a wide dynamic range of numeric values.
•The IEEE 754 standard defines a binary64 as having the following
characteristics:
 1 bit for sign
 11-bit for exponent
 The precision of significand: 53 bits (52 explicitly stored)
The structure of double precision floating point representation is as follows:
Exponent calculation
E’ = E+1023
Data transfer and data manipulation & floating point.pptx
Data transfer and data manipulation & floating point.pptx
Data transfer and data manipulation & floating point.pptx

Data transfer and data manipulation & floating point.pptx

  • 1.
    DATA TRANSFER ANDDATA MANIPULATION
  • 2.
    Most computer instructionscan be classified into three categories: 1) Data transfer 2) Data manipulation 3) Program control instructions
  • 3.
    • Data transferinstruction cause transfer of data from one location to another. • Data manipulation performs arithmatic, logic and shift operations. Data transfer Data Manipulation
  • 4.
    Typical Data TransferInstruction : : transfer from memory to a processor register, usually an AC (memory read). : transfer from a processor register into memory (memory write). : transfer from one register to another register : swap information between two registers or a register and a memory word : transfer data among processor registers and input/output device : transfer data between processor registers and a memory stack Load Store Move Exchange Push/Pop Input/Output
  • 5.
    MODE ASSEMBLY CONVENTIONREGISTER TRANSFER Direct Address LD ADR ACßM[ADR] Indirect Address LD @ADR ACßM[M[ADR]] Relative Address LD $ADR ACßM[PC+ADR] Immediate Address LD #NBR ACßNBR Index Address LD ADR(X) ACßM[ADR+XR] Register LD R1 ACßR1 Register Indirect LD (R1) ACßM[R1] Autoincrement LD (R1)+ ACßM[R1], R1ßR1+1
  • 6.
    Data Manipulation Instruction 1)Arithmetic 2) Logical and bit manipulation 3) Shift Instruction
  • 7.
  • 8.
    LOGICAL AND BITMANIPULATION INSTRUCTIONS NAME MNEMONIC Clear Complement AND OR Exclusive-OR Clear Carry Set Carry Complement Carry Enable Interrupt Disable Interrupt CLR COM AND OR XOR CLRC SETC COMC EI DI
  • 9.
    SHIFT INSTRUCTIONS NAME MNEMONIC LogicalShift Right Logical Shift left Arithmetic shift right Arithmetic shift left Rotate right Rotate left Rotate right with carry Rotate left with carry SHR SHL SHRA SHLA ROR ROL RORC ROLC
  • 10.
    Program control instructionsprovide decision making capabilities and change the path taken by the program when executed in computer. Program control instructions
  • 11.
     Program Control ProgramControl Instruction : Branch and Jump instructions are used interchangeably to mean the same thing. NAME MNEMONIC Branc h Jump Skip Call Return Compare (by subtraction) Test (by ANDing) BR JMP SKP CALL RET CMP TST
  • 12.
    MICROPROCESSOR  A microprocessoris a processing unit on a single chip. It is an integrated circuit that performs the core functions of a computer CPU. •  It is a multipurpose programmable silicon chip constructed using Metal Oxide Semiconductor (MOS) technology which is clock-driven and register-based. •  It accepts binary data as input and provides output after processing it as per the specification of instructions stored in the memory.
  • 13.
    RISC is theway to make hardware simpler whereas CISC is the single instruction that handles multiple work. RISC  RISC stands for Reduced Instruction Set Computers.  RISC is a microprocessor and as the name indicates, it performs a smaller number of computer instructions.  In the RISC architecture, the instruction set of the computer system is simplified to reduce the execution time.  RISC architecture has a small set of instructions that generally includes register- to-register operations.  The RISC architecture uses comparatively a simple instruction format that is easy to decode.  The instruction length can be fixed and aligned to word boundaries. RISC processors can execute only one instruction per clock cycle.
  • 14.
    Advantages of RISC Simpler instructions: RISC processors use a smaller set of simple instructions, which makes them easier to decode and execute quickly. This results in faster processing times. •  Faster execution: Because RISC processors have a simpler instruction set, they can execute instructions faster than CISC processors. •  Lower power consumption: RISC processors consume less power than CISC processors, making them ideal for portable devices. • • Disadvantages of RISC  More instructions required: RISC processors require more instructions to perform complex tasks than CISC processors. •  Increased memory usage: RISC processors require more memory to store the additional instructions needed to perform complex tasks. •  Higher cost: Developing and manufacturing RISC processors can be more expensive than CISC processors.
  • 15.
    CISC  The CISCarchitecture comprises a complex instruction set. A CISC processor has a variable-length instruction format.  In this processor architecture, the instructions that require register operands can take only two bytes.  In a CISC processor architecture, the instructions which require two memory addresses can take five bytes to comprise the complete instruction code. Therefore, in a CISC processor, the execution of instructions may take a varying number of clock cycles.  The CISC processor also provides direct manipulation of operands that are stored in the memory. • The main motive of CISC is to make compiler development easy and simple
  • 16.
    Advantages of CISC Reduced code size: CISC processors use complex instructions that can perform multiple operations, reducing the amount of code needed to perform a task. •  More memory efficient: Because CISC instructions are more complex, they require fewer instructions to perform complex tasks, which can result in more memory-efficient code. •  Widely used: CISC processors have been in use for a longer time than RISC processors, so they have a larger user base and more available software. Disadvantages of CISC  Slower execution: CISC processors take longer to execute instructions because they have more complex instructions and need more time to decode them. •  More complex design: CISC processors have more complex instruction sets, which makes them more difficult to design and manufacture. •  Higher power consumption: CISC processors consume more power than RISC processors because of their more complex instruction sets.
  • 17.
    S.No. RISC CISC 1.RISC is a reduced instruction set. CISC is a complex instruction set. 2. The number of instructions is less as compared to CISC. The number of instructions is more as compared to RISC. 3. The addressing modes are less. The addressing modes are more. 4. It works in a fixed instruction format. It works in a variable instruction format. 5. The RISC consumes low power. The CISC consumes high power. 6. The RISC processors are highly pipelined. The CISC processors are less pipelined. 7. It optimizes the performance by focusing on software. It optimizes the performance by focusing on hardware. 8. Requires more RAM. Requires less RAM. 9 Examples of RISC chips include SPARC, POWER PC. Examples of CISC include Intel architecture, AMD.
  • 18.
    IEEE SľANDARD •The Instituteof Electrical and Electronics Engineers (IEEE) produced standards for the encoding of floating point representation in 32 and 64 bits, known as IEEE 754 standards. The floating point representation has three fields: Sign Significant digits and Exponents
  • 19.
    What is FloatingPoint Representation? Binary numbers can also be expressed in exponential form. The representation of binary integers in exponential form is known as floating point representation. • The floating point representation divides the number into two parts: the left side is a signed, fixed-point integer known as a mantissa, and the right side is the exponent. • Floating point representation can also have a sign, with 0 denoting a positive value and 1 denoting a negative value. • The IEEE (Institute of Electrical and Electronics Engineers) has developed a floating point representation standard.
  • 20.
    Floating Point RepresentationTypes The IEEE specifies two types of formats in floating point representation that are: Single precision(32-bit) Double precision(64-bit)
  • 21.
    A. SINGLE PRECISION •Thesingle-precision floating-point representation (also known as FP32 or float32) is a computer number format that uses a floating radix point to express a wide dynamic range of numeric values. •The IEEE 754 standard defines a binary32 as having the following characteristics:  1 bit for sign  8-bit for exponent  The precision of significand: 24 bits (23 explicitly stored) •The structure of single precision floating point representation is as follows: Exponent calculation E’ = E+127
  • 22.
    A. DOUBLE PRECISION •Thedouble precision floating point representation (also known as FP64 or float64) is a computer number format that uses a floating radix point to express a wide dynamic range of numeric values. •The IEEE 754 standard defines a binary64 as having the following characteristics:  1 bit for sign  11-bit for exponent  The precision of significand: 53 bits (52 explicitly stored) The structure of double precision floating point representation is as follows: Exponent calculation E’ = E+1023