Multiply Two 16-bit Numbers. ORG 0000H MOV A,30H MOV B,40H MUL AB MOV 50H,A MOV 51H,B MOV A,31H MOV B,41H MUL AB MOV 52H,A MOV 53H,B MOV A,31H MOV B,40H.

Slides:



Advertisements
Similar presentations
Program.-(9)* Write a program Input two numbers from keyboard and multiply of given values using by variables. Input value No 1 input value No2 Multiply.
Advertisements

Program.-(4)* Write a program for input two integer number with message and display their sum. Algorithm steps Algorithm steps 1.Display message for input.
MOV Instruction MOV destination, source ; copy source to dest. MOV A,#55H ;load value 55H into reg. A MOV R0,A ;copy contents of A into R0 ;(now A=R0=55H)
Introduction to Computer Engineering by Richard E. Haskell BCD Arithmetic Module M16.5 Section 10.4.
COMP 2003: Assembly Language and Digital Logic
Comp Sci Floating Point Arithmetic 1 Ch. 10 Floating Point Unit.
NEG Instruction Change operand content into two’s complement (negative value) and stored back into its operand mov bl, b neg bl; bl = mov.
AB 11 22 33 44 55 66 77 88 99 10  20  19  18  17  16  15  14  13  12  11  21  22  23  24  25  26  27  28.
Computer Organization & Assembly Language
32 bit multiplication Explanation: First number: H Second number: H As one memory location can store 1 byte of data, the above numbers.
Assembly 02. Outline mov Command Registers Memory EFLAGS Arithmetic 1.
COMP3221: Microprocessors and Embedded Systems--Lecture 7 1 COMP3221: Microprocessors and Embedded Systems Lecture 7: Arithmetic and logic Instructions.
CS 140L Lecture 7 Professor CK Cheng 5/13/02. Announcements  State Assignment: Chapters 7.4.3, 7.7.3, kinds of coding: 1) Binary – [ log 2 n ]
Review Questions Chapters What TUTOR command is used to enter a string of ASCII bytes into memory? /MA 2.What are the names of the 8086 index.
Program.-(4)* Write a program for input two integer number with message and display their sum. Algorithm steps Algorithm steps 1.Display message for input.
The 8051 Microcontroller and Embedded Systems
CoE3DJ4 Digital Systems Design Chapter 3: instruction set summary.
ASCII and BCD Arithmetic Chapter 11 S. Dandamudi.
ICS312 Set 9 Logic & Shift Instructions. Logic & Shift Instructions Logic and Shift Instructions can be used to change the bit values in an operand. The.
8051 Micro controller. Architecture of 8051 Features of 8051.
Arithmetic Flags and Instructions
Area of Parallelograms, Triangles and Trapezoids.
Properties of Addition and Multiplication. Distributive Property A(B + C) = AB + BC 4(3 + 5) = 4x3 + 4x5.
Areas of Parallelograms and Trapezoids Objective: Learn to find the area of parallelograms and trapezoids.
Microprocessors CSE 341 Lecture Md. Omar Faruqe UB 1228
MUL and DIV How to use the x86 CPU’s multiplication and division instructions.
Microprocessor MA Rahim Khan Computer Engineering and Networks Department.
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
With Two-Digit Numbers. 1a. Multiply one’s column x 1 1 * 1 = 1.
kashanu.ac.ir Microprocessors Interrupts Lec note 8.
Addressing Modes Instruction – Op-code – Operand Addressing mode indicates a way of locating data or operands. – Any instruction may belong to one or more.
Arithmetic Instructions and Programs. Outlines Range of numbers in 8051 unsigned data Range of numbers in 8051 unsigned data Addition & subtraction instructions.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني 8085 Instruction Set Instruction types. data transfer group. Arithmetic group.
Parallel Input/Output
Multiplication
Areas of Parallelograms and Trapezoids
Areas of Parallelograms and Trapezoids
Classification of Instruction Set of 8051
MIPS floating point instructions
Lecture Set 5 The 8051 Instruction Set.
ADDRESSING MODES.
Multiplication
Multiplication and Division Instructions
Assembly Language Programming Part 2
ADDRESSING MODES.
Overview Introduction General Register Organization Stack Organization
Data Processing Instructions
4.2 Arithmetic Instructions
Instruction Groups The 8051 has 255 instructions.
Memory Organisation Source: under
BIC 10503: COMPUTER ARCHITECTURE
The 8051 Assembly Language Arithmetic & Logic Instructions
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Machine Code Source:.
CS-401 Computer Architecture & Assembly Language Programming
Subroutines and the Stack
Area of Right Triangles
Binary Math Basic operations.
Design of Control Path Debdeep Mukhopadhyay Associate Professor
Number Systems and Circuits for Addition
DMT 245 Introduction to Microcontroller
To get y, multiply x by 3 then add 2 To get y, multiply x by negative ½ then add 2 To get y, multiply x by 2 then subtract 3 To get y, multiply x.
Area of Right Triangles
ARM Cortex-M0 The 8 / 32-Bit Difference
Multiplication and Division Instructions
FLIPPED CLASSROOM ACTIVITY CONSTRUCTOR – USING EXISTING CONTENT
Multiplication and Division Instructions
Areas of Parallelograms and Trapezoids
CS 140L Lecture 8 Professor CK Cheng 11/19/02.
MUL operation.
Presentation transcript:

Multiply Two 16-bit Numbers

ORG 0000H MOV A,30H MOV B,40H MUL AB MOV 50H,A MOV 51H,B MOV A,31H MOV B,41H MUL AB MOV 52H,A MOV 53H,B MOV A,31H MOV B,40H MUL AB ADD A,51H MOV 51H,A MOV A,B ADDC A,52H MOV 52H,A MOV A,#00H ADDC A,53H MOV 53H,A MOV A,30H MOV B,41H MUL AB ADDC A,51H MOV 51H,A MOV A,B ADDC A,52H MOV 52H,A MOV A,#00H ADDC A,53H MOV 53H,A END AB Memory/Registers Used 30H31H 40H41H 50H51H52H53H Carry Flag Input MemoryOutput Memory

Multiply Two 16-bit Numbers ORG 0000H MOV A,30H MOV B,40H MUL AB MOV 50H,A MOV 51H,B MOV A,31H MOV B,41H MUL AB MOV 52H,A MOV 53H,B MOV A,31H MOV B,40H MUL AB ADD A,51H MOV 51H,A MOV A,B ADDC A,52H MOV 52H,A MOV A,#00H ADDC A,53H MOV 53H,A MOV A,30H MOV B,41H MUL AB ADDC A,51H MOV 51H,A MOV A,B ADDC A,52H MOV 52H,A MOV A,#00H ADDC A,53H MOV 53H,A END AB 99 Memory/Registers Used 30H31H 99 40H41H 22 50H51H52H53H Carry Flag Input MemoryOutput Memory AB 99 AB 22 AB 5214