The document provides information on various arithmetic and logical instructions used in x86 assembly language. It describes instructions for addition, subtraction, comparison, negation and more. It also covers logical instructions for AND, OR, XOR, NOT, shift and rotate operations. Examples are given to demonstrate how instructions work and how they affect registers and flags.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
This document summarizes various arithmetic and logic instructions in x86 assembly language. It discusses increment, decrement, negation, comparison, addition, subtraction, multiplication, division, logical, shift, and rotate instructions. Examples are provided to illustrate how each instruction works and its effect on flags. Application examples also demonstrate how these instructions can be used to input and output decimal numbers.
This presentation discusses logic and shift/rotate instructions in assembly language. It defines logic instructions like AND, OR, XOR and NOT and shows their truth tables. It explains how to use masks with these instructions to modify selective bits. It also covers shift/rotate instructions like SHL, SHR, ROL and ROR and how they manipulate bits by shifting them left or right in different ways. Examples are given to demonstrate how to use these instructions to clear, set or toggle bits using masks, as well as how shift/rotate instructions modify registers and flags.
This document provides an overview of assembly language programming on the 8086 processor. It includes examples of assembly code using MOV, MUL, and other instructions. It then summarizes various 8086 instruction types like data transfer, arithmetic, logical, and control flow instructions. For each type, it lists some common instructions and provides brief descriptions and examples.
Shift and Rotate Instructions
Shift and Rotate Applications
Multiplication and Division Instructions
Extended Addition and Subtraction
ASCII and Packed Decimal Arithmetic
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
This document summarizes various arithmetic and logic instructions in x86 assembly language. It discusses increment, decrement, negation, comparison, addition, subtraction, multiplication, division, logical, shift, and rotate instructions. Examples are provided to illustrate how each instruction works and its effect on flags. Application examples also demonstrate how these instructions can be used to input and output decimal numbers.
This presentation discusses logic and shift/rotate instructions in assembly language. It defines logic instructions like AND, OR, XOR and NOT and shows their truth tables. It explains how to use masks with these instructions to modify selective bits. It also covers shift/rotate instructions like SHL, SHR, ROL and ROR and how they manipulate bits by shifting them left or right in different ways. Examples are given to demonstrate how to use these instructions to clear, set or toggle bits using masks, as well as how shift/rotate instructions modify registers and flags.
This document provides an overview of assembly language programming on the 8086 processor. It includes examples of assembly code using MOV, MUL, and other instructions. It then summarizes various 8086 instruction types like data transfer, arithmetic, logical, and control flow instructions. For each type, it lists some common instructions and provides brief descriptions and examples.
Shift and Rotate Instructions
Shift and Rotate Applications
Multiplication and Division Instructions
Extended Addition and Subtraction
ASCII and Packed Decimal Arithmetic
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
Logical Instructions used in 8086 microprocessorRabin BK
It contains all the types of instruction required for performing logical operation in 8086 microprocessor. It is useful from the examination point of view as well.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document discusses the instruction set of the 8086 microprocessor. It is divided into 7 sections that cover: 1) data transfer instructions like MOV, IN, OUT, PUSH, and POP; 2) arithmetic/logical instructions; 3) branch instructions; 4) shift and rotate instructions; 5) string manipulation instructions; 6) flag manipulation and processor control instructions; and 7) machine control instructions. Examples are provided for each type of instruction to illustrate their operation and effect on registers or memory locations.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
Logical instructions in assembly language for 8086 processor. Instructions covered are AND, OR, XOR, NOT and Test instruction. Effect on flags is discussed.
The document discusses the instruction set of the 8086 microprocessor. It describes the different types of instructions including data transfer, arithmetic, logic, shift/rotate, branch, loop, and string instructions. It provides details on common instructions like MOV, ADD, SUB, MUL, DIV, CMP, INC, DEC, NEG, CBW and CWD. Examples of assembly language programs are given to perform operations like addition, subtraction, multiplication, division, comparison etc. of 8-bit, 16-bit and 32-bit numbers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document summarizes data transfer and arithmetic instructions for the 8086 instruction set. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC and DAA. For each instruction, it provides details on the operation, operands, flags affected and examples of usage. It also explains considerations when using different data types as operands for instructions.
The 8086 instruction set consists of the following instructions: Data Transfer Instructions move, copy, load, exchange, input, and output. Arithmetic Instructions add, subtract, increment, decrement, convert byte/word and compare. Logical Instructions AND, OR, exclusive OR, shift/rotate and test
The 8086 instruction set includes 8 categories of instructions: data transfer, arithmetic, branch, loop, machine control, flag manipulation, shift/rotate, and string instructions. Some key instructions include MOV for data transfer, PUSH/POP for stack operations, ADD/SUB for arithmetic, JMP for branching, LOOP for looping, and SHIFT/ROTATE for bitwise operations.
The document discusses the instruction set of the 8085 microprocessor. It contains 13 categories of instructions - data transfer, arithmetic, logical, branching, and control instructions. The data transfer instructions include MOV, MVI, LDA, STA, etc. The arithmetic instructions perform operations like addition, subtraction, increment, decrement. Some examples of instructions and their operations are provided.
The document describes the instruction set of the 8085 microprocessor. It includes 3 main categories of instructions: data transfer instructions, arithmetic instructions, and branching/logical instructions. Some key instructions are MOV to move data, ADD/SUB for arithmetic, JMP/CALL for branching, and AND/OR/XOR for logical operations. The instructions operate on registers or memory using operands like register names or memory addresses.
The document describes several data transfer and arithmetic instructions for the 8086 processor. The MOV instruction copies data between registers and memory locations. The XCHG instruction exchanges the contents of two registers or a register and memory. The ADD, SUB, MUL, and DIV instructions perform arithmetic operations on operands in registers or memory, with results stored in registers. Flags are set to indicate conditions like carry, overflow, or zero results.
The 8085 microprocessor has a 8-bit instruction set containing 246 instructions. The instructions are classified into different types such as data transfer, arithmetic, logical, branching, and control instructions. Data transfer instructions move data between registers and memory. Arithmetic instructions perform operations like addition, subtraction, increment, and decrement. Logical instructions perform AND, OR, XOR, compare, and rotate operations. Branching instructions alter the program flow. Control instructions control the operation of the microprocessor.
The document discusses the various types of instructions in the 8086 microprocessor, including:
1) Data transfer instructions such as MOV, PUSH, and POP for moving data between registers and memory.
2) Arithmetic instructions like ADD, SUB, MUL, and DIV for mathematical operations.
3) Bit manipulation and logic instructions including AND, OR, XOR, and shift instructions.
4) Program flow control instructions like CALL, RET, JMP, and conditional jumps.
5) String instructions for comparing and moving blocks of data efficiently.
6) Processor control instructions that set processor modes and flags.
The document provides an overview of the instruction set of the 8085 microprocessor. It is divided into 5 categories: data transfer group, arithmetic group, logic group, branch group, and stack, I/O and machine control group. Each category contains several instructions and examples are given to illustrate how each instruction works by showing the initial and final register values and flags affected. The document aims to explain the various instructions that the 8085 microprocessor can execute.
The document discusses the instruction set of x86 processors. It describes different types of instructions like data transfer, arithmetic, control flow and flag instructions. It provides examples of using MOV, ADD, SUB, CMP and other instructions. It explains concepts like immediate and memory operands, registers, flags, loops and conditional jumps. Key points covered are data transfer using MOV, arithmetic using ADD, SUB, INC, DEC, MUL, DIV, comparison using CMP, and flow control using LOOP, JCXZ and other jump instructions.
The instruction set of the 8085 microprocessor contains 246 instructions that are classified into different types such as data transfer, arithmetic, logical, branching, and control instructions. Data transfer instructions move data between registers and memory locations. Arithmetic instructions perform operations like addition, subtraction, increment, and decrement. Logical instructions perform logical operations like AND, OR, XOR on registers and memory.
Addressing mode and instruction set using 8051logesh waran
Here are the key steps for programming timer 0 in mode 2:
1. Select mode 2 for timer 0 by writing to the TMOD register:
MOV TMOD,#02h
2. Write the initial count value to TH0:
MOV TH0,#0FCh
3. Clear the timer flag TF0:
CLR TF0
4. Start the timer by setting TR0:
SETB TR0
5. The timer will now count down from the value in TH0 (0FCh) to 0 in TL0.
6. When TL0 underflows to 0, TF0 will be set.
7. Check TF0 to detect overflow:
This document summarizes various arithmetic, logic, and shift instructions in x86 assembly language.
It describes increment, decrement, negation, comparison, addition, subtraction, multiplication, division, and logic instructions. It provides syntax examples and explains how they affect flags and can be used for tasks like inputting and outputting decimal numbers.
Shift instructions like logical and arithmetic shifts are covered, along with how they can perform multiplication and division via left and right shifts. Rotate instructions are also introduced. Application examples show how instructions can be combined to perform operations like converting between ASCII and binary representations.
This document provides information about various data transfer and manipulation instructions in assembly language. It describes instructions for pushing/popping operands onto/from the stack, transferring data between registers and I/O ports, loading effective addresses, and copying flag register values. It also covers arithmetic, bitwise, string, looping, interrupt, and other instructions for performing operations at the byte, word, and double word level.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
Logical Instructions used in 8086 microprocessorRabin BK
It contains all the types of instruction required for performing logical operation in 8086 microprocessor. It is useful from the examination point of view as well.
instruction set of 8086 microprocessor has following categories:
-Data transfer instructions
-Arithmetic instructions
-Logical instructions
-Flag manipulation instructions
-shift and rotate instructions
-String instructions
-8086 assembler directives
The document discusses the instruction set of the 8086 microprocessor. It is divided into 7 sections that cover: 1) data transfer instructions like MOV, IN, OUT, PUSH, and POP; 2) arithmetic/logical instructions; 3) branch instructions; 4) shift and rotate instructions; 5) string manipulation instructions; 6) flag manipulation and processor control instructions; and 7) machine control instructions. Examples are provided for each type of instruction to illustrate their operation and effect on registers or memory locations.
The instruction set of the 8086 microprocessor can be classified into several groups, including data transfer instructions, arithmetic instructions, and processor control instructions. The data transfer instructions include general purpose instructions to move bytes or words between registers and memory locations. Common instructions are MOV, PUSH, POP, and XCHG. The arithmetic instructions perform operations like addition, subtraction, and comparison and affect the processor's flags. Common instructions are ADD, SUB, INC, and CMP. The 8086 instruction set also includes instructions for bit manipulation, string operations, and transferring program execution.
Logical instructions in assembly language for 8086 processor. Instructions covered are AND, OR, XOR, NOT and Test instruction. Effect on flags is discussed.
The document discusses the instruction set of the 8086 microprocessor. It describes the different types of instructions including data transfer, arithmetic, logic, shift/rotate, branch, loop, and string instructions. It provides details on common instructions like MOV, ADD, SUB, MUL, DIV, CMP, INC, DEC, NEG, CBW and CWD. Examples of assembly language programs are given to perform operations like addition, subtraction, multiplication, division, comparison etc. of 8-bit, 16-bit and 32-bit numbers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document summarizes data transfer and arithmetic instructions for the 8086 instruction set. It describes instructions such as MOV, XCHG, LEA, LDS, LES, ADD, SUB, MUL, DIV, INC, DEC and DAA. For each instruction, it provides details on the operation, operands, flags affected and examples of usage. It also explains considerations when using different data types as operands for instructions.
The 8086 instruction set consists of the following instructions: Data Transfer Instructions move, copy, load, exchange, input, and output. Arithmetic Instructions add, subtract, increment, decrement, convert byte/word and compare. Logical Instructions AND, OR, exclusive OR, shift/rotate and test
The 8086 instruction set includes 8 categories of instructions: data transfer, arithmetic, branch, loop, machine control, flag manipulation, shift/rotate, and string instructions. Some key instructions include MOV for data transfer, PUSH/POP for stack operations, ADD/SUB for arithmetic, JMP for branching, LOOP for looping, and SHIFT/ROTATE for bitwise operations.
The document discusses the instruction set of the 8085 microprocessor. It contains 13 categories of instructions - data transfer, arithmetic, logical, branching, and control instructions. The data transfer instructions include MOV, MVI, LDA, STA, etc. The arithmetic instructions perform operations like addition, subtraction, increment, decrement. Some examples of instructions and their operations are provided.
The document describes the instruction set of the 8085 microprocessor. It includes 3 main categories of instructions: data transfer instructions, arithmetic instructions, and branching/logical instructions. Some key instructions are MOV to move data, ADD/SUB for arithmetic, JMP/CALL for branching, and AND/OR/XOR for logical operations. The instructions operate on registers or memory using operands like register names or memory addresses.
The document describes several data transfer and arithmetic instructions for the 8086 processor. The MOV instruction copies data between registers and memory locations. The XCHG instruction exchanges the contents of two registers or a register and memory. The ADD, SUB, MUL, and DIV instructions perform arithmetic operations on operands in registers or memory, with results stored in registers. Flags are set to indicate conditions like carry, overflow, or zero results.
The 8085 microprocessor has a 8-bit instruction set containing 246 instructions. The instructions are classified into different types such as data transfer, arithmetic, logical, branching, and control instructions. Data transfer instructions move data between registers and memory. Arithmetic instructions perform operations like addition, subtraction, increment, and decrement. Logical instructions perform AND, OR, XOR, compare, and rotate operations. Branching instructions alter the program flow. Control instructions control the operation of the microprocessor.
The document discusses the various types of instructions in the 8086 microprocessor, including:
1) Data transfer instructions such as MOV, PUSH, and POP for moving data between registers and memory.
2) Arithmetic instructions like ADD, SUB, MUL, and DIV for mathematical operations.
3) Bit manipulation and logic instructions including AND, OR, XOR, and shift instructions.
4) Program flow control instructions like CALL, RET, JMP, and conditional jumps.
5) String instructions for comparing and moving blocks of data efficiently.
6) Processor control instructions that set processor modes and flags.
The document provides an overview of the instruction set of the 8085 microprocessor. It is divided into 5 categories: data transfer group, arithmetic group, logic group, branch group, and stack, I/O and machine control group. Each category contains several instructions and examples are given to illustrate how each instruction works by showing the initial and final register values and flags affected. The document aims to explain the various instructions that the 8085 microprocessor can execute.
The document discusses the instruction set of x86 processors. It describes different types of instructions like data transfer, arithmetic, control flow and flag instructions. It provides examples of using MOV, ADD, SUB, CMP and other instructions. It explains concepts like immediate and memory operands, registers, flags, loops and conditional jumps. Key points covered are data transfer using MOV, arithmetic using ADD, SUB, INC, DEC, MUL, DIV, comparison using CMP, and flow control using LOOP, JCXZ and other jump instructions.
The instruction set of the 8085 microprocessor contains 246 instructions that are classified into different types such as data transfer, arithmetic, logical, branching, and control instructions. Data transfer instructions move data between registers and memory locations. Arithmetic instructions perform operations like addition, subtraction, increment, and decrement. Logical instructions perform logical operations like AND, OR, XOR on registers and memory.
Addressing mode and instruction set using 8051logesh waran
Here are the key steps for programming timer 0 in mode 2:
1. Select mode 2 for timer 0 by writing to the TMOD register:
MOV TMOD,#02h
2. Write the initial count value to TH0:
MOV TH0,#0FCh
3. Clear the timer flag TF0:
CLR TF0
4. Start the timer by setting TR0:
SETB TR0
5. The timer will now count down from the value in TH0 (0FCh) to 0 in TL0.
6. When TL0 underflows to 0, TF0 will be set.
7. Check TF0 to detect overflow:
This document summarizes various arithmetic, logic, and shift instructions in x86 assembly language.
It describes increment, decrement, negation, comparison, addition, subtraction, multiplication, division, and logic instructions. It provides syntax examples and explains how they affect flags and can be used for tasks like inputting and outputting decimal numbers.
Shift instructions like logical and arithmetic shifts are covered, along with how they can perform multiplication and division via left and right shifts. Rotate instructions are also introduced. Application examples show how instructions can be combined to perform operations like converting between ASCII and binary representations.
This document provides information about various data transfer and manipulation instructions in assembly language. It describes instructions for pushing/popping operands onto/from the stack, transferring data between registers and I/O ports, loading effective addresses, and copying flag register values. It also covers arithmetic, bitwise, string, looping, interrupt, and other instructions for performing operations at the byte, word, and double word level.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document provides information about the instruction sets of the 8086 microprocessor. It defines what an instruction set is and describes the different instruction formats used by the 8086. The main types of 8086 instructions are then outlined, including data transfer instructions, arithmetic instructions, bit manipulation instructions, branch instructions, and others. Specific instructions like MOV, ADD, SUB, and MUL are explained through examples of their syntax and operation.
The document describes the 8 addressing modes of the 8086 microprocessor. These are: 1) Immediate, where the operand is specified in the instruction itself. 2) Register, where operands are registers. 3) Direct memory, using a segment and offset address. 4) Register indirect, using a base register address. 5) Register relative, using a base register and displacement. 6) Base indexed, using a base and index register. 7) Relative indexed, using a base, index, and displacement. 8) Implied, where operands are implied and not specified.
Types of instructions can be categorized into data transfer, arithmetic, and logical/program control instructions. Data transfer instructions like MOV copy data between registers and memory. Arithmetic instructions include INC/DEC to increment/decrement values, ADD/SUB for addition/subtraction, and MUL/DIV for multiplication/division. Logical instructions perform bitwise operations while program control instructions manage program flow.
The document discusses different addressing modes used in microprocessors, including the 8086. It describes five main addressing modes: immediate, register, direct, register indirect, and implicit. Immediate addressing uses data contained in the instruction itself. Register addressing uses operands in registers. Direct addressing directly specifies a memory location. Register indirect addressing uses a memory location pointed to by a register pair. Implicit addressing hides the operand in the instruction. The document provides examples of instructions that use each addressing mode.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
The document describes various arithmetic instructions in the Intel 8086 microprocessor, including ADD, SUB, MUL, DIV, INC, DEC, CMP, NEG, CBW, CWD, AAA, and DAA. It provides details on the syntax, operation, examples and effects on flags for each instruction. A total of 20 arithmetic instructions are discussed that perform operations like addition, subtraction, multiplication, division, incrementing, decrementing and adjusting results.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
The document describes the instruction set of the 8085 microprocessor. It is divided into 5 categories: data transfer instructions, arithmetic instructions, logical instructions, branching instructions, and control instructions. The data transfer instructions include MOV, MVI, LDA, STA, etc. to move data between registers and memory. The arithmetic instructions perform operations like addition, subtraction, increment, decrement. The logical instructions include AND, OR, XOR logical operations.
The document discusses various assembly language instructions including shift, rotate, multiplication, division, and binary search. It provides examples and explanations of instructions like SHL, SHR, SAL, SAR, ROL, ROR, MUL, DIV, and binary search algorithms. The agenda includes demonstrating these instructions through hands-on exercises and discussing how to write an assembly program to check if a number is prime and calculate xy through repetitive multiplication.
The document discusses different addressing modes of the 80286 microprocessor including:
- Register addressing which uses 8-bit and 16-bit registers to specify locations.
- Immediate addressing where data immediately follows the opcode in memory as a constant.
- Direct addressing which transfers data between memory and registers using a memory offset.
- Indirect addressing which uses registers like BP, BX, DI and SI to hold memory offsets.
- Base-plus-index addressing which uses a base register and index register sum to indirectly address memory arrays.
- Base relative-plus-index which is a complex mode adding displacements to base and index registers to form a memory offset.
The document discusses various logical and arithmetic operations in 8051 assembly language. It describes different types of instructions including data transfer, program branching, logical and arithmetic. Logical instructions include byte-level and bit-level logical operations like AND, OR, XOR. Arithmetic instructions cover operations like addition, subtraction, multiplication and division. Examples are provided to illustrate how these instructions work and how they affect the flag register.
This document provides information on 8088 microprocessor instruction set. It discusses:
1) The basic components of a program including instructions and machine code.
2) Examples of instruction formats and operations for data transfer, arithmetic, logical, and shift instructions.
3) Details on multiplication and division instructions including examples of multiplying and dividing operations.
4) Key benefits of assembly language such as taking up less memory and executing faster than high-level languages.
The document describes an 8085 microprocessor system and trainer kit. It includes:
- An 8-bit 8085 microprocessor as the CPU.
- Up to 64KB of RAM and 8KB of EPROM memory.
- A 16-bit timer, 8255 I/O ports, and RS-232 interface.
- A keyboard, 7-segment LED display, and connectors for inputs/outputs.
This document discusses various addressing modes of the 8086 microprocessor. It defines addressing modes as how operands are specified in an instruction. There are 8 main addressing modes - immediate, direct, register, register indirect, indexed, register relative, based indexed, and relative based indexed. Each mode is explained with examples of how operand values are accessed from memory or registers to perform operations. The document also discusses intrasegment and intersegment addressing modes which specify if the source and destination locations are within the same memory segment or different segments.
The document discusses the 8086 microprocessor and assembly language programming. It covers the 8086 block diagram and registers, memory models, instruction set, addressing modes, procedures, example programs, peripheral devices, and assembly code examples. It provides details on data types, arithmetic and logic instructions, comparisons and jumps, macros, procedures, interrupts, and interfacing assembly with high-level languages. The document is intended as reference material for learning 8086 assembly programming.
Chances are you have a Wi-Fi network at home, or live close to one (or more) that tantalizingly pops up in a list whenever you boot up the laptop.
The problem is, if there's a lock next to the network name (AKA the SSID, or service set identifier), that indicates security is activated. Without the password or passphrase, you're not going to get access to that network, or the sweet, sweet internet that goes with it.
A distributed denial-of-service (DDoS) attack is a malicious attempt to disrupt normal traffic of a targeted server, service or network by overwhelming the target or its surrounding infrastructure with a flood of Internet traffic. DDoS attacks achieve effectiveness by utilizing multiple compromised computer systems as sources of attack traffic. Exploited machines can include computers and other networked resources such as IoT devices. From a high level, a DDoS attack is like a traffic jam clogging up with highway, preventing regular traffic from arriving at its desired destination.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
There are two methods for interfacing memory and I/O devices with a microprocessor: I/O mapped I/O and memory mapped I/O. I/O mapped I/O treats I/O devices and memory separately, while memory mapped I/O treats I/O devices as memory. I/O mapped I/O can use either 8 or 16 address lines, allowing connection of up to 256 fixed I/O devices or 65,536 variable I/O devices. Specific instructions like IN, OUT, and MOV are used to access I/O ports depending on whether it is fixed or variable addressing.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
This document discusses procedures, macros, and stack operations in assembly language. It explains that procedures allow repetitive code to be written once and called multiple times to save memory. Procedures use stack operations to push return addresses and data onto the stack. Macros simplify programming by reducing repetitive code. Procedures are called at runtime, while macro calls are replaced with their body at assembly time.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together.
Procedures and macros allow code to be reused in assembly language programs. Procedures are subroutines that are called using CALL and RET instructions. Macros allow short, repetitive code sequences to be defined once and reused by replacing the macro call with its body code. Some key differences are that procedures occupy less memory than macros since macro code is generated each time, while procedures' code is only stored once. Procedures are accessed using CALL while macros are accessed by name.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
This document describes the Jcc family of conditional jump instructions in x86 assembly language. It provides the instruction name, description of the condition tested, and any alternative mnemonics or opposite instructions. The instructions test various CPU flags like carry, zero, sign, overflow, parity, and compare values based on signed or unsigned arithmetic.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
A microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second. [1]
Microprocessors were invented in the 1970s for use in embedded systems. The majority are still used that way, in such things as mobile phones, cars, military weapons, and home appliances. Some microprocessors are microcontrollers, so small and inexpensive that they are used to control very simple products like flashlights and greeting cards that play music when you open them. A few especially powerful microprocessors are used in personal computers.
Using recycled concrete aggregates (RCA) for pavements is crucial to achieving sustainability. Implementing RCA for new pavement can minimize carbon footprint, conserve natural resources, reduce harmful emissions, and lower life cycle costs. Compared to natural aggregate (NA), RCA pavement has fewer comprehensive studies and sustainability assessments.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELgerogepatton
As digital technology becomes more deeply embedded in power systems, protecting the communication
networks of Smart Grids (SG) has emerged as a critical concern. Distributed Network Protocol 3 (DNP3)
represents a multi-tiered application layer protocol extensively utilized in Supervisory Control and Data
Acquisition (SCADA)-based smart grids to facilitate real-time data gathering and control functionalities.
Robust Intrusion Detection Systems (IDS) are necessary for early threat detection and mitigation because
of the interconnection of these networks, which makes them vulnerable to a variety of cyberattacks. To
solve this issue, this paper develops a hybrid Deep Learning (DL) model specifically designed for intrusion
detection in smart grids. The proposed approach is a combination of the Convolutional Neural Network
(CNN) and the Long-Short-Term Memory algorithms (LSTM). We employed a recent intrusion detection
dataset (DNP3), which focuses on unauthorized commands and Denial of Service (DoS) cyberattacks, to
train and test our model. The results of our experiments show that our CNN-LSTM method is much better
at finding smart grid intrusions than other deep learning algorithms used for classification. In addition,
our proposed approach improves accuracy, precision, recall, and F1 score, achieving a high detection
accuracy rate of 99.50%.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Understanding Inductive Bias in Machine LearningSUTEJAS
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Low power architecture of logic gates using adiabatic techniquesnooriasukmaningtyas
The growing significance of portable systems to limit power consumption in ultra-large-scale-integration chips of very high density, has recently led to rapid and inventive progresses in low-power design. The most effective technique is adiabatic logic circuit design in energy-efficient hardware. This paper presents two adiabatic approaches for the design of low power circuits, modified positive feedback adiabatic logic (modified PFAL) and the other is direct current diode based positive feedback adiabatic logic (DC-DB PFAL). Logic gates are the preliminary components in any digital circuit design. By improving the performance of basic gates, one can improvise the whole system performance. In this paper proposed circuit design of the low power architecture of OR/NOR, AND/NAND, and XOR/XNOR gates are presented using the said approaches and their results are analyzed for powerdissipation, delay, power-delay-product and rise time and compared with the other adiabatic techniques along with the conventional complementary metal oxide semiconductor (CMOS) designs reported in the literature. It has been found that the designs with DC-DB PFAL technique outperform with the percentage improvement of 65% for NOR gate and 7% for NAND gate and 34% for XNOR gate over the modified PFAL techniques at 10 MHz respectively.
Advanced control scheme of doubly fed induction generator for wind turbine us...IJECEIAES
This paper describes a speed control device for generating electrical energy on an electricity network based on the doubly fed induction generator (DFIG) used for wind power conversion systems. At first, a double-fed induction generator model was constructed. A control law is formulated to govern the flow of energy between the stator of a DFIG and the energy network using three types of controllers: proportional integral (PI), sliding mode controller (SMC) and second order sliding mode controller (SOSMC). Their different results in terms of power reference tracking, reaction to unexpected speed fluctuations, sensitivity to perturbations, and resilience against machine parameter alterations are compared. MATLAB/Simulink was used to conduct the simulations for the preceding study. Multiple simulations have shown very satisfying results, and the investigations demonstrate the efficacy and power-enhancing capabilities of the suggested control system.
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
Chap3 8086 logical
1. Summary of Arithmetic Instructions
–ADD D,S
–ADC D,S
–SUB D,S
–SBB D,S
–CMP D,S
–NEG D
–DAA
–DAS
2. Summary of Arithmetic Instructions
– AAA
– AAS
– AAM
– AAD
– INC D
– DEC D
– DIV S
– IDIV S
– MUL S
– IMUL S
– CBW
– CWD
3. Logical Instructions
–These are the instructions used for basic
logic operations such as AND, OR, NOT and
XOR.
–These are also used for carrying out bit by
bit operations such as shift (SHR,SHL) or
rotate (ROL,ROR,RCR,RCL).
– One more Instruction under this category is
TEST instruction.
4. AND (Logical AND)
Syntax :-- AND destination, source
• This instruction is used to bit by bit AND the
contents of source to the destination.
•The result is stored in the destination.
•The source operand can be a immediate, a
register or a memory location.
•The destination can be a register or a memory
location, but not an immediate data.
•Both operands cannot be immediate data or
memory location.
•Flags affected : OF = 0 ,CF = 0 , AF is undefined.
• And other flags (SF, ZF, PF) are affected based on
the AND operation.
5. • Operation Performed :--
• Destination Destination AND source
• Examples :--
1. AND BH,CL ;AND byte in CL with Byte in BH,
result in BH.
2. AND BX,00FFH ;AND word in BX with immediate
data 00ffH
3. AND [5000H], DX ;AND word in DX with a
word in memory with offset
5000 in DS.
AND (Logical AND) contd..
6. Numeric Example
If AX = 3F0F,
After Instruction,
AND AX,9078H ; AX AX AND 9078H
;AX 3F0F AND 9078
3F0F 0011 1111 0000 1111
AND
9078 1001 0000 0111 1000
-------------------------------------
= 0001 0000 0000 1000
1008H in AX register
7. OR (Logical OR)
Syntax :-- OR destination, source
• This instruction is used to bit by bit OR the
contents of source to the destination.
•The result is stored in the destination.
•The source operand can be a immediate, a
register or a memory location.
•The destination can be a register or a memory
location, but not an immediate data.
•Both operands cannot be immediate data or
memory location.
•Flags affected : OF = 0 ,CF = 0 , AF is undefined.
• And other flags (SF, ZF, PF) are affected based on
the OR operation.
8. • Operation Performed :--
• Destination Destination OR source
• Examples :--
1. OR BH,CL ;OR byte in CL with Byte in BH,
result in BH.
2. OR BX,00FFH ;OR word in BX with immediate
data 00ffH
3. OR [5000H], DX ; OR word in DX with a
word in memory with offset
5000 in DS.
OR (Logical OR) contd..
9. Numeric Example
If AX = 3F0F,
After Instruction,
OR AX,9078H ; AX AX OR 9078H
;AX 3F0F OR 9078
3F0F 0011 1111 0000 1111
OR
9078 1001 0000 0111 1000
-------------------------------------
= 1011 1111 0111 1111
BF7FH in AX register
10. XOR (Logical XOR)
Syntax :-- XOR destination, source
• This instruction is used to bit by bit XOR the
contents of source to the destination.
•The result is stored in the destination.
•The source operand can be a immediate, a
register or a memory location.
•The destination can be a register or a memory
location, but not an immediate data.
•Both operands cannot be immediate data or
memory location.
•Flags affected : OF = 0 ,CF = 0 , AF is undefined.
• And other flags (SF, ZF, PF) are affected based on
the XOR operation.
11. • Operation Performed :--
• Destination Destination XOR source
• Examples :--
1. XOR BH,CL ;XOR byte in CL with Byte in BH,
result in BH.
2. XOR BX,00FFH ;XOR word in BX with immediate
data 00ffH
3. XOR [5000H], DX ; XOR word in DX with a
word in memory with offset
5000 in DS.
XOR (Logical XOR) contd..
13. NOT (Logical Invert )
Syntax :-- NOT destination
• This instruction complements (inverts) each
bit of the byte or word stored in the
destination.
•The result is stored in the destination.
•The destination can be a register or a memory
location.
•No Flags affected
14. • Operation Performed :--
• Destination NOT Destination
• Examples :--
1. NOT BH ;Complement byte in BH, result in BH.
2. NOT BX ; Complement word in BX, result in BX.
3. NOT BYTE PTR [5000H] ; Complement byte
in memory with offset 5000 in DS.
NOT (Logical Invert ) contd..
15. Numeric Example
If AX = 3F0F,
After Instruction,
NOT AX ; AX NOT AX
;AX NOT 3F0F
3F0F 0011 1111 0000 1111
Complement
-------------------------------------
= 1100 0000 1111 0000
C0F0H in AX register
16. TEST (Logical compare )
Syntax :-- TEST destination, source
• This instruction is used to bit by bit AND the
contents of source to the destination.
•The result is not stored in the destination.
•The source operand can be a immediate, a
register or a memory location.
•The destination can be a register or a memory
location, but not an immediate data.
•Both operands cannot be immediate data or
memory location.
•Flags affected : OF = 0 ,CF = 0 , SF, ZF, PF.
•TEST instruction is used to set flags before a
conditional jump instruction
17. • Operation Performed :--
– Flags set result of Destination AND source
• Examples :--
1. TEST BH,CL ;AND byte in CL with Byte in BH,
no result but flags are affected.
2. TEST BX,00FFH ;AND word in BX with immediate
data 00ffH, no result but flags are
affected.
3. TEST DX, [5000H];AND word in DX with a word in
memory with offset 5000 in DS,
no result but flags are affected.
TEST (Logical Compare) contd..
18. SHL / SAL (Shift Logical/Arithmetic Left)
Syntax :-- SHL/SAL destination, count
• SHL & SAL are the opcodes for the same
operation
•This instruction shifts the destination bit by bit to
the left and insert zeroes in the newly introduced
least significant bits.
•The shift operation is through carry.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF, SF, ZF, PF.
•These instructions can be used to multiply an
unsigned number by power of 2.
19. CF BX
0
0
1
CF BX
• Operation Performed :--
–CF MSB ------------------ LSB 0
• Example :--
– If CF = 0, BX = E6D3H
– After SAL BX, 1 ; Shift the contents of BX
register by one towards left
SHL / SAL (Shift Logical/Arithmetic Left)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
1 1 0 0 1 1 0 1 1 0 1 0 0 1 1 0
BX = CDA6
20. • Example :--
• Use of SHL instruction for Multiplication:-
– If CF = 0, BH = 04H
– MOV CL, 03 ; Load CL register for
the count
– SHL BH, CL ; Shift the contents
of BX register by one
towards left
– BH = 20H (32D) [ 04 * 23 = 32 D]
– Note :-- SHL can be used to multiply a number
with powers of 2.
SHL / SAL (Shift Logical/Arithmetic Left)Cntd..
22. SAR (Shift Arithmetic Right )
Syntax :-- SAR destination, count
• This instruction shifts the destination bit by bit to
the right and MSB position is kept in the old MSB
position
•The shift operation is through carry, LSB is shifted
to CF.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF, SF, ZF, PF.
•This instruction can be used to divide an unsigned
number by power of 2.
23. BX CF
0
1
BX CF
1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1
• Operation Performed :--
– MSB ----------------- LSB CF
• Example :--
– If CF = 0, BX = E6D3H
– After SAR BX, 1 ; Shift the contents of BX
register by one towards right
SAR (Shift Arithmetic Right)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = F369H
24. • Example :--
• Use of SAR instruction for Division:-
– If CF = 0, BH = 14H
– MOV CL, 02 ; Load CL register for the
count
– SAR BH, CL ; Shift the contents
of BX register by one
towards right
– BH = 05H (20D) [ 20 / 22 = 05D]
– Note :-- SAR can be used to divide a number with
powers of 2 and get the quotient.
SAR (Shift Arithmetic Right )Cntd..
26. SHR (Shift Logical Right)
Syntax :-- SHR destination, count
•This instruction shifts the destination bit by
bit to the right and insert zeroes in the newly
introduced most significant bits.
•The shift operation is through carry.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF, SF, ZF, PF.
27. BX CF
0
0
1
BX CF
0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1
• Operation Performed :--
–0 MSB ------------------ LSB CF
• Example :--
– If CF = 0, BX = E6D3H
– After SHR BX, 1 ; Shift the contents of BX
register by one towards right
SHR (Shift Logical Right)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = 7369H
28. ROR (Rotate Right without Carry)
Syntax :-- ROR destination, count
•This instruction rotates the destination bit by
bit to the right excluding the carry
•The bit moved out of LSB is rotated around
into the MSB and also copied to CF.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF
29. BX CF
0
1
BX CF
1 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1
• Operation Performed :--
– MSB LSB CF
• Example :--
– If CF = 0, BX = E6D3H
– After ROR BX, 1 ; Rotate the contents of BX
register by one towards right
ROR (Rotate Right without Carry)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = F369H
30. • Example :--
– If CF = 0, BH = 54H
– MOV CL, 02 ; Load CL register for the count
ROR BH, CL ; Rotate the contents of BH register by twice
towards right
ROR (Rotate Right without Carry)Cntd..
0 0 0 1 0 1 0 1
BH CF
0
0
0
0 1 0 1 0 1 0 0
0 0 1 0 1 0 1 0
BH = 15H with CF = 0
31. • Uses of ROR instruction:--
• This instruction can be used to swap the
nibbles in a byte or to swap the bytes in a
word.
– MOV CL,04H
ROR AL, CL
• It can also be used to rotate the bit into CF
which can be checked later for a conditional
jump. (JC or JNC)
32. ROL (Rotate Left without Carry)
Syntax :-- ROL destination, count
•This instruction rotates the destination bit by
bit to the left excluding the carry
•The bit moved out of MSB is rotated around
into the LSB and also copied to CF.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF
33. CF BX
0
1
CF BX
1 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1
• Operation Performed :--
– CF MSB LSB
• Example :--
– If CF = 0, BX = E6D3H
– After ROL BX, 1 ; Rotate the contents of BX
register by one towards left
ROL (Rotate Left without Carry)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = CDA7H
34. • Example :--
– If CF = 0, BH = 54H
– MOV CL, 02 ; Load CL register for the count
ROL BH, CL ; Rotate the contents of BH register by twice
towards Left
ROL (Rotate Left without Carry)Cntd..
0 1 0 1 0 0 0 1
CF BH
0
0
1
0 1 0 1 0 1 0 0
1 0 1 0 1 0 0 0
BH = 51H with CF = 1
35. • Uses of ROL instruction:--
• This instruction can be used to swap the
nibbles in a byte or to swap the bytes in a
word.
– MOV CL,04H
ROL AL, CL
• It can also be used to rotate the bit into CF
which can be checked later for a conditional
jump. (JC or JNC)
36. RCR (Rotate Right with Carry)
Syntax :-- ROR destination, count
•This instruction rotates the destination bit by
bit to the right including the carry
•The bit moved out of LSB is rotated into CF
and the bit in CF is rotated into the MSB.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF
37. BX CF
0
1
BX CF
0 1 1 1 0 0 1 1 0 1 1 0 1 0 0 1
• Operation Performed :--
– MSB LSB CF
• Example :--
– If CF = 0, BX = E6D3H
– After RCR BX, 1 ; Rotate the contents of BX
register by one towards right through
carry
RCR (Rotate Right with Carry)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = 7369H
38. • Example :--
– If CF = 0, BH = 54H
– MOV CL, 02 ; Load CL register for the count
RCR BH, CL ; Rotate the contents of BH register by twice
towards right through carry
RCR (Rotate Right with Carry)Cntd..
0 0 0 1 0 1 0 1
BH CF
0
0
0
0 1 0 1 0 1 0 0
0 0 1 0 1 0 1 0
BH = 15H with CF = 0
39. RCL (Rotate Left with Carry)
Syntax :-- RCL destination, count
•This instruction rotates the destination bit by
bit to the left including the carry
•The bit moved out of MSB is rotated into CF
and the bit in CF is rotated into the LSB.
•The count can be either 1 or specified by CL
register.
•The destination can be a byte or a word in
register or a memory location, but not an
immediate data.
•Flags affected : OF ,CF
40. CF BX
0
1
CF BX
1 1 0 0 1 1 0 1 1 0 1 0 0 1 1 0
• Operation Performed :--
– CF MSB LSB
• Example :--
– If CF = 0, BX = E6D3H
– After RCL BX, 1 ; Rotate the contents of BX
register by one towards left through
carry
RCL (Rotate Left with Carry)Cntd..
1 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1
BX = CDA6H
41. • Example :--
– If CF = 0, BH = 54H
– MOV CL, 02 ; Load CL register for the count
RCL BH, CL ; Rotate the contents of BH register by twice
towards Left through carry
RCL (Rotate Left with Carry)Cntd..
0 1 0 1 0 0 0 0
CF BH
0
0
1
0 1 0 1 0 1 0 0
1 0 1 0 1 0 0 0
BH = 50H with CF = 1